Fallback to shared groups on missing per frame tag#632
Merged
Enet4 merged 7 commits intoEnet4:masterfrom Feb 14, 2025
Merged
Conversation
Enet4
reviewed
Feb 5, 2025
Owner
Enet4
left a comment
There was a problem hiding this comment.
Thank you for working on this! Just leaving a minor suggestion inline and should be ready to merge.
Co-authored-by: Eduardo Pinho <enet4mikeenet@gmail.com>
Contributor
Author
|
Updated as suggested, thanks for the prompt review |
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.
Some DICOMs provide tags under
SharedFunctionalGroupsSequencethat are not present underPerFrameFunctionalGroupsSequence. In such cases, getter functions likewindow_width()will return an empty vector rather than falling back to a check onSharedFunctionalGroupsSequence. Thus a guard is needed so that whenPerFrameFunctionalGroupsSequenceexists but does not contain the target tag, a fallback check onSharedFunctionalGroupsSequencewill happen.This PR implements such a guard by modifying
get_from_per_frame()andget_from_shared()such that empty iterator returns are instead mapped toNone. The existing logic of the getter functions will then fall back to a shared check.