Drawing a circle around a point


#1

Currently, I have the center points of the blobs which may be circular/non-circular. I want to create a circle of defined radius around the center of the blob. I would like the process to be automatic so that the overlay circle around the center is added as an ROI into the ROI Manager.


#2

The drawOval macro function should have everything you need (after doing a little bit of math to get the x and y start coordinates from your center and radius).


#3

I got the circle on the image. But it is not able to add to the ROI Manager as an ROI. Gives a prompt: “Active image doesn’t have a selection”


#4

I think the function that you have to use is makeOval instead of drawOval


#5

Just for the record:
If your question is related to the problem mentioned in your other thread
http://forum.imagej.net/t/convert-variations-in-2-d-boundary-to-1-d/9829?u=herbie
then you should be aware that drawing a reference circle (circular selection) is not required. All you need is the transformation center.

Regards

Herbie


#6

Yeah, makeOval is the function instead of drawOval.

Many Thanks,
kbimagej


#7

Yes, sorry, I confused the two functions. Thanks for rectifying!