Summary
When creating regions of interest (ROIs) from contour detection or blob
detection, DataLab currently replaces any pre-existing ROIs on the image.
If ROIs are already defined, a confirmation popup warns the user that the
existing ROIs will be lost.
I propose to change this behavior so that newly detected ROIs are appended
to the existing ROIs instead of replacing them. As a consequence, the
confirmation popup is no longer needed and can be removed.
Current behavior
-
Running a detection with ROI creation enabled (create_rois=True) on an image
that already has ROIs triggers a warning dialog:
Regions of interest are already defined for this image.
Creating new ROIs from detection will replace the existing ones, which will
be lost.
Do you want to continue?
-
If the user confirms, the existing ROIs are discarded and replaced by the
newly detected ones.
Proposed behavior
- Newly detected ROIs (from contour and blob detection) are added to the
image's existing ROIs rather than overwriting them.
- The confirmation popup in
preprocess_1_to_0 becomes unnecessary and is
removed.
Rationale
- Appending is non-destructive: the user never loses previously defined ROIs.
- Removing the popup streamlines the workflow (one less confirmation click).
Affected repositories
- DataLab (
DataLab-Platform/DataLab): GUI confirmation dialog and tests
- Sigima (
DataLab-Platform/Sigima): apply_detection_rois ROI merge logic
Summary
When creating regions of interest (ROIs) from contour detection or blob
detection, DataLab currently replaces any pre-existing ROIs on the image.
If ROIs are already defined, a confirmation popup warns the user that the
existing ROIs will be lost.
I propose to change this behavior so that newly detected ROIs are appended
to the existing ROIs instead of replacing them. As a consequence, the
confirmation popup is no longer needed and can be removed.
Current behavior
Running a detection with ROI creation enabled (
create_rois=True) on an imagethat already has ROIs triggers a warning dialog:
If the user confirms, the existing ROIs are discarded and replaced by the
newly detected ones.
Proposed behavior
image's existing ROIs rather than overwriting them.
preprocess_1_to_0becomes unnecessary and isremoved.
Rationale
Affected repositories
DataLab-Platform/DataLab): GUI confirmation dialog and testsDataLab-Platform/Sigima):apply_detection_roisROI merge logic