Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix loading of empty segmentation #7609

Merged
merged 2 commits into from Feb 29, 2024

Conversation

lassoan
Copy link
Contributor

@lassoan lassoan commented Feb 29, 2024

NRRD file cannot be created without voxel data, so an 1x1x1 array was used as image data. However, when the empty segmentation was loaded then this single-voxel geometry was treated as a valid geometry. Fixed by detecting this special case of a single voxel in the segmentation, and considering the geometry invalid in this case.

fixes #7576

@lassoan lassoan added this to the Slicer 5.7 milestone Feb 29, 2024
@lassoan lassoan self-assigned this Feb 29, 2024
NRRD file cannot be created without voxel data, so an 1x1x1 array was used as image data.
However, when the empty segmentation was loaded then this single-voxel geometry was treated as a valid geometry.
Fixed by detecting this special case of a single voxel in the segmentation, and considering the geometry invalid in this case.

fixes Slicer#7576
…st1.cxx

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
@lassoan lassoan merged commit 37d06b5 into Slicer:main Feb 29, 2024
4 of 5 checks passed
@lassoan lassoan deleted the fi-empty-seg-loading branch February 29, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Threshold Ranger Issue: Not Working When Saving and Restoring Scene with Segment Editor open
2 participants