extra values from Results window

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

extra values from Results window

mmettlen
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: extra values from Results window

Herbie
Good day,

no problems here.

Are you sure you've correctly written the column names and that the
inverted commas are not of the curly type?

Regards

Herbie

::::::::::::::::::::::::::::::::::::::
Am 14.09.18 um 15:03 schrieb mmettlen:

> After running "Measure", I'm trying to extract values from the results table
> with only 1 row, and column 2 = "Area", column 3 =  "Mean", column 4 =
> "Mode", column 3 =  "%Area", ...
> I get the correct values for Area and Mean after running getResults("Area",
> 0) and getResults("Mean", 0), respective. However, for all other (e.g.
> getResults("Mode", 0)), I obtain NaN. => How do I extract the over values?
> Alternatively, How do I print all the results from row 0 in a log window?
> Thx
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: extra values from Results window

Michael Schmid-3
In reply to this post by mmettlen
Hi Marcel,

if a column appears in the "Results", you can extract its values in a
macro with getResult. Just make sure the name exactly matches the column
name.
Of course, you have to make sure the column exists: You have to specify
it in Analyze>Set Measurements.
Here is an example:

run("Blobs (25K)");
setThreshold(0,128);
run("Set Measurements...", "area mean modal center area_fraction limit
redirect=None decimal=5");
run("Measure");
mode=getResult("Mode", 0);
print("Mode=",mode);
percent=getResult("%Area", 0);
print("%Area=",percent);

Michael
________________________________________________________________
On 14/09/2018 15:03, mmettlen wrote:
> After running "Measure", I'm trying to extract values from the results table
> with only 1 row, and column 2 = "Area", column 3 =  "Mean", column 4 =
> "Mode", column 3 =  "%Area", ...
> I get the correct values for Area and Mean after running getResults("Area",
> 0) and getResults("Mean", 0), respective. However, for all other (e.g.
> getResults("Mode", 0)), I obtain NaN. => How do I extract the over values?
> Alternatively, How do I print all the results from row 0 in a log window?
> Thx

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: extra values from Results window

mmettlen
In reply to this post by mmettlen
Strange, after restarting my computer, the exact same code gives me the
correct values....



--
Sent from: http://imagej.1557.x6.nabble.com/

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