Login  Register

Re: Plot.getValues(values, counts);

Posted by GAUTAM SHANKAR on Jul 12, 2010; 6:26pm
URL: http://imagej.273.s1.nabble.com/Plot-getValues-values-counts-tp3687639p3687644.html

Wow, I could have swore I tried the same thing..

Anyways, It works now. THANKS SO MUCH. I was stuck on this one for a while.

On Mon, Jul 12, 2010 at 10:26 AM, Jerome Mutterer <
[hidden email]> wrote:

> On Mon, Jul 12, 2010 at 7:11 PM, GAUTAM SHANKAR <[hidden email]>
> wrote:
>
> > Thanks for links guys, but I just don't know how to implement.
> >
> >
> OK, here is some sample java code :
>
> IJ.run("Plot Profile");
> float[] xvalues = new float[0];
> float[] yvalues = new float[0];
> ImagePlus imp = IJ.getImage();
> ImageWindow win = imp.getWindow();
> if (win!=null && win instanceof PlotWindow) {
>  PlotWindow pw = (PlotWindow)win;
>  xvalues = pw.getXValues();
>  yvalues = pw.getYValues();
> }
> IJ.log(IJ.d2s(xvalues.length));
>
>
> Jerome
>