Retrieve a multi-plot in a table

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieve a multi-plot in a table

lechristophe
Hi,

What is the simplest way to retrieve a multi-plot in a table (like what is
done manually by pressing "List" in a plot window), but inside a macro or
script ? It seems that Plot window buttons are not recorded by the macro
recorder.

Thanks,

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Retrieve a multi-plot in a table

Rasband, Wayne (NIH/NIMH) [E]
On Oct 26, 2011, at 3:53 AM, Christophe Leterrier wrote:

> Hi,
>
> What is the simplest way to retrieve a multi-plot in a table (like what is
> done manually by pressing "List" in a plot window), but inside a macro or
> script ? It seems that Plot window buttons are not recorded by the macro
> recorder.

In ImageJ 1.45j or later, you can use the PlotWindow.getResultsTable() method to retrieve the contents of a PlotWindow as a ResultsTable. Here is a JavaScript example:

  plotTitle = "Profiles";
  IJ.selectWindow(plotTitle);
  imp = IJ.getImage();
  win = imp.getWindow();
  rt = win.getResultsTable();
  rt.show("Plot Values");

-wayne