Creating Two ROI to Drag Around Screen


We wish to create an overlay that looks like a doughnut. This overlay could then be dragged about the screen for a visual examination using the different regions.
How does one do this please?

  • (The “Make Band” command does not allow one to create a large enough doughnut).(Other Donut Question on Forum).
  • The “Concentric Circles” command doesn’t allow one to drag the overlay about.

I have done this previously, but after trying for 1.23days, i am going to ask.
Thank you for any assistance you can offer.


Interesting, yes, the Edit > Selection > Make Band… command is limited to bands of 255 pixels at maximum.

You can create the outer circle ROI first, then press Alt and create the inner circle to bu subtracted from the first ROI (see the documentation about composite selections).

In IJ1 macro code, this looks as follows:

makeOval(50, 50, 200, 200);
makeOval(75, 75, 150, 150);

… where you should be able to put arbitrary large numbers.


Thank You Jan!
You are a life saver!
“Composite Selection” was what escaped my mind.


Good day Mark,

here is an alternative approach to that of Jan as a ImageJ macro:

makeOval(92, 115, 20, 20);
run("Enlarge...", "enlarge=50");




Thank You Herbie,
The Edit > Selection > Enlarge… command bumped into the same limit of 255 pixels as the Edit > Selection > Make Band… command. :face_with_raised_eyebrow:
I tried your method of using “XOR” before and it didn’t work for me. But i just tried it again after reading your suggestion and it worked! Previously, i was drawing the larger of the two circles first. Performing the order as you suggested, smaller of the two first) worked perfectly. It seems i did everything wrong that i possibly could - time to read about XOR.
Thank you for your insight and suggestion!