comparison 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
comparison
equal deleted inserted replaced
2888:61a5667f37d9 2889:f3c1eda54e47
1172 { 1172 {
1173 ReplacePlainString(DICOM_TAG_PIXEL_REPRESENTATION, "0"); // Unsigned pixels 1173 ReplacePlainString(DICOM_TAG_PIXEL_REPRESENTATION, "0"); // Unsigned pixels
1174 } 1174 }
1175 1175
1176 ReplacePlainString(DICOM_TAG_PLANAR_CONFIGURATION, "0"); // Color channels are interleaved 1176 ReplacePlainString(DICOM_TAG_PLANAR_CONFIGURATION, "0"); // Color channels are interleaved
1177 ReplacePlainString(DICOM_TAG_PHOTOMETRIC_INTERPRETATION, "MONOCHROME2"); 1177 SetIfAbsent(DICOM_TAG_PHOTOMETRIC_INTERPRETATION, "MONOCHROME2"); // by default, greyscale images are in MONOCHROME2
1178 1178
1179 unsigned int bytesPerPixel = 0; 1179 unsigned int bytesPerPixel = 0;
1180 1180
1181 switch (accessor.GetFormat()) 1181 switch (accessor.GetFormat())
1182 { 1182 {