Combine selections (OR) command produces incorrect results with fully overlapping ROIs
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 350
- PR merge metrics
- No merged PRs in 30d
Description
From: http://forum.imagej.net/t/sum-of-areas-with-the-command-or-combine/11467/3
Combining overlapping ROIs which include a non-primitive shape produces an inaccurate area measure. I would expect a fully overlapping ROI to have no effect on the area measure of the enclosing ROI.
Steps to reproduce (IJ1 code):
> roiManager("reset");
> run("Clear Results");
> close("*");
> run("Set Measurements...", "area redirect=None decimal=3");
> newImage("example", "8-bit black", 512, 512, 1);
> makePolygon(82,236,173,138,310,133,427,169,428,347,230,404);
> roiManager("Add");
> makeOval(241, 218, 70, 70);
> roiManager("Add");
> roiManager("Select", 0);
> run("Measure");
> roiManager("Select", newArray(0,1));
> roiManager("Combine");
> run("Measure");
Note that in my testing a freehand selection appears larger after combining with a fully overlapping oval, while a segmented ROI (as above) appears smaller.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided IJ1 macro, especially roiManager("Combine") and the subsequent Measure calls, using the polygon and oval inputs shown. Compare the measured area before and after combining fully overlapping ROIs, including the noted freehand and segmented cases. Done means a fully overlapping ROI does not change the enclosing ROI's area.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100