changeset 484:7bf001b9d244 am-touch-events

re-added ExportToCreateDicomRequest
author Alain Mazy <alain@mazy.be>
date Fri, 15 Feb 2019 11:08:44 +0100
parents 29fc066b6f65
children e4febcef669e
files Framework/Radiography/RadiographyScene.cpp Framework/Radiography/RadiographyScene.h
diffstat 2 files changed, 34 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyScene.cpp	Fri Feb 15 10:39:23 2019 +0100
+++ b/Framework/Radiography/RadiographyScene.cpp	Fri Feb 15 11:08:44 2019 +0100
@@ -587,17 +587,15 @@
   }
 
 
-  void RadiographyScene::ExportDicom(OrthancApiClient& orthanc,
-                                     const Json::Value& dicomTags,
-                                     const std::string& parentOrthancId,
-                                     double pixelSpacingX,
-                                     double pixelSpacingY,
-                                     bool invert,
-                                     ImageInterpolation interpolation,
-                                     bool usePam)
+  void RadiographyScene::ExportToCreateDicomRequest(Json::Value& createDicomRequestContent,
+                                                    const Json::Value& dicomTags,
+                                                    const std::string& parentOrthancId,
+                                                    double pixelSpacingX,
+                                                    double pixelSpacingY,
+                                                    bool invert,
+                                                    ImageInterpolation interpolation,
+                                                    bool usePam)
   {
-    Json::Value createDicomRequestContent;
-
     std::auto_ptr<Orthanc::Image> rendered(ExportToImage(pixelSpacingX, pixelSpacingY, interpolation)); // note: we don't invert the image in the pixels data because we'll set the PhotometricDisplayMode correctly in the DICOM tags
 
     std::string base64;
@@ -662,6 +660,22 @@
       createDicomRequestContent["Parent"] = parentOrthancId;
     }
 
+  }
+
+
+  void RadiographyScene::ExportDicom(OrthancApiClient& orthanc,
+                                     const Json::Value& dicomTags,
+                                     const std::string& parentOrthancId,
+                                     double pixelSpacingX,
+                                     double pixelSpacingY,
+                                     bool invert,
+                                     ImageInterpolation interpolation,
+                                     bool usePam)
+  {
+    Json::Value createDicomRequestContent;
+
+    ExportToCreateDicomRequest(createDicomRequestContent, dicomTags, parentOrthancId, pixelSpacingX, pixelSpacingY, invert, interpolation, usePam);
+
     orthanc.PostJsonAsyncExpectJson(
           "/tools/create-dicom", createDicomRequestContent,
           new Callable<RadiographyScene, OrthancApiClient::JsonResponseReadyMessage>
--- a/Framework/Radiography/RadiographyScene.h	Fri Feb 15 10:39:23 2019 +0100
+++ b/Framework/Radiography/RadiographyScene.h	Fri Feb 15 11:08:44 2019 +0100
@@ -213,11 +213,20 @@
                      ImageInterpolation interpolation,
                      bool usePam);
 
+    void ExportToCreateDicomRequest(Json::Value& createDicomRequestContent,
+                                    const Json::Value& dicomTags,
+                                    const std::string& parentOrthancId,
+                                    double pixelSpacingX,
+                                    double pixelSpacingY,
+                                    bool invert,
+                                    ImageInterpolation interpolation,
+                                    bool usePam);
+
     Orthanc::Image* ExportToImage(double pixelSpacingX,
                                   double pixelSpacingY,
                                   ImageInterpolation interpolation)
     {
-      ExportToImage(pixelSpacingX, pixelSpacingY, interpolation, false, 0);
+      return ExportToImage(pixelSpacingX, pixelSpacingY, interpolation, false, 0);
     }
 
     Orthanc::Image* ExportToImage(double pixelSpacingX,