changeset 6864:5c82dafd83c8

added ArchiveJob::hasLossyQuality_
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 26 May 2026 15:48:55 +0200
parents a8418d969c84
children 634a8082ce04 9df3a549c2e4
files OrthancServer/Sources/ServerJobs/ArchiveJob.cpp OrthancServer/Sources/ServerJobs/ArchiveJob.h
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp	Tue May 26 15:43:21 2026 +0200
+++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp	Tue May 26 15:48:55 2026 +0200
@@ -56,6 +56,7 @@
 static const char* const KEY_ARCHIVE_SIZE = "ArchiveSize";
 static const char* const KEY_TRANSCODE = "Transcode";
 static const char* const KEY_ALLOW_UTF8 = "Utf8";
+static const char* const KEY_LOSSY_QUALITY = "LossyQuality";
 
 
 namespace Orthanc
@@ -940,9 +941,7 @@
     }
 
     void RunStep(ThreadedInstancesLoader& instancesLoader,
-                 size_t index,
-                 bool transcode,
-                 DicomTransferSyntax transferSyntax)
+                 size_t index)
     {
       if (index > commands_.GetSize())
       {
@@ -1007,6 +1006,7 @@
     archiveSize_(0),
     transcode_(false),
     transferSyntax_(DicomTransferSyntax_LittleEndianImplicit),
+    hasLossyQuality_(false),
     lossyQuality_(100),
     loaderThreads_(1),
     allowUtf8_(false)
@@ -1117,6 +1117,7 @@
     }
     else
     {
+      hasLossyQuality_ = true;
       lossyQuality_ = lossyQuality;
     }
   }
@@ -1261,7 +1262,7 @@
     {
       try
       {
-        writer_->RunStep(*instancesLoader_, currentStep_, transcode_, transferSyntax_);
+        writer_->RunStep(*instancesLoader_, currentStep_);
       }
       catch (Orthanc::OrthancException& e)
       {
@@ -1361,6 +1362,12 @@
 
     // New in Orthanc 1.12.11
     value[KEY_ALLOW_UTF8] = allowUtf8_;
+
+    // New in Orthanc 1.12.12
+    if (hasLossyQuality_)
+    {
+      value[KEY_LOSSY_QUALITY] = lossyQuality_;
+    }
   }
 
 
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.h	Tue May 26 15:43:21 2026 +0200
+++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.h	Tue May 26 15:48:55 2026 +0200
@@ -69,6 +69,7 @@
     // New in Orthanc 1.7.0
     bool                 transcode_;
     DicomTransferSyntax  transferSyntax_;
+    bool                 hasLossyQuality_;
     unsigned int         lossyQuality_;
 
     // New in Orthanc 1.10.0