Login  Register

Re: ParticleAnalyzer class and stacks

Posted by Aryeh Weiss on Jul 07, 2014; 2:43am
URL: http://imagej.273.s1.nabble.com/ParticleAnalyzer-class-and-stacks-tp5008596p5008598.html

On 7/6/14, 11:57 PM, Rasband, Wayne (NIH/NIMH) [E] wrote:

> On Jul 6, 2014, at 6:24 AM, Aryeh Weiss wrote:
>
>> I am trying to use the particle analyzer in python. I found an example for use of the PA on stacks, in which the PA is run on each slice individually within a loop. Is there a way to run the PA on the entire stack, without having to loop over each slice?
>> I looked for an example of this, and I am sure there must be many such examples, but I did not find it.
> Try using the command recorder (Plugins>Macros>Record). The following is what is recorded when I open the "Bat Cochlea Volume" sample stack, threshold it and run the particle analyzer, with the recorder running in "JavaScript" mode.
>
>    IJ.run("Set Measurements...", "area centroid stack decimal=3");
>    imp = IJ.openImage("http://imagej.nih.gov/ij/images/bat-cochlea-volume.zip");
>    IJ.setAutoThreshold(imp, "Default dark");
>    IJ.run(imp, "Analyze Particles...", "size=10 display clear summarize stack");
>
> -wayne
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
Thank yo for your reply.

I was trying to do it using the the ParticleAnalyzer class without  IJ.run .
Is there a way to do that? For that matter, is it generally better to
use the API rather than use
  IJ.run ?

--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html