Macro: Can't get data from Results table
Posted by Maart on Apr 04, 2007; 9:36am
URL: http://imagej.273.s1.nabble.com/Macro-Can-t-get-data-from-Results-table-tp3686805.html
Dear group,
I'm an ImageJ-beginner and want to write a macro that reads values from the Results window/table.
First I run the "Color Histogram" plugin. It creates a nice histogramm window and writes data to the Results window.
Then I try to read the mean red value but I always get the error message: "Results table empty in line 2".
This is the code I'm using:
run("Color Histogram");
mred = getResult("red",0);
The Results window shows this:
- red green blue
mean 235.51 240.76 219.23
st.dev 5.97 4.54 4.73
Any suggestions or hints?
Thanks in advance
Maart