-
Notifications
You must be signed in to change notification settings - Fork 644
Fix reading DICOM files with extra tags in the file meta information group #1377
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
Conversation
Stop reading file meta information when encountering an tag of group 2 with a lower element value than the previous tag
Codecov Report
@@ Coverage Diff @@
## development #1377 +/- ##
===============================================
+ Coverage 80.05% 80.15% +0.09%
===============================================
Files 266 266
Lines 24332 24334 +2
===============================================
+ Hits 19480 19505 +25
+ Misses 4852 4829 -23
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
{ | ||
_result = DicomReaderResult.Stopped; | ||
return false; | ||
} | ||
|
||
_previousTag = _tag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR: I wonder if we can use _previousTag
to generally check for tags that are less than the previous ones (and ignore these tags). I have previously encountered such data, produced by a big vendor, which crashed dcmtk storescp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly the idea that fixed the extraneous file meta information issue that is being solved here :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this PR fixes the problem in the meta data, while I meant the same check for the actual dataset (where I have seen that problem).
I suppose this small PR has been open long enough, and there are no objections, so I'll merge this. |
Fixes #1376
Checklist
Changes proposed in this pull request: