|
> I need to get the coordinates of a PointRoi in a plugin. But i did not
> find such method in this class. How to do this?
Polygon p = roi.getPolygon();
for (int i=0; i<p.npoints; i++)
IJ.log(i+": "+p.xpoints[i]+","+p.ypoints[i]);
Works for all other selection types as well.
In a macro use
getSelectionCoordinates(x, y);
for (i=0; i<x.length; i++)
print(i+": "+x[i]+","+y[i]);
-wayne
|