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

When the tag value contains (0000,0002),(0000,0100),(0000,0110),(0000,0700),(0000,0800),(0000,1000),(0000,1030),(0000 ,1031), the dicom file cannot be parsed normally #255

Open
aodong8808 opened this issue Jul 26, 2023 · 2 comments

Comments

@aodong8808
Copy link

When the tag value contains (0000,0002),(0000,0100),(0000,0110),(0000,0700),(0000,0800),(0000,1000),(0000,1030),(0000 ,1031), the dicom file cannot be parsed normally
image
I checked a lot of dicom images and did not find such a tag value. After I delete this tag, it can be parsed and rendered normally. What method should I use to parse this kind of image?I put the file at the end, hope someone can help me
1.2.840.113619.2.472.3.40120842.710.1685265533.207.dcm.zip

@aodong8808
Copy link
Author

aodong8808 commented Jul 28, 2023

@yagni @dannyrb @chafey
I hope everyone can help me. I followed the source code and would like to get some help from it, but I don't know how to modify it. I don't even know which line of code affected him causing the error when parsing the tag value. I can open this file with other dicom parsers

@yagni
Copy link
Collaborator

yagni commented Jul 31, 2023

@aodong8808 It doesn't look like a standard-compliant DICOM file, since the DIMSE attributes (the ones with a group number of 0000) appear in the file. According to the standard, a file is defined here as meta information + data set, where meta information are the tags with group number 0002 and a data set according to 7.1 here cannot contain tags with a group number 0000.

If you decide to fork dicomParser and use that instead, you can try changing this line to the following and see if the parse succeeds:

if (!element.tag.startsWith('x0002')) {

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

No branches or pull requests

2 participants