Re: help on selection manipulation

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/help-on-selection-manipulation-tp5005474p5005478.html

Hi Wadih,

you can use a macro for getting the point coordinates or the vertices of a polygon - it's the same for both:

getSelectionCoordinates(xCoordinates, yCoordinates) gives you two arrays with the x and y coordinates of the points.
  http://rsb.info.nih.gov/ij/developer/macro/functions.html#getSelectionCoordinates

For printing the coordinates, see the first macro in
  http://rsb.info.nih.gov/ij/macros/SelectionCoordinates.txt


Michael
________________________________________________________________
On Nov 6, 2013, at 17:13, wadih wrote:

> Dear all,
> 1. Do you know of a way to connect the lines of a multipoint selection so as to obtain a polygon. I have multiple selections saved (as multipoint selections) and would like to get the corresponding polygons.
> 2. Is there a way to get the XY coordinates of the different points making up a polygon selection?
> many thanks for your help,
> Wadih

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