Hi,
On Mon, 22 Jul 2013, greendoki wrote:
> how can i do Get (straight) line coordinates ? in java because i'm
> writing a plugin. actually i need the first and last coordinates but
> nevermind i need all of them.
From your description I *guess* that you are talking about segmented line
selections.
For those, you can cast the result of imp.getRoi() to PolygonRoi and
obtain the coordinates via getXCoordinates() and getYCoordinates(). Beware
that
1) the resulting arrays may be larger than what getNCoordinates() returns,
but only that number of entries is actually valid
2) the coordinates are relative to the bounding box, so you will have to
call "Rectangle bounds = roi.getBounds();" and then add bounds.x and
bounds.y to the x and y coordinates, respectively.
For an example, see:
http://fiji.sc/Introduction_into_Developing_Plugins#Regions_of_interestCiao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html