changeset 3887:25c122277f53 transcoding

transcoding to JPEGProcess14SV1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 May 2020 16:32:37 +0200
parents b808958dff2a
children e46b7a997f0a
files UnitTestsSources/FromDcmtkTests.cpp
diffstat 1 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/UnitTestsSources/FromDcmtkTests.cpp	Tue May 05 16:03:46 2020 +0200
+++ b/UnitTestsSources/FromDcmtkTests.cpp	Tue May 05 16:32:37 2020 +0200
@@ -1926,9 +1926,9 @@
 
 #include "../Core/DicomNetworking/DicomStoreUserConnection.h"
 
-#include <dcmtk/dcmjpeg/djrploss.h>   // for DJ_RPLossy
-//#include <dcmtk/dcmjpeg/djrplol.h>    // for DJ_RPLossless
-#include <dcmtk/dcmjpls/djrparam.h>    // for DJLSRepresentationParameter
+#include <dcmtk/dcmjpeg/djrploss.h>  // for DJ_RPLossy
+#include <dcmtk/dcmjpeg/djrplol.h>   // for DJ_RPLossless
+#include <dcmtk/dcmjpls/djrparam.h>  // for DJLSRepresentationParameter
 
 
 #if !defined(ORTHANC_ENABLE_DCMTK_JPEG)
@@ -2243,6 +2243,7 @@
           allowNewSopInstanceUid &&
           bitsStored == 8)
       {
+        // Check out "dcmjpeg/apps/dcmcjpeg.cc"
         DJ_RPLossy parameters(lossyQuality_);
         
         if (FromDcmtkBridge::Transcode(dicom, DicomTransferSyntax_JPEGProcess1, &parameters))
@@ -2258,6 +2259,7 @@
           allowNewSopInstanceUid &&
           bitsStored <= 12)
       {
+        // Check out "dcmjpeg/apps/dcmcjpeg.cc"
         DJ_RPLossy parameters(lossyQuality_);
         if (FromDcmtkBridge::Transcode(dicom, DicomTransferSyntax_JPEGProcess2_4, &parameters))
         {
@@ -2267,6 +2269,20 @@
       }
 #endif
       
+#if ORTHANC_ENABLE_DCMTK_JPEG == 1
+      if (allowedSyntaxes.find(DicomTransferSyntax_JPEGProcess14SV1) != allowedSyntaxes.end())
+      {
+        // Check out "dcmjpeg/apps/dcmcjpeg.cc"
+        DJ_RPLossless parameters(6 /* opt_selection_value */,
+                                 0 /* opt_point_transform */);
+        if (FromDcmtkBridge::Transcode(dicom, DicomTransferSyntax_JPEGProcess14SV1, &parameters))
+        {
+          CheckSopInstanceUid(dicom, sourceSopInstanceUid, true);
+          return true;
+        }
+      }
+#endif
+      
 #if ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS == 1
       if (allowedSyntaxes.find(DicomTransferSyntax_JPEGLSLossless) != allowedSyntaxes.end())
       {