diff 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
line wrap: on
line diff
--- a/Core/DicomParsing/FromDcmtkBridge.cpp	Mon Mar 16 15:21:35 2020 +0100
+++ b/Core/DicomParsing/FromDcmtkBridge.cpp	Mon Mar 16 18:39:23 2020 +0100
@@ -123,6 +123,7 @@
 #include <dcmtk/dcmdata/dcrledrg.h>
 #if ORTHANC_ENABLE_DCMTK_TRANSCODING == 1
 #  include <dcmtk/dcmdata/dcrleerg.h>
+#  include <dcmtk/dcmimage/diregist.h>  // include to support color images
 #endif
 
 
@@ -1223,7 +1224,9 @@
     dicom.transferInit();
     OFCondition c = dicom.write(ob, xfer, encodingType, NULL,
                                 /*opt_groupLength*/ EGL_recalcGL,
-                                /*opt_paddingType*/ EPD_withoutPadding);
+                                /*opt_paddingType*/ EPD_noChange,
+                                /*padlen*/ 0, /*subPadlen*/ 0, /*instanceLength*/ 0,
+                                EWM_updateMeta /* creates new SOP instance UID on lossy */);
     dicom.transferEnd();
 
     if (c.good())