IJ1 macro: how to get coordinates from a plot that contains more than one (x,y) curve?

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

IJ1 macro: how to get coordinates from a plot that contains more than one (x,y) curve?

lechristophe
Hi,

I'm trying to get the values of a plotted curve that is generated by a
plugin I have no control over. There are several points and curves,
resulting in a table with seven columns (X0, Y0, Y1, X2, Y2, X3, Y3) when I
hit the "List" button. When I try to do this in a macro using
the Plot.getValues(xpoints, ypoints) function (which according to the
documentation "Returns the values displayed by clicking on "List" in a plot
or histogram window "), I get only the two first columns of the table (X0
and Y0). Is there a way to get arrays with the values in the other columns
via a macro function?

Thanks,

Christophe

--
Christophe Leterrier
Researcher
Axonal Domains Architecture Team
CRN2M CNRS UMR 7286
Aix Marseille University, France

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 macro: how to get coordinates from a plot that contains more than one (x,y) curve?

lechristophe
Also, clicking "List" or "Save" in the Plot window does not register
anything in the macro/JS recorder. How can I access the Plot values from a
macro or JS?

Christophe

On Tue, Feb 9, 2016 at 11:29 AM, Christophe Leterrier <
[hidden email]> wrote:

> Hi,
>
> I'm trying to get the values of a plotted curve that is generated by a
> plugin I have no control over. There are several points and curves,
> resulting in a table with seven columns (X0, Y0, Y1, X2, Y2, X3, Y3) when I
> hit the "List" button. When I try to do this in a macro using
> the Plot.getValues(xpoints, ypoints) function (which according to the
> documentation "Returns the values displayed by clicking on "List" in a plot
> or histogram window "), I get only the two first columns of the table (X0
> and Y0). Is there a way to get arrays with the values in the other columns
> via a macro function?
>
> Thanks,
>
> Christophe
>
> --
> Christophe Leterrier
> Researcher
> Axonal Domains Architecture Team
> CRN2M CNRS UMR 7286
> Aix Marseille University, France
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 macro: how to get coordinates from a plot that contains more than one (x,y) curve?

Jerome Mutterer-3
Bonjour Christophe.
This javascript recovers the results table from a plot:

win = IJ.getImage().getWindow();
if (win instanceof PlotWindow) {
plot= win.getPlot();
rt = plot.getResultsTable(true);
rt.show("plot data");
}

Sincerely,

Jerome.




On 9 February 2016 at 11:37, Christophe Leterrier <
[hidden email]> wrote:

> Also, clicking "List" or "Save" in the Plot window does not register
> anything in the macro/JS recorder. How can I access the Plot values from a
> macro or JS?
>
> Christophe
>
> On Tue, Feb 9, 2016 at 11:29 AM, Christophe Leterrier <
> [hidden email]> wrote:
>
> > Hi,
> >
> > I'm trying to get the values of a plotted curve that is generated by a
> > plugin I have no control over. There are several points and curves,
> > resulting in a table with seven columns (X0, Y0, Y1, X2, Y2, X3, Y3)
> when I
> > hit the "List" button. When I try to do this in a macro using
> > the Plot.getValues(xpoints, ypoints) function (which according to the
> > documentation "Returns the values displayed by clicking on "List" in a
> plot
> > or histogram window "), I get only the two first columns of the table (X0
> > and Y0). Is there a way to get arrays with the values in the other
> columns
> > via a macro function?
> >
> > Thanks,
> >
> > Christophe
> >
> > --
> > Christophe Leterrier
> > Researcher
> > Axonal Domains Architecture Team
> > CRN2M CNRS UMR 7286
> > Aix Marseille University, France
> >
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

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