Closed zivy closed 3 years ago
A better definition of "all of the metadata tags" is needed. There is pixel specific information, including the pixel data its self, which should not be copied.
Yes, you are obviously correct. The photometric interpretation tag is no longer valid once the image is converted to RGB, similarly for the MONOCHROME1 value, as ITK converts it to minimum value is black . This DICOM thing is so complicated...
Because pydicom modifies the original DICOM information character string which GDCM doesn't, only copy certain tags and not all as that would require detailed analysis of too many tags. For now copy over the following if they exist:
StudyInstanceUID (0020,000D) SeriesInstanceUID (0020,000E) Modality (0008,0060) PixelSpacing (0028,0030) ImagerPixelSpacing (0018,1164) DistanceSourceToDetector (0018,1110) ViewPosition (0018,5101) PatientSex (0010,0040)
When reading an image using pydicom, fallback scenario, copy all of the metadata tags into the SimpleITK metadata dictionary. Not sure if there is something specific that needs to be done with private tags? Should they always be read in or should this be a flag?