Page MenuHomePhabricator

[ROI] Handle negative spacings
Closed, ResolvedPublic

Description

Negative spacings currently result in flat ROIs or, in case of conversion from a bounding shape, to the wrong ROI position after loading the ROI again.

Screenshot 2024-01-02 145607.png (458×788 px, 45 KB)

Event Timeline

kislinsk triaged this task as Normal priority.Jan 2 2024, 3:13 PM
kislinsk created this task.
kislinsk renamed this task from [ROI] Support negative spacings to [ROI] Handle negative spacings.Jan 8 2024, 2:52 PM

Assessing the whole negative pixel spacing situation in MITK and in general (s.a. DICOM Correction Item: Pixel Spacing may not be negative), I conclude that we shouldn't support negative pixel spacing in ROIs, as it introduces a whole domain of obscure edge cases. Also note that while MITK geometries keep their spacing values absolute (checked by asserts), the transform matrix still contains negative values in its main diagonal, leading to all the visual and positional effects/mismaches that can be seen with ROIs generated from images/bounding shapes.

I will introduce a check for negative pixel spacing, though, just like I did for rotated geometries already (currently unsupported).

Deleted branch from rMITK MITK: bugfix/T30305-HandleNegativeSpacingInBoundingShapeToROIConversion.