Re: Analyze particles ...: Help and bug
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
May 27, 2010; 7:05pm
URL: http://imagej.273.s1.nabble.com/Analyze-particles-Help-and-bug-tp3688137p3688142.html
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();