Problem description
get_data(roi_index) uses single_roi.get_bounding_box() to crop the data. This always returns the bounding box of the ROI shape itself. For an inverse ROI (where the exterior is the region of interest), this crops to the wrong area — the small rectangle inscribing the shape, where most pixels are masked.
The same issue affects compute_geometry_from_obj in sigima/proc/image/base.py, which applies a coordinate offset based on get_bounding_box() — incorrect for inverse ROIs where the data covers the full image.
Proposed solution
In case of inversed ROI, get_bounding_box() must return the whole image.
Problem description
get_data(roi_index) uses single_roi.get_bounding_box() to crop the data. This always returns the bounding box of the ROI shape itself. For an inverse ROI (where the exterior is the region of interest), this crops to the wrong area — the small rectangle inscribing the shape, where most pixels are masked.
The same issue affects compute_geometry_from_obj in sigima/proc/image/base.py, which applies a coordinate offset based on get_bounding_box() — incorrect for inverse ROIs where the data covers the full image.
Proposed solution
In case of inversed ROI, get_bounding_box() must return the whole image.