I am working on an image having 8 concentric imperfect circles. I want to measure the change in the radius of the circle and to prepare a histogram. I know the idea how to do it mathematically, to transform the image into polar coordinates and measure the length in terms of (theta, r). Can anyone help me how to do it using imagej? Below is the sample image.
Good day,
take a look at the ImageJ-plugin “Polar_Transformer”:
https://imagej.nih.gov/ij/plugins/polar-transformer.html
The problem is who to find the best center location…
(My estimation resulted in: x = 739 and y = 655)
Please avoid using JPG-compressed images!
Here is my result image (720 angles):
Regards
Herbie
Thanks Herbie for your prompt response.
Just to upload on the forum I used jpeg compression because the original file size was big.
So, you successfully transformed the image into polar coordinates, but my problem is to measure the radius at every angle. And to know the difference in the radius for all irregualr circle.
Please help me how to do that as I am new to imagej.
Regards,
Aftab.
I know the idea how to do it mathematically, to transform the image into polar coordinates and measure the length in terms of (theta, r).
You were asking for the polar transformation and I provided the solution. Now, where do you see a problem?
Clueless
Herbie
Now, how I will measure the difference in radius or get coordinates in terms of (r,theta) for each circle in imagej
I don’t understand your question, as the radius is given in the polar transform along the x-axis.
Regards
Herbie
PS:
For the inner circle I get a mean radius of 229.56pel with a STD of 5.6pel.
As the circles are imperfect, I’d calculate their average radii from their surface measured. The latter could be done with the wand tool clicking in the center circle (ie. (width/2,height/2)), measure the surface area, wiping the circle by enlarging the ROI and filling with white, thus effectively removing the innermost circle, rinse and repeat.
Your basic macro:
run("System Clipboard");
getDimensions(width, height, channels, slices, frames);
imageSize=width*height;
run("8-bit");
setAutoThreshold("Default");
run("Threshold...");
run("Convert to Mask");
run("Skeletonize");
do{
doWand(725, 650);
List.setMeasurements;
run("Measure");
run("Enlarge...", "enlarge=2");
run("Fill", "slice");
run("Select None");
finished=(imageSize == List.getValue("Area"));
}while (!finished);
Nice Eljonco,
but how do you determine what the original poster wanted to obtain?
I want to measure the change in the radius of the circle and to prepare a histogram.
(Emphasis by me.)
Regards
Herbie
I need to obtain a plot showing the change in the radius on Y axis and theta in the x-axis for all circle.
I hope you are getting now.
Aftab.
Will you please tell me. How you calculated this?
Aftab
Will you please tell me. How you calculated this?
Select the desired line and then save the co-ordinates per “Analyze >> Tools >> Save XY Coordinates…”
Regards
Herbie
Yes, exactly this is what I need.
But I do it and how to extract the values of theta and radius from your above plot.
Aftab.
I had taken this as a much simpler problem, from the radii calculated, how can
you plot the change [in radius][between the radii], as in ‘what is the variation in annual growth rate of a tree with year rings as shown in the image’.
Apparently (the polar plot gave the clue I missed) it was about the variation within radius for each imperfect circle.
I measured the radii again and get the following values:
- r = 230.11 ± 4.72
- r = 330.18 ± 5.71
- r = 400.48 ± 5.25
- r = 462.79 ± 5.5
- r = 515.48 ± 7.03
- r = 565.56 ± 8.00
- r = 607.56 ± 10.8
- r = 652.4 ± 8.66
HTH
Herbie
That’s great, what I was looking for. Please let me how you get these values step by step.
I will be grateful to you.
Aftab
Please read my posts carefully:
Select the desired line and then save the co-ordinates per “Analyze >> Tools >> Save XY Coordinates…”
If you need more statistics than mean and STD, you should skeletonize the lines first.
(I recommend to work with the original polar transform, i.e. not with the rotated version I posted later.)
In any case, please study the relevant sections of the ImageJ user guide:
https://imagej.nih.gov/ij/docs/guide/index.html
Regards
Herbie
Thanks alot for your help.
Finally I got it.
Aftab
I got the way to do, but the only I am facing to select the lines precisely from the polar image which you have provided using the wanding tool
What’s wrong with using the Wand Tool?
Regards
Herbie