Re: Get data from "Summary" window
Posted by Wayne Rasband on May 18, 2008; 5:40pm
URL: http://imagej.273.s1.nabble.com/Get-data-from-Summary-window-tp3696193p3696194.html
> 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]);
-wayne