Specifying Coordinates using ROI Manager

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

Specifying Coordinates using ROI Manager

Grant Kulik
Using ImageJ, I have been trying to create concentric circles of radii 100
pixels, 200 pixels, and 300 pixels (using the specify tool in ROI manager)
around the centroid of a region that I have outlined using the freehand
draw tool. However, I have encountered two problems:

1) After selecting specify and typing in the coordinates of the centroids
of the regions I have drawn, I have noticed that after I measure all of the
ROI's centroids, the centroid of my outlined region and the centroids of
the concentric circles are not the same even though I used the coordinates
of the centroid of my drawn region to create the concentric circles around
that location. Is there a way to get the centroids of my freehand drawings
and the concentric circles to match?

2) When I select specify and type in the coordinates of the centroid of my
outlined region that I wish to create concentric circles around, ImageJ
seems to round my input to 2 decimal places. Is there a way to increase the
precision of the specify option?

Thanks in advance,
Grant

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

Re: Specifying Coordinates using ROI Manager

Michael Schmid
Hi Grant,

unfortunately, support for ROIs with sub-pixel accuracy in ImageJ is far
from complete; most functions still only use the integer values.
The centroid is based on the mask of pixels that are contained in a ROI.
As for all functions that use the mask, the mask has to be at an integer
position. Also, the way how the mask is calculated for a circle uses an
integer diameter of the circle and the integer x and y coordinates of
the bounding rectangle.
--

ImageJ dialog input fields for floating-point numbers do accept more
digits than those of the default value shown.
If the displayed number will be rounded to e.g. 2 digits, you can type
0.1234567 and ImageJ will get that value. Even if you open the same
dialog again and see only two digits '0.12', the full accuracy remains
there unless you change that input field.
The following macro shows it:

   run("Set Measurements...", "area mean redirect=None decimal=2");
   newImage("Untitled", "32-bit black", 20, 20, 1);
   run("Set...", "value=0.1234567");
   getStatistics(area, mean, min, max, std, histogram);
   print("Pixel value is: "+d2s(mean, 8));
   run("Set..."); //allow the user to set the pixel value or leave it
   getStatistics(area, mean, min, max, std, histogram);
   print("Pixel value has been set to: "+d2s(mean, 8));

It won't help for setting oval (circle) ROI coordinates however, if
ImageJ does not support subpixel accuracy there.


Michael
________________________________________________________________

On 2016-07-27 19:41, Grant Kulik wrote:

> Using ImageJ, I have been trying to create concentric circles of radii 100
> pixels, 200 pixels, and 300 pixels (using the specify tool in ROI manager)
> around the centroid of a region that I have outlined using the freehand
> draw tool. However, I have encountered two problems:
>
> 1) After selecting specify and typing in the coordinates of the centroids
> of the regions I have drawn, I have noticed that after I measure all of the
> ROI's centroids, the centroid of my outlined region and the centroids of
> the concentric circles are not the same even though I used the coordinates
> of the centroid of my drawn region to create the concentric circles around
> that location. Is there a way to get the centroids of my freehand drawings
> and the concentric circles to match?
>
> 2) When I select specify and type in the coordinates of the centroid of my
> outlined region that I wish to create concentric circles around, ImageJ
> seems to round my input to 2 decimal places. Is there a way to increase the
> precision of the specify option?
>
> Thanks in advance,
> Grant
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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