changeset 407:5cc4b10fa1d8

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Nov 2025 16:17:21 +0100
parents 5986dfd522be
children bdc8449b00cb
files Applications/Dicomizer.cpp Framework/ImagedVolumeParameters.cpp Framework/ImagedVolumeParameters.h
diffstat 3 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Dicomizer.cpp	Wed Nov 05 15:56:47 2025 +0100
+++ b/Applications/Dicomizer.cpp	Wed Nov 05 16:17:21 2025 +0100
@@ -371,7 +371,6 @@
 
   // Some basic coordinate information
   OrthancWSI::DicomToolbox::SetStringTag(*dataset, DCM_VolumetricProperties, "VOLUME");
-  OrthancWSI::DicomToolbox::SetStringTag(*dataset, DCM_ImageOrientationSlide, "0\\-1\\0\\-1\\0\\0");
 
   std::string date, time;
   Orthanc::SystemToolbox::GetNowDicom(date, time, true /* use UTC time (not local time) */);
@@ -519,6 +518,8 @@
   }
 
 
+  OrthancWSI::DicomToolbox::SetStringTag(dataset, DCM_ImageOrientationSlide, volume.GetImageOrientationSlide());
+
   {
     // Construct tag "Shared Functional Groups Sequence" (5200,9229)
     std::unique_ptr<DcmItem> item(new DcmItem);
--- a/Framework/ImagedVolumeParameters.cpp	Wed Nov 05 15:56:47 2025 +0100
+++ b/Framework/ImagedVolumeParameters.cpp	Wed Nov 05 16:17:21 2025 +0100
@@ -105,6 +105,12 @@
 
     depth_ = depth;
   }
+
+
+  std::string ImagedVolumeParameters::GetImageOrientationSlide() const
+  {
+    return "0\\-1\\0\\-1\\0\\0";
+  }
     
 
   void ImagedVolumeParameters::GetLocation(float& physicalX,
--- a/Framework/ImagedVolumeParameters.h	Wed Nov 05 15:56:47 2025 +0100
+++ b/Framework/ImagedVolumeParameters.h	Wed Nov 05 16:17:21 2025 +0100
@@ -23,6 +23,8 @@
 
 #pragma once
 
+#include <string>
+
 namespace OrthancWSI
 {
   class ImagedVolumeParameters
@@ -84,6 +86,8 @@
       offsetY_ = offset;
     }
 
+    std::string GetImageOrientationSlide() const;
+
     void GetLocation(float& physicalX,
                      float& physicalY,
                      unsigned int imageX,