IT-LIST Digest 8Topics covered in this issue include:  1) Problem with contrast enhancement	by BIRD DAVID   2) RE: Problem with contrast enhancement	by Don Wilcox   3) RE: Frame Grabber or Scanner Support	by Don Wilcox   4) RE: Thresholding images	by Don Wilcox   5) Re: Problem with contrast enhancement	by BIRD DAVID   6) RE: Thresholding images	by Don Wilcox   7) Development of ImageTool Plugins	by J.Glenn@ee.qub.ac.uk  8) Re: Apparent bugs	by Bird David   9) Image Math Problems	by bell@upanet.uleth.ca (Craig Bell) 10) Re: Development of ImageTool Plugins	by "S. Brent Dove"  11) Re: Image Math Problems	by "S. Brent Dove" ----------------------------------------------------------------------Date: Mon, 12 Feb 1996 15:40:21 -0500 (EST)From: BIRD DAVID To: IT-LIST@sparky.uthscsa.eduSubject: Problem with contrast enhancementMessage-ID: <9602122040.AA22723@cari.telecom.uqam.ca>I am using ImageTool to size and count bacteria. To do this, I want to use a Laplace filter to define the edges of the cells. This filter has the coefficients -1 -1 -1, -1 +8 -1, -1 -1 -1 (say - in fact the filter I use is 5X5). The trouble is, the extremes of the image are transformed to the same value. In other words, the blacks and whites all come out white. If I use the Contrast enhancement directly, I notice that the values of all pixels flip at the upper extreme of the C scale - is this related to my problem? Is there some way of re-establishing a contrast scale that is linear over the entire range?By the way, I too am delighted with the program as a whole.David BirdUniversity of Quebec at Montrealbird.david@uqam.ca------------------------------Date: Wed, 14 Feb 1996 20:23:51 -0700From: Don Wilcox To: 'ImageTool List Server' Subject: RE: Problem with contrast enhancementMessage-ID: <01BAFB1B.39A344C0@slip56.xroads.com>----------From:  BIRD DAVID[SMTP:bird.david@uqam.ca]Sent:  Monday, February 12, 1996 01:39 AMTo:  wilcox@xroads.comSubject:  Problem with contrast enhancementI am using ImageTool to size and count bacteria. To do this, I want to=20use a Laplace filter to define the edges of the cells. This filter has=20the coefficients -1 -1 -1, -1 +8 -1, -1 -1 -1 (say - in fact the filter =I=20use is 5X5). The trouble is, the extremes of the image are transformed =to=20the same value. In other words, the blacks and whites all come out =white.=20If I use the Contrast enhancement directly, I notice that the values of=20all pixels flip at the upper extreme of the C scale - is this related to =my problem? Is there some way of re-establishing a contrast scale that =is=20linear over the entire range?I am confused.  When you say at the extremes, do you mean that pixels =with gray values near 0 and those with values near 255 are both turning =white, or are you saying that the pixels at the edge are turning white.  =The former would be a bug, the latter is a design decision taken to make =certain filtering operations more reproducable.  If it is the latter, =what would you rather have it do?By the way, I too am delighted with the program as a whole.Thank you for your support.David BirdUniversity of Quebec at Montrealbird.david@uqam.caDon------------------------------Date: Wed, 14 Feb 1996 20:29:19 -0700From: Don Wilcox To: 'ImageTool List Server' Subject: RE: Frame Grabber or Scanner SupportMessage-ID: <01BAFB1B.41D24CE0@slip56.xroads.com>----------From:  Craig Bell[SMTP:bell@upanet.uleth.ca]Sent:  Saturday, February 10, 1996 08:53 AMTo:  wilcox@xroads.comSubject:  Frame Grabber or Scanner SupportI need to know if the next version of Image Tool (The Windows 95 =version!)will have support for Frame grabbers and Twain Devices.  In addition, Iwould like to know if it is possible to get Image Tool to use the framegrabber that I already use (Coreco TCX frame grabber).  Image Tool is =veryfast and I would love to use it with my current applications and =equipment.However, I do not know how to acquire images (short of loading files =intothe program).=20If your device is TWAIN compatible, IT already provides rudimentary =support.  The next version should have improved TWAIN support, as it =will be coming from a commercial plug-in package that is very widely =used.  On the other hand, if you want, you can write an acquisition =plug-in for the device.  They are fairly simple if you know C or C++ and =have access to a compiler.  The SDK, which includes the source code, =contains an example plug-in that you could use as a model.  Note that =the SDK source has been removed from the ftp site for technical reasons =- when the next version of IT is released (in thenext couple of weeks), =the source will magically re-appear!.BTW, IT has always run under Window 95.Is it possible to have the macros "remember" what parameters you set forthresholding processes?  It's hard to automate our applications when we =haveto keep telling the program how to threshold the image. =20Not exactly, although the next version has been enhanced to show the =thresholding values in the dialog box as you change them, so getting =reproducable results should be easier.With respect to color imaging, is there a "convert-to-greyscale" option =Ihave not seen yet? I can't threshold anything that isn't a greyscale but =Ihaven't found a consistent way to create the greyscale!Coming in the next version. If anyone can provide assistance with these questions, I would be verygrateful. =20Thanks for creating a very useful (and fast!) image analysis product, =and Ianticipate using the next version later on this month.I hope you like it when it comes.  These are just a few of the minor =enhancements in the new version.  The real changes are the cool ones!Don------------------------------Date: Wed, 14 Feb 1996 20:41:57 -0700From: Don Wilcox To: 'ImageTool List Server' Subject: RE: Thresholding imagesMessage-ID: <01BAFB1C.ECF44F00@slip56.xroads.com>----------From:  Heberto Ghezzo[SMTP:HEBERTO@meakins.lan.mcgill.ca]Sent:  Tuesday, February 06, 1996 07:20 PMTo:  wilcox@xroads.comSubject:  Re: Thresholding imagesHi, I am new to IT and not very skilled, so far I have been using=20NIH-IMAGE in a Mac but I want to work in my PC......Hope you succeed.  That was what IT was meant to do.The problem of not thresholding a color image is a serious one, I=20will propose to be one of the first to do for version 1.2..What I would want is:  a- change color images, either paletted or 24 bits to gray scaleThe next version of IT will provide a conversion from color to grayscale =as a plug-in. b- manipulate the palette before changing to gray.by manipulate the palette i mean a way to change the colors to a=20distance. For example in a inmuno stained picture I want to quantize=20the amount of color corresponding to may stain. I want to indicate in=20the screen an area of perfect staining and the program to read the=20palette colors in the area, compute the mean and the then replace the=20palette with a gray scale indicating distance in 3 color space to=20that mean, thus in the transformed scale 'black' will indicate the=20same color as the stain, 'dark gray' very close color and 'white' a=20completely opposite color. Thresholding this image I can  obtain the=20total area stained ( amount) or count the number of cells stained,=20etc.This is a good idea.  It will not make it into the next version to IT, =but somewhere down the line, we will improve the color capabilities of =the program, and this idea will be considered.Also I did not find a way to indicate manually what is an 'object' to=20measure, for example I am opbserving lung tissue, I want to point to=20an alveoly or alveolar duct, mark them and have the program give me=20the perimeter, area, diameters, etc.I am hoping to get this into the next release, although my time frame is =rapidly shrinking.  If not in version 1.2, then it will be included in =the succeeeding release.Don------------------------------Date: Wed, 14 Feb 1996 23:07:52 -0500 (EST)From: BIRD DAVID To: it-list@sparky.uthscsa.eduCc: r30240@nobel.si.uqam.ca (BIRD DAVID)Subject: Re: Problem with contrast enhancementMessage-ID: <9602150407.AA12202@cari.telecom.uqam.ca>Regarding my earlier post, it was based on my lack of understanding of the filtering process - I have solved it now that I know a bit more what I am doing. Sorry to bother you.David BirdDept. of BiologyUniversity of Quebec at Montreal------------------------------Date: Fri, 16 Feb 1996 06:56:33 -0700From: Don Wilcox To: 'ImageTool List Server' Subject: RE: Thresholding imagesMessage-ID: <01BAFD79.09882F20@slip23.xroads.com>----------From:  HEBERTO@meakins.lan.mcgill.ca[SMTP:HEBERTO@meakins.lan.mcgill.ca]Sent:  Thursday, February 15, 1996 01:46 AMTo:  wilcox@xroads.comSubject:  RE: Thresholding imagesHi Don, it is me again. In a previous mail I asked for the facility=20to compute color distances in an image. In a test i am doing a=20distance defined as :d=3D0.00001*[(r-R)^2+(g-G)^2+(b-B)^2]+5*abs(atan(r/g)-atan(R/G))+        5*abs(atan(g/b)-atan(G/B))+5*abs(atan(b/r)-atanB/R))I will keep this around, and probably add it as a plug-in intermediate =to version 1.3  Right now, I have my hands full trying to update the =docs for the impending release of 1.2.  Thanks for the formula,Don------------------------------Date: Tue, 20 Feb 96 17:07:16 GMTFrom: J.Glenn@ee.qub.ac.ukTo: it-list@sparky.uthscsa.eduSubject: Development of ImageTool PluginsMessage-ID: <9602201707.AA21478@tesla>I understand that ImageTool was developed using Borland's C++ version 4.52. The SDK Help recommends the use of Borland C++ in developing plug-ins also. Would the use of Borland C++ version 5.0 cause any problems which I would avoid if I used version 4.52 ?------------------------------Date: Tue, 20 Feb 96 19:29:18 ESTFrom: Bird David To: it-list@sparky.uthscsa.eduSubject: Re: Apparent bugsMessage-ID: <9602210029.AA20220@cari.telecom.uqam.ca>I have come across the following apparent bugs in using ImageTool, allrelated to the use of Object Analysis. Perhaps they are produced by my calibration, which is the result of the high magnification of my images.In any case, the perimeter of the objects is always given as 0. For thesmallest of the objects (about 7 pixels), the major and minor axes are alsogiven as 0. With my calibration, a 7 pixel object is about 0.001 units of area.At other times, I have noted that the minor axis estimate may be greatlyoverestimated; for example, the following results might be presented:Object Number     Area      Perimeter     Major Axis    Minor axis     1            0.034         0            0.352    98374532.234Another oddity is that the results are difficult to export, because apparentlythere is no carriage return at the end of each data line. Therefore when Itry to copy the results to the clipboard and then into a spreadsheet, allresults are copied in one long line on the first row. I have worked aroundthis by setting up a generic text printer and directing the results to beprinted toa file.A final remark is about the positioning of the thresholding window when'finding' objects. Perhaps because my images are all in landscape format,whenever I ask to find objects, the window is placed at the extreme right ofthe screen - so far right that I can't pick it up, and must hit 'Escape' to backup and reposition the image window to the left and start again. I never learn.Is there some way that future versions of ImageTool might check to see thatI have not forgotten to reposition the Image window when finding objects?If it is not clear from the above exactly what is going wrong, I wouldhappily provide you with a sample image and my analysis protocol.David BirdDept. of BiologyUniversity of Quebec at Montreal------------------------------Date: Tue, 20 Feb 1996 23:35:06 -0700From: bell@upanet.uleth.ca (Craig Bell)To: it-list@sparky.uthscsa.eduSubject: Image Math ProblemsMessage-ID: <9602210629.AA29081@sparky.uthscsa.edu>I am having trouble using image math functions on an image.  Specifically, anymath that I apply to the image changes the appearance of the image only whenthe image math window is open.  Whenever I exit image math by clicking onthe "X" button or the CLOSE button, the image returns to its original pixelvalues. Am I missing something?  ---Craig Bell            e-mail: BELL@upanet.uleth.caPublic Access InternetThe University of Lethbridge------------------------------Date: Wed, 21 Feb 1996 10:04:35 -0600 (CST)From: "S. Brent Dove" To: IT List Subject: Re: Development of ImageTool PluginsMessage-ID: <01I1GZ3LQH7U006EG7@uthscsa.edu>Hello IT users,Recently a comment was made on development of Plugins for ImageTool>I understand that ImageTool was developed using Borland's C++ version >4.52. The SDK Help recommends the use of Borland C++ in developing >plug-ins also. Would the use of Borland C++ version 5.0 cause any >problems which I would avoid if I used version 4.52 ?We are unsure of the complications with using the new 5.0 version of Borlands compiler.  We have not gotten a copy, as far as I know it has not been release for general distribution.  I am afraid that there may be some incompatibilities, I would suggest that you use version 4.2 at least for now.  As soon as we received the new version 5.0 compiler we will convert the source code to that version.  This may be with the 1.2 version next week.  We will not however wait on the compiler to release the new version of IT.  We have made significant improvements in the user interface, funtions and bug fixes.  We will upgrade as soon as it is feasible to the new compiler.Thanks for your interest, Please let us know what plugins you are developing and if they may be shared with other IT users.S. Brent Dove                            Voice: (210) 567-3333Diagnostic Sciences                      Fax:   (210) 567-3334University of Texas                      Email: dove@uthscsa.eduHealth Science Center                    Web:   ddsdx.uthscsa.eduSan Antonio, TX    USA                   ftp:   maxrad6.uthscsa.edu------------------------------Date: Wed, 21 Feb 1996 10:04:38 -0600 (CST)From: "S. Brent Dove" To: IT List Subject: Re: Image Math ProblemsMessage-ID: <01I1GZ3OU776006EG7@uthscsa.edu>>I am having trouble using image math functions on an image.  Specifically, >any>math that I apply to the image changes the appearance of the image only when>the image math window is open.  Whenever I exit image math by clicking on>the "X" button or the CLOSE button, the image returns to its original pixel>values. >Am I missing something?  The current version 1.1.1 has a design flaw in the implemetation of image math.  Upon closing the dialog box the image is reverted to its original state. This was to provide a method for changing the image for display only not altering the actual numbers. The new version 1.2 will be released in the next week.  This has been changed. Upon closing the dialog box, the image will maintain the adjusted image.  In order to save the changes it will be necessary to select the Apply contrast to image before saving the image.Thank you for your help in improving UTHSCSA ImageToolS. Brent Dove                            Voice: (210) 567-3333Diagnostic Sciences                      Fax:   (210) 567-3334University of Texas                      Email: dove@uthscsa.eduHealth Science Center                    Web:   ddsdx.uthscsa.eduSan Antonio, TX    USA                   ftp:   maxrad6.uthscsa.edu------------------------------End of IT-LIST Digest 8***********************