I encountered some challenges writing color DICOM images to file using GDCMImageIO.
The current implementation of the GDCMImageIO assumes three channel images have a photometric interpretation value of RGB, see here. I have images that are YBR_FULL_422 and I would like to write them as such (the writer simply ignores my settings for this DICOM tag in the meta-data dictionary).
My question is, is this a bug or a feature?
If a bug, I would modify the writer to use the value of the photometric interpretation from the dictionary (RGB would remain as default if this tag isn’t in the dictionary).
If a feature, I would modify the documentation to say that the user should convert the color data to the RGB colorspace defined by the DICOM standard before writing to file.
So which is it?