Skip to content

ROIs created by detection cannot be deleted or modified #329

Closed

Description

@StefanoPierini-Codra

Summary

When a detection function (e.g., Blob detection OpenCV) creates ROIs on an
image via the "Create ROIs" option, these ROIs cannot be deleted or modified.
Any attempt to remove or change them causes the ROIs to immediately reappear.

Affected versions

  • DataLab: all versions with ROI creation from detection (since the
    create_rois option was introduced)

Steps to reproduce

  1. Open DataLab
  2. Create a test image: Create > 2D Gaussian (or any image with visible features)
  3. Run Analysis > Blob detection (OpenCV) with the "Create ROIs" option enabled
  4. ROIs are created around detected blobs ✓
  5. Try to delete all ROIs via ROI > Delete all ROIs
  6. Result: the ROIs immediately reappear

The same issue occurs when trying to:

  • Delete individual ROIs
  • Modify ROI positions or sizes
  • Invert ROI selection

Activity

  1. StefanoPierini-Codra commented on May 29, 2026

    @StefanoPierini-Codra
    ContributorAuthor

    After postprocess_1_to_0_result successfully creates ROIs, the parameter param.create_rois needs to be set to False in the stored object: this avoids ROI to be recreated every time, interfering with user edits.

    This has been fixed.

    Additionally there were a bug when a ROI was moved or deleted, generating an unwanted error do to changed ROI register size: this was fixed too.

  2. StefanoPierini-Codra commented on May 29, 2026

    @StefanoPierini-Codra
    ContributorAuthor

    Even after the fix, ROIs would still reappear when the user clicked "Delete All". This happened because the deletion triggered a re-computation using the original blob detection parameter, which automatically recreated the ROIs.

    To solve this, ROI creation is now deactivated immediately after the initial blob detection. This way, if the user deletes the ROIs, they are no longer automatically recreated.

  3. added this to the V1.3.0 milestone on Jun 8, 2026
  4. ThomasMalletCodra commented on Jun 23, 2026

    @ThomasMalletCodra
    Contributor

    review and merged in : 9290413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions