cornerstonejs / dicomParser

JavaScript parser for DICOM Part 10 data
MIT License
712 stars 228 forks source 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 #255

Open aodong8808 opened 1 year ago

aodong8808 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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')) {