Login  Register

Re: Getting the selected points

Posted by Stephan Saalfeld on May 19, 2009; 12:21pm
URL: http://imagej.273.s1.nabble.com/Getting-the-selected-points-tp3690467p3690468.html

int[] ( PointRoi )ImagePlus.getRoi().getXCoordinates();
int[] ( PointRoi )ImagePlus.getRoi().getYCoordinates();

http://rsb.info.nih.gov/ij/developer/api/ij/gui/PolygonRoi.html#getXCoordinates()

those are unfortunately relative to the bounding box of the Roi which
you can get by

( PointRoi )ImagePlus.getRoi().getBounds()

http://rsb.info.nih.gov/ij/developer/api/ij/gui/Roi.html#getBounds()

I am looking forward to writing the next line of your Plugin ;)

Best,
Stephan


On Tue, 2009-05-19 at 13:58 +0200, Juanjo Vega wrote:

> Hi again!
>
> The macro recorder is a very useful tool, but after placing two
> points
> in the image, I want to get their coordinates and I can't find a way
> to
> do this.
>
> I can't find even an option in the menu so I can get it from the
> macro
> recorder.
>
> Any idea?
>
> Thanks!, and sorry for inconvenience, but I'm just a begginner.
>