According to some issues mentioned in tested checklists, the erase tool does not work correctly:
Description
Revisions and Commits
Restricted Differential Revision | |||
rMITK MITK | |||
Restricted Differential Revision | rMITKe5f00365d075 T29078-Fix_erase_tool | ||
Restricted Differential Revision | rMITK484f6d6cb126 Preperation of new Close tool icons with placeholder. | ||
Restricted Differential Revision | rMITK815d672a3d46 Fixed typos | ||
Restricted Differential Revision | rMITK7014afcb419e Added documentation of close tool | ||
Restricted Differential Revision | rMITK89566de2f706 BREAKING: Removed obsolete class SetRegionTool. | ||
Restricted Differential Revision | rMITK092abf8914f9 prevent crashes if the active label is not in the active label set | ||
Restricted Differential Revision | rMITK307bd227e0aa Added close tool | ||
Restricted Differential Revision | rMITK271839f8fd19 Reworked signature of GenerateFillImage to move the lock check logic | ||
Restricted Differential Revision | rMITK43d1853aad0f fixed compile error | ||
Restricted Differential Revision | rMITK30bb7f9eca23 Addapted documentation to new fill tool behavior. | ||
Restricted Differential Revision | rMITKd7cef5bfe428 Introduced new base tool for region filling | ||
Restricted Differential Revision | rMITKdffc8d43c586 BREAKING: Switched FillRegion and EraseRegion to new FillRegionBase tool. | ||
Restricted Differential Revision | rMITK1c5f71f86d9a Refactored IsPositionEventInsideImageRegion to be available via |
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | kislinsk | T28479 [Segmentation] Rethink / reevaluate our existing segmentation tools / algorithms | ||
Resolved | floca | T29132 [MultiLabel Segmentation] Define desired behavior of fill / erase tool | ||
Resolved | floca | T29078 [Segmentation] Erase tool has unclear edge cases |
Event Timeline
Erase tool is the inverted Fill tool
- Erase works on the whole slice (for the currently selected label) when clicking on the background label and the clicked region touches every single border pixel.
- Erase works only for the selected label but still the preview snaps to other labels if clicked into them resulting basically in a no-op.
Erase is just an inverted fill tool but this is unintuitive in some cases. It fills the clicked area and if that filled area has holes they are filled as well.
Example 1
When you click on any of the background areas, everything that is enclosed by it is erased ignoring any holes. So clicking in the innermost background will erase only the bulls eye but clicking on the outer background ring will erase both the bulls eye and the innermost ring. Clicking on the background completely outside will erase everything since nothing touches the border of the image.
Example 2
Clicking in the background will not delete everything since the label touches the border. Clicking inside the C will do nothing. Clicking outside the C will do nothing as well. Both times the background areas are highlighted but since they do not completely enclose the red label in both cases, it is not deleted. So as soon as a label touches the border even a single pixel, you cannot delete it by clicking on the background.
Suggestion
(A) If we decide that erase should only work on the selected label:
- Only do something when clicking into the actual, selected label
- Do not show any preview when clicking on background or other labels
(B) If we decide that erase should work on all (unlocked) labels:
- Make sure the tool can be activated all the time, even without any selected label
- Show previews and apply them on all clicked areas of unlocked labels
In case we still want the "delete everything when clicking on background", in both cases the result would be something different according to the rules but still it would be a special case that has to be checked explicitly. If clicked pixel is background, than delete "everything" according to what that means in (A) or (B).
I updated the checklists to make the description more clear, when it comes to clicking on the background. It is hard to explain how the tool behaves, although for me it is clear what happens.
We discussed on it.
Result follows largely @kislinsk comment and option (B), but there it should behave like a gimp floodfill (with background).
Thus: I can erease any unlocked label by clicking on it, but i will only erase the connected parts of this very label.