Hello Javier (and Laura) -
I think the following scheme could give you a reasonable balance
between convenience and efficiency:
OR (Combine) command of the ROI Manager to combine
all of your ROIs into one big glob. Save it to the ROI Manager, and
measure its area.
Then loop through your original ROIs (still in the ROI Manager) and,
for each one, use the
XOR command to “subtract” it from the glob.
Measure the area of the resulting ROI. The overlap is:
area (glob) - area (subtracted).
If the overlap exceeds your threshold,
Delete the ROI from the ROI
Manager. (It might be more convenient to loop through the entries of
the ROI Manager from the end to the beginning, so that the ROI
deletion doesn’t mess up the ROI index that you are looping over.)
Note that this scheme has the following artifact (possibly relevant,
and perhaps desirable): If a given ROI has a small, below-threshold
overlap with several other ROIs, its combined overlap with all of
them could exceed the threshold, leading to its deletion. If you don’t
want this behavior, I believe that you will have to incur the expense
of looping over all pairs of ROIs and delete based on the individual