Combining multiple ROIs as a closed object


Problem Definition: I have an image with very high resolution (EM images). I would like to define a ROI which is huge & so I can only manually do. I am trying to draw many small ROIs & combine them.
Basically when I am combining these small ROIs which should be essentially be a closed object & I would fill it and convert to a mask for my future use.
Query: When I am using the option of combine or AND in the ROImanager options I am not successful. It is not taking it as a continuous object & so it is not filling it.

Example image: In the below image, I have totally 7 ROIs. In that ROIs 5, 6, 7 are the ones which I generated to connect 1,2,3,4 ROIs. How do I combine this 7 ROIs so that I would get a closed object so that I can fill that?
Any suggestions in this regard will be of great help.


Am I right in assuming that you’re using the Freehand Line selection? There’s no straight-forward way to combine line selections to area selections in ImageJ. You can however

  • OR-combine the line selections,
  • create a mask (Edit > Selection > Create Mask) and
  • fill that mask using the Flood Filler .

Is there anything that keeps you from using the Freehand selection?

Alternatively, would the Selection Brush Tool work for you?

Hi Jan Eglinger,

Thanks for your reply.

Yes I am using freehand line selection tool

Yes. Because as I had mentioned that image is of high resolution I have to zoom in every region to select the ROI. So I will not be able to select the entire object at one time. To be very simple, Lets assume a very big circle, So I am going to each boundary region of the circle & draw the boundary line by line (as ROIs). So I will not be able to use the Freehand selection tool. Hope I am clear.

Yes I tried this. Not working. But i tried slightly differently which worked i.e. as follows,
OR-combine the line selections,
Draw the selected lines in an new image exactly of same size
Then selected the drawn lines using magic wand tool as a single selection
Then Fill (Ctrl +f).
It worked !!!
Thanks for the suggestion.


As we are in the topic of EM Imaging, what about using an arealist from TrakEM2?

You can load the full data, zoom in very strongly and draw the outline of your region, then pan and more and keep drawing. At the end you can export it as a mask.

If this step needs to be done manually anyway, it might benefit using TrakEM for this…

1 Like