Semi automatic annotation of 2D image based on specific features

Hello,

For this project I am working on, I am trying to use Python to draw a circle where the circle’s edge sits on an outline of a specific feature in a 2D image. I would like the program to be able to automatically identify the structure in the image and draw the circle.

Here is a manually drawn circle as an example of what I am trying to do:

image

The reference image has been rescaled so the pixels are anisotropic.

I don’t really have experience with 3D Slicer and its libraries though I am experienced with Python so I would like some guidance on where to start.

Cheers,

calrnence