Hi Ula,
you can get the coordinates of the 3 points defining the angle tool via the macro command
getSelectionCoordinates(x, y)
This creates two arrays, one with the 3 x coordinates and one with the 3 y coordinates. The middle array elements give the position of the vertex.
The angle can be obtained via
dotprod = (x[2]-x[1])*(x[0]-x[1])+(y[2]-y[1])*(y[0]-y[1]);
crossprod = (x[2]-x[1])*(y[0]-y[1])-(y[2]-y[1])*(x[0]-x[1]);
angle = (180/PI)*atan2(crossprod, dotprod);
[use abs(angle) if you don't care about positive or negative angles]
To get the coordinates for all selections in the ROI Manager, you can write short macro that selects the ROIs one by one and prints the coordinates. See the
http://rsb.info.nih.gov/ij/macros/SelectionCoordinates.txtand
the roiManager("select", index) and roiManager("count") macro functions.
Michael
________________________________________________________________
On Apr 3, 2013, at 12:29, Urszula Zajaczkowska wrote:
> I would like to obtain xy coordinates and angle values in specific points on my cross section microsopic slice.
> This should be a "base" for map of angles design ( arrangement on whole area).
> I have drawn angles using "angle tool" and added all of them using ROI manager, - problem is that I cant obtain their coordinates.
> In roi manager - "measure" tool give me only angle result, but xy coordinates are empty. Even I try export image as xy coordinates - it doesnt work too.
> I would be very grateful for any hint.
> Ula
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html