Selecting annotations by circularity?

Hi, I’m hoping someone can help with this - I’ve hit a roadblock in my analysis workflow.

I’m trying to measure staining around blood vessels (the black holes) in terminal villi (round objects) in placental tissue. I can successfully detect the villi I want (based on tissue detection and size of object) and I can detect the vessels within them. But now I need to only keep those vessels that are close to circular (ie: exclude the ones indicated by the arrows in the image) and I’ve hit a road block. I effectively want to do something along the lines of Analyse Particles in ImageJ and keep only those over a particular circularity.

I’m used to coding ImageJ macros but am new to Java/Groovy so would appreciate some pointers. How do I access circularily measurements (or area and perimeter so I can calculate it myself)? I’ve managed to get Area measurements within a script but not perimeter. At the moment I have the blood vessels as detections but could just as easily have made them annotations if that makes the scripting easier.


If you use something like


Does that work?
Alternatively, the command can be found in the Analyze->Calculate feature->Shape features

Also, if you only want a subset of objects, you can use:

Ah, thankyou, I knew I’d be missing something simple!

1 Like