Roi manager measurements for map

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Roi manager measurements for map

Ula Zajaczkowska
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
Reply | Threaded
Open this post in threaded view
|

Re: Roi manager measurements for map

Jean-Philippe Grossier
I don't know if this will be helpfull but you can go in the ROI manager to
More>>List and get a list of all your ROIs with xy centers.

jean-philippe


2013/4/3 Urszula Zajaczkowska <[hidden email]>

> 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
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Roi manager measurements for map

Michael Schmid
In reply to this post by Ula Zajaczkowska
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.txt
and
  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