Posted by
Md Tamjidul Hoque on
May 28, 2010; 4:25am
URL: http://imagej.273.s1.nabble.com/Analyze-particles-Help-and-bug-tp3688137p3688143.html
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();
>
>