Posted by
Jan Eglinger-3 on
May 17, 2011; 2:52pm
URL: http://imagej.273.s1.nabble.com/Particle-analyzer-and-ROI-manger-tp3684572p3684575.html
Hi Susanna,
On 17.05.2011 3:52 PM, Susanna Trollvad wrote:
> 2011/5/17 Seitz Arne <
[hidden email]>
>> IJ.run(imp,"Analyze Particles...", "size=0.12-Infinity
>> circularity=0.00-1.00 show=Nothing exclude clear include add slice");
>> With imp being the IaagePlus you wanted to analyse.
>
> This also works, but I would like to be able to do it without calling the
> "Analyze particles" menu command.
what I do in Javascript to invoke the "Analyze particles" command
without showing a window is the following (mind the line breaks
introduced by the mailer). Maybe you can transfer this to your Java plugin.
// JavaScript code snippet
var pa = new ParticleAnalyzer(ParticleAnalyzer.SHOW_MASKS +
ParticleAnalyzer.INCLUDE_HOLES, 0, rt, params[MIN_SIZE],
Double.POSITIVE_INFINITY);
pa.setHideOutputImage(true);
pa.analyze(imp1, ip1);
var imp2 = pa.getOutputImage();
// end of snippet
For setting the options, see the Javadoc on
http://pacific.mpi-cbg.de/javadoc/ij/plugin/filter/ParticleAnalyzer.htmlHope that helps,
Jan