dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
298 stars 112 forks source link

Invalid VR of the private creator tag of the "Implicit VR Endian" typed DICOM file #242

Open WoonchanCho opened 2 years ago

WoonchanCho commented 2 years ago

Hi team,

Recently, I found one anomaly when I used the dcmjs to parse the DICOM file of which transfer syntax is Implicit VR Endian (1.2.840.10008.1.2).

According to the DICOM spec: https://dicom.nema.org/medical/dicom/current/output/html/part05.html#sect_7.8.1,

_Private Creator Data Elements numbered (gggg,0010-00FF) (gggg is odd) shall be used to reserve a block of Elements with Group Number gggg for use by an individual implementer. The implementer shall insert an identification code in an unused (unassigned) Element in this series to reserve a block of Private Elements. The VR of the private identification code shall be LO (Long String) and ...

But, the current behavior of the dcmjs is to emit UN type.

For the comparison, I tested the same DICOM file with the dcmdump tool. It emits the LO type as the spec mentions implicit.dcm.zip .

I attach the sample DICOM file here so that you can check this issue by yourself. You can check the VR type of "0043,0010" tag.

If you think this should be fixed, just let me know. I'll raise the PR request soon.

Thank you so much

pieper commented 2 years ago

Hi @WoonchanCho - yes, that sounds very reasonable. We want dcmjs to follow the standard and behave like other dicom libraries.