I am wondering if anyone knows of a way on ImageJ to fit a circle in a binary mask (see red circle in attached image) . Thanks in advance. Ideally the algorithm should try to find the best area on the image that can fit a circle. Thanks!

Hi Mongoose,

It is hard to help you as how would you define â€śfinding the best area on the image that can fit a circleâ€ť. What is your criteria to say that that is the best place to fit a circle? The simplest I know is where to fit the largest circle into your ROI.

You could try computing something like the local curvature of your ROI and where it remains similar, fit a diskâ€¦?

(working code in progress)

I have a small â€śFit largest inscribed circleâ€ť plugin, though I donâ€™t think this will be what you expect.

Here is an example with your data, I colored the ROIs using the BAR plugin ROI color coder.

Hi @oburri,

Thanks for the help and explanation. Maybe your tool could be helpful for my problem. Is it available as a plugin in Fiji to try it out? I cannot seem to be able to find it on the menus.

Thanks,

Alex

Beautiful plugin!

From the pluginâ€™s wiki page:

This plugin is available from the BIOP Update Site This places it in a â€śBIOPâ€ť Folder in the plugins directory of Fiji/ImageJ