Hi All
(1) I need help: How can I turn off the numbering of the outlined objects while using 'Analyze particles...'? (2) Possible bug: The number kept on increasing within the outlined image when you repeatedly 'Analyze particles...'. I was surprised to see that even if I close the particular image and then reopen (apply Otsu Thresholding 8 bit) and reapply 'Analyze particles...', the number starts from/after the last maximum number. I had to restart ImageJ to get rid of the problem. Probably it will have to reinitialize its count variable every time 'Analyze particles...' is applied. Thanks Tamjid |
Hi Tamjidul,
> (2) Possible bug: The number kept on increasing within the outlined image > when you repeatedly 'Analyze particles...'. It is not a bug! If you want a new numbering to start, you have to select "clear results" from the "Analyze particles ..." window. Stoyan Pavlov 2010/5/26 Md Tamjidul Hoque <[hidden email]>: > Hi All > > (1) I need help: How can I turn off the numbering of the outlined objects > while using 'Analyze particles...'? > > (2) Possible bug: The number kept on increasing within the outlined image > when you repeatedly 'Analyze particles...'. > I was surprised to see that even if I close the > particular image and then reopen (apply Otsu Thresholding 8 bit) and reapply > 'Analyze particles...', the number starts from/after the last maximum > number. > I had to restart ImageJ to get rid of the > problem. > > Probably it will have to reinitialize its count > variable every time 'Analyze particles...' is applied. > > > Thanks > Tamjid > -- Dr. Stoyan P. Pavlov, MD Departament of Anatomy, Histology and Embryology Medical University "Prof. Dr. Paraskev Stoyanov", Varna Prof. Marin Drinov Str.55 9002 Varna Bulgaria Tel: +359 (0) 52 - 677 - 050 #2638 e-mail: [hidden email] |
Thanks Wayne and Stoyan.
However, Wayne, I see the output differs compared to (a) Outlines in 'Analyze particles' vs. (b) Masks in 'Analyze particles' and then Process>Binary>Outline. For example, for an images (Image #0: http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/0_Intermediateimage.zip?attredirects=0&d=1 ) with object based on size first, I am making a superset of the objects outlined in red and numbers (Image #1: http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/1_CountAllbySize.zip?attredirects=0&d=1 ). Then I am defining circularity (say .8 to 1.0) and is running the (a) Outlines in 'Analyze particles' in green remaining other parameter unchanged and then adding with the Image #1, so that I can get red outlined object outside the circularity range and yellow (red+green) inside the circularity range. And as the objects are already numbered before (in Image #1) I was trying to get the outlined image without the object being numbered in the circularity based 2nd case. See the outcome, image # 2: http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/2_CircularitybasedsubsetOutlinefirst.zip?attredirects=0&d=1 As an alternate approach, as you have suggested to Masks in 'Analyze particles' and then Process>Binary>Outline: I had applied the Masks in 'Analyze particles' on Image# 0 and then Process>Binary>Outline and greened ... But, the outputs differ and the outlined of the circularity set is not fully overlapped with the previous outline as generated in image #1. So the outcome looks distorted (image #4: http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/3_CircularitybasedsubsetMaskfirst.zip?attredirects=0&d=1) and for some images/case the outputs look very bad. So, please help on this issue. I am not sure if it is due to different line-thickness or different outlining algorithms .... or, it would also have been better to have an option with the 'Analyze particles' to tick for number-less outlined object. Thanks Tamjid > (1)You could use the Show: "Masks" option and then run Process>Binary>Outline. > -wayne On Wed, May 26, 2010 at 6:03 PM, Stoyan Pavlov <[hidden email]>wrote: > Hi Tamjidul, > > > (2) Possible bug: The number kept on increasing within the outlined > image > > when you repeatedly 'Analyze particles...'. > > It is not a bug! If you want a new numbering to start, you have to > select "clear results" from the "Analyze particles ..." window. > > Stoyan Pavlov > > > 2010/5/26 Md Tamjidul Hoque <[hidden email]>: > > Hi All > > > > (1) I need help: How can I turn off the numbering of the outlined > objects > > while using 'Analyze particles...'? > > > > (2) Possible bug: The number kept on increasing within the outlined > image > > when you repeatedly 'Analyze particles...'. > > I was surprised to see that even if I close > the > > particular image and then reopen (apply Otsu Thresholding 8 bit) and > reapply > > 'Analyze particles...', the number starts from/after the last maximum > > number. > > I had to restart ImageJ to get rid of the > > problem. > > > > Probably it will have to reinitialize its > count > > variable every time 'Analyze particles...' is applied. > > > > > > Thanks > > Tamjid > > > > > > -- > Dr. Stoyan P. Pavlov, MD > Departament of Anatomy, Histology and Embryology > Medical University "Prof. Dr. Paraskev Stoyanov", Varna > Prof. Marin Drinov Str.55 > 9002 Varna > Bulgaria > Tel: +359 (0) 52 - 677 - 050 #2638 > e-mail: [hidden email] > |
On Wednesday 26 May 2010 14:16:58 you wrote:
> But, the outputs differ and the outlined of the circularity set is not > fully overlapped with the previous outline as generated in image #1. > So the outcome looks distorted (image #4: > http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/3_Ci > rcularitybasedsubsetMaskfirst.zip?attredirects=0&d=1) and for some > images/case the outputs look very bad. > So, please help on this issue. I am not sure if it is due to different > line-thickness or different outlining algorithms .... I think that this may be due to a known mismatch of the outlines of a ROI with the pixels of a ROI. This was raised recently in the fiji-devel list. I do not think that there is a solution currently unless you treat the blobs in the same way. My suggestion is to make your own routine to draw the boundaries of ROIs as the pixels that touch the background. For example, assuming white objects on a black background: setBatchMode(true); a=getTitle(); run("Duplicate...", "title=test-1"); selectWindow("test-1"); run("Minimum...", "radius=0.5"); imageCalculator("Subtract", a,"test-1"); setBatchMode(false); You can do this also with Binary Thinning in a 1 line macro: run("BinaryThin ", "kernel_a='2 1 2 1 1 1 2 1 2 ' rotations='none' iterations=1 white"); This guarantees that all the pixels of the boundary of the blob are contained in the blob that you see. Otherwise, IJ gets the ROI of the blob and draws the outline which in not completely contained in the blob. If you want to show certain blobs, then use the XStart YStart coordinates to produce an image with only those pixels set and use the BinaryRreconstruct plugin in my page to recreate only those particles (the seed is the points you set and the mask is the original binary image). Cheers G |
In reply to this post by Md Tamjidul Hoque
On May 26, 2010, at 8:07 AM, Tamjid wrote:
> Thanks Wayne and Stoyan. > > However, Wayne, I see the output differs compared to > > (a) Outlines in 'Analyze particles' vs. (b) Masks in 'Analyze > particles' and then Process>Binary>Outline. In the 1.44b9 daily build you can generate the particle outlines by using the "In situ Show" option to display the outlines as an overlay and then drawing the overlay. Here is a JavaScript example: imp = IJ.openImage("http://rsb.info.nih.gov/ij/images/blobs.gif"); IJ.setAutoThreshold(imp, "Default"); IJ.run(imp, "Analyze Particles...", "size=350 show=Outlines in_situ"); ip = imp.getProcessor().duplicate(); ip = ip.convertToByte(false); ip.setColor(Color.black); ip.fill(); ip.setColor(Color.white); overlay = imp.getOverlay(); overlay.drawPixels(ip); // requires 1.44b9 or later imp.setOverlay(null); imp.show(); new ImagePlus("Outlines", ip).show(); -wayne > > For example, for an images (Image #0: > http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/0_Intermediateimage.zip?attredirects=0&d=1 > ) > > with object based on size first, I am making a superset of the objects > outlined in red and numbers (Image #1: > http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/1_CountAllbySize.zip?attredirects=0&d=1 > ). > > Then I am defining circularity (say .8 to 1.0) and is running the (a) > Outlines in 'Analyze particles' in green remaining other parameter unchanged > > and then adding with the Image #1, so that I can get red outlined object > outside the circularity range and yellow (red+green) inside the circularity > range. > And as the objects are already numbered before (in Image #1) I was trying to > get the outlined image without the object being numbered in the circularity > based 2nd case. > > See the outcome, image # 2: > http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/2_CircularitybasedsubsetOutlinefirst.zip?attredirects=0&d=1 > > > As an alternate approach, as you have suggested to Masks in 'Analyze > particles' and then Process>Binary>Outline: > I had applied the Masks in 'Analyze particles' on Image# 0 and then > Process>Binary>Outline and greened ... > > But, the outputs differ and the outlined of the circularity set is not fully > overlapped with the previous outline as generated in image #1. > So the outcome looks distorted (image #4: > http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/3_CircularitybasedsubsetMaskfirst.zip?attredirects=0&d=1) > and for some images/case the outputs look very bad. > > So, please help on this issue. I am not sure if it is due to different > line-thickness or different outlining algorithms .... > > or, it would also have been better to have an option with the 'Analyze > particles' to tick for number-less outlined object. > > > Thanks > Tamjid > > > > > > > > > > > > >> (1)You could use the Show: "Masks" option and then run > Process>Binary>Outline. >> -wayne > > On Wed, May 26, 2010 at 6:03 PM, Stoyan Pavlov <[hidden email]>wrote: > >> Hi Tamjidul, >> >>> (2) Possible bug: The number kept on increasing within the outlined >> image >>> when you repeatedly 'Analyze particles...'. >> >> It is not a bug! If you want a new numbering to start, you have to >> select "clear results" from the "Analyze particles ..." window. >> >> Stoyan Pavlov >> >> >> 2010/5/26 Md Tamjidul Hoque <[hidden email]>: >>> Hi All >>> >>> (1) I need help: How can I turn off the numbering of the outlined >> objects >>> while using 'Analyze particles...'? >>> >>> (2) Possible bug: The number kept on increasing within the outlined >> image >>> when you repeatedly 'Analyze particles...'. >>> I was surprised to see that even if I close >> the >>> particular image and then reopen (apply Otsu Thresholding 8 bit) and >> reapply >>> 'Analyze particles...', the number starts from/after the last maximum >>> number. >>> I had to restart ImageJ to get rid of the >>> problem. >>> >>> Probably it will have to reinitialize its >> count >>> variable every time 'Analyze particles...' is applied. >>> >>> >>> Thanks >>> Tamjid >>> >> >> >> >> -- >> Dr. Stoyan P. Pavlov, MD >> Departament of Anatomy, Histology and Embryology >> Medical University "Prof. Dr. Paraskev Stoyanov", Varna >> Prof. Marin Drinov Str.55 >> 9002 Varna >> Bulgaria >> Tel: +359 (0) 52 - 677 - 050 #2638 >> e-mail: [hidden email] >> |
Rasband, Wayne (NIH/NIMH) [E] wrote:
> In the 1.44b9 daily build you can generate the particle outlines by using the "In situ Show" option to display the outlines as an overlay and then drawing the overlay. Here is a JavaScript example: > > imp = IJ.openImage("http://rsb.info.nih.gov/ij/images/blobs.gif"); > IJ.setAutoThreshold(imp, "Default"); > IJ.run(imp, "Analyze Particles...", "size=350 show=Outlines in_situ"); > ip = imp.getProcessor().duplicate(); > ip = ip.convertToByte(false); > ip.setColor(Color.black); > ip.fill(); > ip.setColor(Color.white); > overlay = imp.getOverlay(); > overlay.drawPixels(ip); // requires 1.44b9 or later > imp.setOverlay(null); > imp.show(); > new ImagePlus("Outlines", ip).show(); > > -wayne > > I think the other theme behind the 'in_situ" was not to open the window (specially for the batch mode) and to apply the output to current imp . Now with the current change in 1.44b9, I could not figure out how can I get a outlined and numbered object using "in_situ" for 'Analyze Particles ...' (such as Image#1) ? Because, "in_situ" mode I have to generate (a) outlined and numbered objects as well as (b) outlined and non-numbered objects, so that I can have Image #1:(http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/1_CountAllbySize.zip?attredirects=0&d=1) as previously it was possible to get Image#1 which is not working now with the updated version 1.44b9 in "in_situ" mode). But I can have Image #4:(http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/4_Circularitybasedsubsetoutlinedinsitu.zip?attredirects=0&d=1) now. So, I can add Image #1 and Image #4 to form the final result (Image # 5: http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/5_finalResultof1add4.zip?attredirects=0&d=1). But again he problem is I can not get Image #1 in 'in_situ' mode. Thanks Tamjid >> For example, for an images (Image #0: >> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/0_Intermediateimage.zip?attredirects=0&d=1 >> ) >> >> with object based on size first, I am making a superset of the objects >> outlined in red and numbers (Image #1: >> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/1_CountAllbySize.zip?attredirects=0&d=1 >> ). >> >> Then I am defining circularity (say .8 to 1.0) and is running the (a) >> Outlines in 'Analyze particles' in green remaining other parameter unchanged >> >> and then adding with the Image #1, so that I can get red outlined object >> outside the circularity range and yellow (red+green) inside the circularity >> range. >> And as the objects are already numbered before (in Image #1) I was trying to >> get the outlined image without the object being numbered in the circularity >> based 2nd case. >> >> See the outcome, image # 2: >> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/2_CircularitybasedsubsetOutlinefirst.zip?attredirects=0&d=1 >> >> >> As an alternate approach, as you have suggested to Masks in 'Analyze >> particles' and then Process>Binary>Outline: >> I had applied the Masks in 'Analyze particles' on Image# 0 and then >> Process>Binary>Outline and greened ... >> >> But, the outputs differ and the outlined of the circularity set is not fully >> overlapped with the previous outline as generated in image #1. >> So the outcome looks distorted (image #4: >> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/3_CircularitybasedsubsetMaskfirst.zip?attredirects=0&d=1) >> and for some images/case the outputs look very bad. >> >> So, please help on this issue. I am not sure if it is due to different >> line-thickness or different outlining algorithms .... >> >> or, it would also have been better to have an option with the 'Analyze >> particles' to tick for number-less outlined object. >> >> >> Thanks >> Tamjid >> >> >> >> >> >> >> >> >> >> >> >> >> |
In reply to this post by Gabriel Landini
Thanks Gabriel to clarify the problem and for providing the suggestion.
-Tamjid Gabriel Landini wrote: > On Wednesday 26 May 2010 14:16:58 you wrote: > >> But, the outputs differ and the outlined of the circularity set is not >> fully overlapped with the previous outline as generated in image #1. >> So the outcome looks distorted (image #4: >> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/3_Ci >> rcularitybasedsubsetMaskfirst.zip?attredirects=0&d=1) and for some >> images/case the outputs look very bad. >> > > >> So, please help on this issue. I am not sure if it is due to different >> line-thickness or different outlining algorithms .... >> > > I think that this may be due to a known mismatch of the outlines of a ROI with > the pixels of a ROI. This was raised recently in the fiji-devel list. > I do not think that there is a solution currently unless you treat the blobs > in the same way. > > My suggestion is to make your own routine to draw the boundaries of ROIs as > the pixels that touch the background. For example, assuming white objects on > a black background: > > setBatchMode(true); > a=getTitle(); > run("Duplicate...", "title=test-1"); > selectWindow("test-1"); > run("Minimum...", "radius=0.5"); > imageCalculator("Subtract", a,"test-1"); > setBatchMode(false); > > You can do this also with Binary Thinning in a 1 line macro: > > run("BinaryThin ", "kernel_a='2 1 2 1 1 1 2 1 2 ' rotations='none' > iterations=1 white"); > > This guarantees that all the pixels of the boundary of the blob are contained > in the blob that you see. > Otherwise, IJ gets the ROI of the blob and draws the outline which in not > completely contained in the blob. > > If you want to show certain blobs, then use the XStart YStart coordinates to > produce an image with only those pixels set and use the BinaryRreconstruct > plugin in my page to recreate only those particles (the seed is the points you > set and the mask is the original binary image). > > Cheers > G > > |
In reply to this post by Md Tamjidul Hoque
Here is JavaScript that demonstrates how to use the new particle analyzer show="Overlay Outlines" and "In situ Show" options, and the Overlay.setStrokeColor() method, which are available in the 1.44b11 daily build. Note that the particle analyzer now respects the "Black background" flag when the "In situ Show" option is used.
imp = IJ.openImage("http://rsb.info.nih.gov/ij/images/blobs.gif"); IJ.setAutoThreshold(imp, "Default"); Prefs.blackBackground = true; IJ.run(imp, "Analyze Particles...", "size=500 show=[Overlay Outlines] clear exclude"); overlay = imp.getOverlay(); IJ.run(imp, "Analyze Particles...", "size=0 show=Outlines clear in_situ exclude"); overlay.setStrokeColor(Color.yellow); overlay.drawLabels(false); imp = imp.flatten(); imp.show(); |
Dear Wayne
the code is simpler and great ... By the way, is there a way to check, how many particles are detected? For example, ... size=5000 instead of ... size=500 it will cause trouble/ will crash, so, like to check how many particles are detected to avoid rest of the process while particle count =0. Thanks Tamjid Rasband, Wayne (NIH/NIMH) [E] wrote: > Here is JavaScript that demonstrates how to use the new particle analyzer show="Overlay Outlines" and "In situ Show" options, and the Overlay.setStrokeColor() method, which are available in the 1.44b11 daily build. Note that the particle analyzer now respects the "Black background" flag when the "In situ Show" option is used. > > imp = IJ.openImage("http://rsb.info.nih.gov/ij/images/blobs.gif"); > IJ.setAutoThreshold(imp, "Default"); > Prefs.blackBackground = true; > IJ.run(imp, "Analyze Particles...", > "size=500 show=[Overlay Outlines] clear exclude"); > overlay = imp.getOverlay(); > IJ.run(imp, "Analyze Particles...", > "size=0 show=Outlines clear in_situ exclude"); > overlay.setStrokeColor(Color.yellow); > overlay.drawLabels(false); > imp = imp.flatten(); > imp.show(); > > |
Dear List,
currently I'm facing the problem that avi-files generated with ImageJ (Version 1.44a; Java 1.6.0_10) cannot be opened with Windows Media Player from Windows 7. I don't care about Windows Mediaplayer but it is also not possible to use these avi files in presentations which is a little bit nasty. Has maybe anyone encountered the same problem and/or a solution for this issue. Thanks for your help Cheers Arne --------------------------------------------------------------- Dr. Arne Seitz Head of Bioimaging and Optics Platform (BIOP) Swiss Institute of Technology (EPFL) Faculty of Life Sciences Station 15, AI 0241 CH-1015 Lausanne Phone: +41 21 693 9618 Fax: +41 21 693 9585 http://biop.epfl.ch/ --------------------------------------------------------------- |
On 28 May 2010, at 10:04, Seitz Arne wrote:
> Dear List, > > currently I'm facing the problem that avi-files generated with > ImageJ (Version 1.44a; Java 1.6.0_10) cannot be opened with Windows > Media Player from Windows 7. I don't care about Windows Mediaplayer > but it is also not possible to use these avi files in presentations > which is a little bit nasty. Has maybe anyone encountered the same > problem and/or a solution for this issue. > > Thanks for your help > > Cheers Arne Hi Arne, which type of compression do you use? PNG has the advantage of being non-lossy and smaller than uncompressed, but there are many programs that cannot read it. Also, some programs cannot read avi files if the image width and height are not multiples of 4. Michael |
On 28 May 2010, at 10:04, Seitz Arne wrote:
> Dear List, > > currently I'm facing the problem that avi-files generated with > ImageJ (Version 1.44a; Java 1.6.0_10) cannot be opened with Windows > Media Player from Windows 7. I don't care about Windows Mediaplayer > but it is also not possible to use these avi files in presentations > which is a little bit nasty. Has maybe anyone encountered the same > problem and/or a solution for this issue. > > Thanks for your help > > Cheers Arne Hi Arne, which type of compression do you use? PNG has the advantage of being non-lossy and smaller than uncompressed, but there are many programs that cannot read it. Also, some programs cannot read avi files if the image width and height are not multiples of 4. Michael Hi Michael, Thanks for your hints. The problem was caused due to the wrong image format. Cheers Arne |
>Dear List,
> > Currently I'm facing the problem that avi-files generated with ImageJ > (Version 1.44a; Java 1.6.0_10) cannot be opened with Windows > Media Player from Windows 7. I don't care about Windows Mediaplayer > but it is also not possible to use these avi files in presentations which > is a little bit nasty. Has maybe anyone encountered the same > problem and/or a solution for this issue. The ImageJ 1.44b12 daily build fixes a bug that caused 8 and 16 bit grayscale stacks saved as JPEG-compressed AVIs to not play correctly in the Windows 7 Media Player. -wayne |
Free forum by Nabble | Edit this page |