rii-mango / Daikon

A JavaScript DICOM reader.
Other
220 stars 54 forks source link

Unable to parse file with private tags. #49

Closed rtdicomexplorer closed 1 year ago

rtdicomexplorer commented 2 years ago

I find the library very cool, just I found out that is not able to parse DICOM files which contain private tags, when the transfer syntax is implicit. A example is attached. example.zip

rtdicomexplorer commented 2 years ago

After careful investigation I discovered that the problem is represented by the Info Meta Header which is written in little endian implicit (very strange...). I'm currently testing a possible solution.

neurolabusc commented 1 year ago

@rtdicomexplorer this is not a valid Part 10 DICOM. Note the specification for the DICOM File Meta Information which is always Explicit VR Little Endian Transfer Syntax regardless of the rest of the image. However, your file is missing the preamble (so it is a fragment, not a part 10 file). Further, it is missing the required File Meta Information Group Length.

Fortunately, gdcmconv is resilient to violations, and you can rescue this image as follows:

gdcmconv -w in.dcm out.dcm 

Since this is not a valid image, I am closing this issue.