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

Adds all new VRs up until DICOM standard 2021a, fixing decoding failures when trying to read newer DICOMs with VRs of e.g. UC, UR, OV, etc. #116

Closed
wants to merge 6 commits into from

Conversation

Sethur
Copy link

@Sethur Sethur commented Apr 1, 2021

Sometime between 2014 and 2021, the default handling for the tag length of new explicit VRs also changed (it defaults to 4 bytes now as opposed to 2 bytes) and a range of new VRs having a 4 byte tag length was introduced.

Unfortunately, the current implementation of the DicomDecoder class means that it is not able to properly distinguish between implicit and explicit VR DICOM Data Sets and assumes explicit only if the respective 2-byte-snippet matches a known VR. As a consequence, all future new VRs have to be added explicitly to the DicomDecoder class to prevent errors until the standard is implemented in a more complete way (having a proper default tag length of 4 bytes for explicit VRs would have prevented decoding errors for the new VRs from 2014 even if they would not have been explicitly know to the DicomDecoder class).

This pull request adds all new VRs up until the DICOM standard 2021a to the DicomDecoder class.

Updated DicomDecoder class to include the remaining official 4-bytes-element-length tags OD, OF, OL, UC and UR.
Added all new VRs up to the DICOM standard 2021a. Meanwhile, the default handling of the tag length has changed for explicit VRs from 2 bytes to 4 bytes. This cannot be reflected here, since the DicomDecoder class is not able to properly distinguish between implicit and explicit VR.
@Sethur
Copy link
Author

Sethur commented Aug 25, 2021

This was fixed and can be closed.

@Sethur Sethur closed this Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant