Login  Register

Re: ParticleAnalyzer and ResultsTable

Posted by Jerome Mutterer-3 on Dec 12, 2014; 1:39pm
URL: http://imagej.273.s1.nabble.com/ParticleAnalyzer-and-ResultsTable-tp5010924p5010928.html

Hi Philippe,

Have a look at
http://rsbweb.nih.gov/ij/developer/macro/functions.html#IJ.renameResults
There's only one functional results table a any given time, but you can
rename it to a different name to 'save' it, then discard whatever the
particle analyser would create, and restore the saved RT by renaming it
"Results".

Jerome.

On 12 December 2014 at 14:20, Philippe CARL <[hidden email]>
wrote:

>
> Dear Gabriel,
> To use the "clear" option would "unfortunately" make my issue way to
> easy!!!
> The problem is that I don't have an empty result window (from previous
> analysis and computation) within the macro before I launch the "Analyze
> Particles...".
> And by using the "clear" option you will erase everything that is before in
> the result window.
> What I would rather like is the result window content to actually stay
> identical after and before the "Analyze Particles..." launching.
> And as an illustration, if I use the following macro:
> setResult("test", 0, 5);
> run("Blobs (25K)");
> setThreshold(126, 255);
> setOption("BlackBackground", true);
> run("Convert to Mask");
> print("before = " + nResults);
> run("Analyze Particles...", "size=0-Infinity clear add");
> print("after = " + nResults);
> the output is:
> before = 1
> after = 64
> as in my case I would rather like the output to be:
> before = 1
> after = 1
> Thanks in advance for your help.
> My best regards,
> Philippe
>
> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:[hidden email]] De la part de
> Gabriel Landini
> Envoyé : vendredi 12 décembre 2014 12:44
> À : [hidden email]
> Objet : Re: ParticleAnalyzer and ResultsTable
>
> On Friday 12 Dec 2014 12:08:53 you wrote:
> > run("Analyze Particles...", "size=0-Infinity add");
>
> > Which means that by running the ParticleAnalyzer plugin several new
> > ResultsTable lines entries are created (even in the case the Display
> > results option isn't activated) which is quite problematic in the case
> > you are already playing around with the ResultsTable for other
> > purposes within a macro.
>
> What about using the "clear" option.
>
> run("Analyze Particles...", "size=0-Infinity clear add");
>
> Otherwise you keep adding to the results table, which is what the macro
> should do, regardless of being displayed or not.
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
T 0367155339
www.ibmp.cnrs.fr

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