Skip to content

Bounding box ignores inverse flag #34

Description

@StefanoPierini-Codra

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.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions