Login  Register

Re: Data from summary window

Posted by Tiago Ferreira-2 on Nov 27, 2014; 2:48pm
URL: http://imagej.273.s1.nabble.com/Data-from-summary-window-tp5010658p5010659.html

Hi David,

On Nov 27, 2014, at 09:00, davek604 <[hidden email]> wrote:
> It's a straightforward task to get results from the Results Table but there
> doesn't seem to be any plugin commands to achieve this for the Summary
> table.

The following should work:

import ij.IJ;
import ij.WindowManager;
import ij.measure.ResultsTable;
import ij.text.TextWindow;

TextWindow tw = (TextWindow)WindowManager.getFrame("Summary");
if (tw!=null) {
    ResultsTable st = tw.getTextPanel().getResultsTable();
    IJ.log("1st row of Summary:\n"+ st.getRowAsString(0));
} else {
    IJ.log("Summary window not found");
}


-tiago

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