comparison Core/DicomParsing/FromDcmtkBridge.cpp @ 3765:4a25727401cd transcoding

first transcoding to jpeg 8bpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 16 Mar 2020 18:39:23 +0100
parents ca36e3f1112c
children 711d2ec2db34
comparison
equal deleted inserted replaced
3764:d55768319f8e 3765:4a25727401cd
121 121
122 122
123 #include <dcmtk/dcmdata/dcrledrg.h> 123 #include <dcmtk/dcmdata/dcrledrg.h>
124 #if ORTHANC_ENABLE_DCMTK_TRANSCODING == 1 124 #if ORTHANC_ENABLE_DCMTK_TRANSCODING == 1
125 # include <dcmtk/dcmdata/dcrleerg.h> 125 # include <dcmtk/dcmdata/dcrleerg.h>
126 # include <dcmtk/dcmimage/diregist.h> // include to support color images
126 #endif 127 #endif
127 128
128 129
129 namespace Orthanc 130 namespace Orthanc
130 { 131 {
1221 1222
1222 // Fill the memory buffer with the meta-header and the dataset 1223 // Fill the memory buffer with the meta-header and the dataset
1223 dicom.transferInit(); 1224 dicom.transferInit();
1224 OFCondition c = dicom.write(ob, xfer, encodingType, NULL, 1225 OFCondition c = dicom.write(ob, xfer, encodingType, NULL,
1225 /*opt_groupLength*/ EGL_recalcGL, 1226 /*opt_groupLength*/ EGL_recalcGL,
1226 /*opt_paddingType*/ EPD_withoutPadding); 1227 /*opt_paddingType*/ EPD_noChange,
1228 /*padlen*/ 0, /*subPadlen*/ 0, /*instanceLength*/ 0,
1229 EWM_updateMeta /* creates new SOP instance UID on lossy */);
1227 dicom.transferEnd(); 1230 dicom.transferEnd();
1228 1231
1229 if (c.good()) 1232 if (c.good())
1230 { 1233 {
1231 // The DICOM file is successfully written, truncate the target 1234 // The DICOM file is successfully written, truncate the target