[Insight-users] GDCM Sets Invalid Pregnancy Status in DICOM Tags In Addition to Other Errors
Constantine Zakkaroff
mnkz at leeds.ac.uk
Tue Aug 6 05:29:10 EDT 2013
Hello Insight Users,
I'm experiencing strange things with writing DICOM headers with ITK 4.4.1.
In my code I follow the example DicomSeriesReadSeriesWrite.cxx,
remembering to use
seriesWriter->SetMetaDataDictionaryArray(seriesReader->GetMetaDataDictionaryArray());
In the output DICOM files I notice a few strange things. For example,
pregnancy status gets an invalid value.
Input header: (0010,21C0) Pregnancy Status VR: US Length: 2 Value: 4
Output header: (0010,21C0) Pregnancy Status VR: US Length: 2 Value: 52
According to DICOM specification only values 1-4 are allowed. What is
52? Pregnant with alien species? :)
Furthermore, there are worse things, where spacing between slices is
overwritten with an incorrect value:
Input header: (0018,0088) Spacing Between Slices VR: DS Length: 2 Value: 16
Output header: (0018,0088) Spacing Between Slices VR: DS Length: 2 Value: 1
Similarly, double oblique image orientation is overwritten with axial
orientation:
(0020,0037) Image Orientation (Patient) VR: DS Length: 86 Value:
0.65752613544464\0.63155889511108\-0.4108439087867\-0.5298969745635\0\-0.8480620384216
(0020,0037) Image Orientation (Patient) VR: DS Length: 12 Value: 1\0\0\0\1\0
Can anyone suggest whether it's a bug or a feature?
In addition, I have been struggling for years with outputting private
DICOM tags as they are read from disk. I use SetLoadPrivateTags(true) on
the GDCMImageIO and GDCMSeriesFileNames objects but the output headers
don't show private tags from original files. Is there something I'm
doing wrong?
Many thanks,
Constantine
More information about the Insight-users
mailing list