diff Applications/Samples/SingleFrameEditorApplication.h @ 421:f87f28624b96 cache-in-radiography

tentative to make SmartLoader and RadiographyScene work together (not really working)
author am@osimis.io
date Tue, 20 Nov 2018 16:35:29 +0100
parents c23df8b3433b
children
line wrap: on
line diff
--- a/Applications/Samples/SingleFrameEditorApplication.h	Mon Nov 19 12:45:37 2018 +0100
+++ b/Applications/Samples/SingleFrameEditorApplication.h	Tue Nov 20 16:35:29 2018 +0100
@@ -31,6 +31,7 @@
 #include "../../Framework/Radiography/RadiographySceneCommand.h"
 #include "../../Framework/Radiography/RadiographyWidget.h"
 #include "../../Framework/Radiography/RadiographyWindowingTracker.h"
+#include "../../Framework/SmartLoader.h"
 
 #include <Core/HttpClient.h>
 #include <Core/Images/FontRegistry.h>
@@ -382,6 +383,7 @@
     private:
       std::auto_ptr<RadiographyScene>  scene_;
       RadiographyEditorInteractor      interactor_;
+      std::auto_ptr<SmartLoader>       smartLoader_;
 
     public:
       SingleFrameEditorApplication(MessageBroker& broker) :
@@ -443,9 +445,13 @@
         Orthanc::FontRegistry fonts;
         fonts.AddFromResource(Orthanc::EmbeddedResources::FONT_UBUNTU_MONO_BOLD_16);
         
+        smartLoader_.reset(new SmartLoader(IObserver::GetBroker(), context->GetOrthancApiClient()));
+        smartLoader_->SetImageQuality(SliceImageQuality_FullPam);
+
         scene_.reset(new RadiographyScene(GetBroker()));
         //scene_->LoadDicomFrame(instance, frame, false); //.SetPan(200, 0);
-        scene_->LoadDicomFrame(context->GetOrthancApiClient(), "61f3143e-96f34791-ad6bbb8d-62559e75-45943e1b", 0, false);
+        //scene_->LoadDicomFrame(context->GetOrthancApiClient(), "61f3143e-96f34791-ad6bbb8d-62559e75-45943e1b", 0, false);
+        smartLoader_->SetFrameInRadiographyScene(*scene_, "61f3143e-96f34791-ad6bbb8d-62559e75-45943e1b", 0);
 
 #if !defined(ORTHANC_ENABLE_WASM) || ORTHANC_ENABLE_WASM != 1
         Orthanc::HttpClient::ConfigureSsl(true, "/etc/ssl/certs/ca-certificates.crt");