Get data from "Summary" window (3)
Posted by Ray Bonds on May 19, 2008; 6:12pm
URL: http://imagej.273.s1.nabble.com/Get-data-from-Summary-window-3-tp3696180.html
Wayne,
Thanks for your help on this. I have one more question. Is there an
easy way to always get the last line of the "summary window"?
I have everything else done I just keep getting the first line of the
summary window rather than the last.
> I am having a hard time figuring out how to get the summarized data
> (Count, Average Area, Average Size, etc.) from the Summary window in
> the macro language. I see that there is a getResults() function for
> the Results window, but I haven't seen anything in the macro language
> documentation that shows how to get the summarized data.
This macro gets the values from the first line of a "Summary" window:
selectWindow("Summary");
lines = split(getInfo(), "\n");
headings = split(lines[0], "\t");
values = split(lines[1], "\t");
for (i=0; i<headings.length; i++)
print(headings[i]+": "+values[i]);