Broken pixel_data fix: support parsing improperly closed encapsulated pixel data#607
Merged
Enet4 merged 2 commits intoEnet4:masterfrom Dec 7, 2024
Merged
Broken pixel_data fix: support parsing improperly closed encapsulated pixel data#607Enet4 merged 2 commits intoEnet4:masterfrom
Enet4 merged 2 commits intoEnet4:masterfrom
Conversation
Enet4
approved these changes
Dec 7, 2024
Owner
Enet4
left a comment
There was a problem hiding this comment.
From reading the other issues at fo-dicom and inspecting that DICOM file I interpret that the device is producing a non-standard way of delimiting the end of the pixel data. The proposed solution of gracefully ending the token stream when reaching EOF while in a pixel data fragment sequence is simple and does not seem to negatively affect anything else, so it is OK to incorporate this fix.
Much appreciated. 👍
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.
Hello @Enet4 .
So I stumbled upon some Dicom files produced on a new Siemens machine and was unable to open them with Dcmtk, Pydicom nor dicom-rs.
I found this (fix](fo-dicom/fo-dicom#1718)) that addressed the very same issue inside fo-dicom.
By reading your code and applying this little hack, I was able to get the files working.
Would you be willing to incorporate such a fix and document it please ?
This is a sample Dicom from the machine:
Anonymised.zip
Thank you