diff Core/DicomParsing/ParsedDicomFile.cpp @ 2889:f3c1eda54e47

Allow creation of MONOCHROME1 greyscale images in tools/create-dicom
author amazy
date Mon, 15 Oct 2018 13:45:00 +0200
parents d386abc18133
children ae20fccdd867
line wrap: on
line diff
--- a/Core/DicomParsing/ParsedDicomFile.cpp	Sat Oct 13 12:17:16 2018 +0200
+++ b/Core/DicomParsing/ParsedDicomFile.cpp	Mon Oct 15 13:45:00 2018 +0200
@@ -1174,7 +1174,7 @@
     }
 
     ReplacePlainString(DICOM_TAG_PLANAR_CONFIGURATION, "0");  // Color channels are interleaved
-    ReplacePlainString(DICOM_TAG_PHOTOMETRIC_INTERPRETATION, "MONOCHROME2");
+    SetIfAbsent(DICOM_TAG_PHOTOMETRIC_INTERPRETATION, "MONOCHROME2"); // by default, greyscale images are in MONOCHROME2
 
     unsigned int bytesPerPixel = 0;