Cross sectional analysis.. cut into 8 equal sectors, with three concentric rings

Hi, this is my first post, as well as my first time ever using Fiji. I have an histological cross section of a femur, and am trying to section it into 8 equal sectors and 3 concentric rings (image of what it should look like). I ultimately would like to quantify the distribution within each of these sectors.

I’m been looking around the forum and have been unsuccessful attempting to do this in Fiji. The closest post I’ve found was this one one… I can get it to run, but the circle is quite small (although I think this may be a user error) and includes the center cavity, which is ultimately nothing/background.

Overall goal is to apply a LUT (which I have successfully done) and quantify the pixels/colors in each sector. I’d be happy to settle for just he 8 slices and not the 3 rings, but I figured while I’m here I would ask!

This is my first post, so I’ll post reference images below.

I do have a chunk of old Optimas code, but I haven’t quite figured out how to use it in Fiji. I am not the original creator of this code though.

1 Like

Radial sectors with concentric rings.pdf (156.7 KB)

Hi @k.b ,

Welcome to the forum!

Nicely done finding that and getting it to run. If I understand it right, that macro asks you to draw a line before making the circles right? How are you drawing the line? If you post the result, maybe we can help you figure out what to do to make that macro output what you need.


Thanks for the quick response!

These are a few screen shots. First is just the one quadrant, the second is when I’m in the ROI manager (show all). Ideally it would be more like the above image, so three rings within the cross-section, not the entire circle. Getting it to fit also seems tricky, in Optimas there were designated points (which I think I can do with the multi-point tool, but haven’t quite figured it out).

One section

Eight sectors

Radial sectors with concentric rings

Hi all and thanks for finding that Olde macro useful :partying_face:

Now seeing the gorgeous images and the attached PDF, I see that we are almost there, but it seems that the “custom macro” they use in there does some sort of segmentation first, which I would be happy to assist with.

Would it be possible to share the original data? I see that your image is a PNG in color and that the original image has a lookup table applied to it. Is the original also color? Or is it in greyscale?

Let us know and welcome to the forum!



Thanks for the info!

If you could indeed share a raw tiff image using some file sharing service, this would allow us to see the kinds of challenges you would be facing.



Hello again,

This project was very interesting and that’s why it took a while…

I am not sure if is is as complete as it could be, but I hope it’s a good start.

You will find the macro code in the gist below

I ran it on the image you provided and it seems to work.

I have added quite a bit of comments in the hope that they will let you navigate the logic behind it. However, admittedly, it it definitely not obvious to understand. Do not hesitate to ask if you have questions!

This method will fail in case there is a “cut” in the bone (as in, it expects the inner hole not to be connected to the outside).

The result is already quite nice, and I have not added the measurements part. But for that last part, you should just use the “Measure” command from the ROI Manager.

Let me know.


PS: Full disclosure, I saw the code from this “Optimas” because it was in the shared folder you provided. But I understood absolutely nothing of how it’s written :laughing: . Most of the code I am providing (Especially the part about the relative distance calculation) actually stems from another project I was working on.


This is great! Logic behind it all made complete sense and I was able to follow along easily. Furthermore, this absolutely sliced it into eight segmented radial sectors with three concentric rings.

For me, nothing popped up in the ROI manager (not like normal); however, this was a non-issue for me since you can just select the section you want to measure/analyze.

Thank you so much for your help and time!