Re: Results count in a separate table
Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Results-count-in-a-separate-table-tp5019406p5019408.html
Hi Cyril,
as far as I could determine, ImageJ uses the table currently
named "Results" for the Results table macro commands.
If you have several Tables with different names, rename the one
that you want to use to "Results". E.g.
// if you want to keep the current Results table (if any),
// first rename it:
if (nResults > 0)
IJ.renameResults("Results", "Results_tmp");
// now rename the table you like to "Results":
IJ.renameResults("Morphometrie", "Results");
nLines = nResults();
// when done, rename it back
IJ.renameResults("Results", "Morphometrie");
Michael
________________________________________________________________
On 20/09/2017 11:15, Cyril Turiès wrote:
> Dear ImageJ users,
>
> When using the function getValue("results.count") with a separate
> table I am not able to get the total number of lines displayed in
> this table. I am working on a macro that has to be launched several
> times on various images selected by user. Between two analyses the
> ResultsTable is cleared, the image is closed and a table remains
> called "Morphometrie" with results calculated from previous images.
>
> I attached below the part of code that is problematic:
>
>
>
> If you comment/uncomment lines 11 to 14 to mimic the behaviour of
> adding lines to the "Morphometrie" table each time the macro is
> launched, you get a results count remaining at 1 with 5 lines in the
> table. If you uncomment all the lines at a time you get the correct
> number from getValue("results.count").
>
> Is there a way to count the lines that were previously printed in a
> table?
>
> Thank you for your help.
>
> Cyril
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html