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

Support parsing NativePixelData when it appears multiple times in a DICOM #79

Merged
merged 3 commits into from
Jun 8, 2020

Conversation

suyashkumar
Copy link
Owner

@suyashkumar suyashkumar commented May 22, 2020

This fixes #77 and appears to work on provided DICOMs. This is a relatively quick fix, that does seem to get the job done. There are some minor improvements that can be made in future PRs, but it will be best to get these changes in to unblock future work.

This also appears to fix #82, and fix #65 (we are able to parse those images without errors).

For most of the provided images, the issue was that an icon image sequence could appear in the DICOMs in addition to the primary PixelData. When reading that particular image sequence, a different set of metadata tags need to be used (instead of the global ones, which apply only to the core PixelData).

There may be additional work to fully and correctly parsing icon image sets (most of the icons seem to be unpopulated in the sample images), but this change will at least prevent the parser from failing on DICOMs like this.

@suyashkumar suyashkumar mentioned this pull request May 22, 2020
@suyashkumar suyashkumar marked this pull request as ready for review June 8, 2020 01:54
@suyashkumar suyashkumar self-assigned this Jun 8, 2020
@suyashkumar suyashkumar changed the title (WIP) Support parsing NativePixelData when it appears multiple times in a DICOM Support parsing NativePixelData when it appears multiple times in a DICOM Jun 8, 2020
@suyashkumar suyashkumar added the bug Something isn't working label Jun 8, 2020
@suyashkumar suyashkumar merged commit 9d8d8d9 into master Jun 8, 2020
@suyashkumar
Copy link
Owner Author

Many thanks to @IChocked and @wkoszek for their sample DICOMs and bug reports to help track this down!

@IChocked
Copy link
Contributor

@suyashkumar Thanks for merging these changes! Would it be possible to git tag this version? I thought it was included in release 0.4.3, but I realize now that it's not

@suyashkumar
Copy link
Owner Author

@IChocked, just released and tagged v0.4.4. Thanks!

@IChocked
Copy link
Contributor

Thank you! It is much appreciated :)

suyashkumar added a commit that referenced this pull request Jul 4, 2020
This implements native pixel data parsing on the rewrite branch. This includes fixes done on the mainline branch to parse PixelData properly if it appears multiple times in a DICOM (PR #79). This also includes some fixes to better handle value multiplicity.
suyashkumar added a commit that referenced this pull request Jul 19, 2020
This implements native pixel data parsing on the rewrite branch. This includes fixes done on the mainline branch to parse PixelData properly if it appears multiple times in a DICOM (PR #79). This also includes some fixes to better handle value multiplicity.
suyashkumar added a commit that referenced this pull request Sep 17, 2020
This implements native pixel data parsing on the rewrite branch. This includes fixes done on the mainline branch to parse PixelData properly if it appears multiple times in a DICOM (PR #79). This also includes some fixes to better handle value multiplicity.
suyashkumar added a commit that referenced this pull request Nov 2, 2020
This implements native pixel data parsing on the rewrite branch. This includes fixes done on the mainline branch to parse PixelData properly if it appears multiple times in a DICOM (PR #79). This also includes some fixes to better handle value multiplicity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR dicom.ReadElement: Undefined length disallowed ERROR ReadBytes Error: Encountered odd length
2 participants