Login  Register

Re: Results Table I/O

Posted by David Webster on Dec 04, 2009; 9:05pm
URL: http://imagej.273.s1.nabble.com/Re-Results-Table-I-O-tp3690223p3690224.html

Wayne,

Is this open/saving ith a file or is it at the system level. I.e. is the
table being stored internaly?

David

On Fri, Dec 4, 2009 at 9:55 AM, Wayne Rasband <[hidden email]> wrote:

> > I would like to be able to write programs that would input
> > results tables and output new results tables. I can do this
> > now as long as the table I input is an open system results
> > table. But, the new table doesn't seem to be "inputable" by
> > a subsequent Plugin  unless I first export it then import it
> > back into ImageJ. This is clumsy. Is there anyway to
> > directly input an open results table into a plugin if it is
> > not the system table?
>
> You can do this with the Image 1.43m daily build, which adds open() and
> saveAs() methods to the ResultsTable class. Here is a JavaScript example
> that demonstrates how to use these new methods:
>
>   if (IJ.getVersion()<"1.43m")
>      IJ.error("Requires v1.43m or later");
>   if (Analyzer.getCounter()==0)
>      IJ.error("Results table is empty");
>   rt = Analyzer.getResultsTable();
>   rt.saveAs("");
>   rt = ResultsTable.open("");
>   rt.show("My Results Table");
>
> -wayne
>