fix: convert segment index error to warning with graceful skip - #147
Closed
igoroctaviano wants to merge 1 commit into
Closed
igoroctaviano wants to merge 1 commit into
igoroctaviano wants to merge 1 commit into
Conversation
When a SEG frame is missing SegmentIdentificationSequence in both per-frame and shared functional groups, the code now logs a warning and skips that frame instead of throwing an error that aborts the entire segmentation loading. This follows the same pattern already used for missing imageIds (lines 587-589) and makes SEG loading more resilient to non-standard or incomplete DICOM SEG files. Per DICOM PS3.3 C.8.20.3.1, SegmentIdentificationSequence is required for LABELMAP segmentations, but graceful degradation is preferred over hard failure when encountering non-compliant files.
igoroctaviano
requested a deployment
to
fork-pr-approval
October 6, 2026 10:18 — with
GitHub Actions
Queued
This branch is being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a SEG frame is missing
SegmentIdentificationSequencein both per-frame and shared functional groups, the code now logs a warning and skips that frame instead of throwing an error that aborts the entire segmentation loading.Error fixed:
Change:
This follows the same pattern already used for missing imageIds (lines 587-589) and makes SEG loading more resilient to non-standard or incomplete DICOM SEG files.
DICOM Compliance:
Per DICOM PS3.3 C.8.20.3.1,
SegmentIdentificationSequenceis required for LABELMAP segmentations, but graceful degradation is preferred over hard failure when encountering non-compliant files.Related: