Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
420:8bf717c4e497 | 421:f87f28624b96 |
---|---|
29 #include "../../Framework/Radiography/RadiographyLayerRotateTracker.h" | 29 #include "../../Framework/Radiography/RadiographyLayerRotateTracker.h" |
30 #include "../../Framework/Radiography/RadiographyScene.h" | 30 #include "../../Framework/Radiography/RadiographyScene.h" |
31 #include "../../Framework/Radiography/RadiographySceneCommand.h" | 31 #include "../../Framework/Radiography/RadiographySceneCommand.h" |
32 #include "../../Framework/Radiography/RadiographyWidget.h" | 32 #include "../../Framework/Radiography/RadiographyWidget.h" |
33 #include "../../Framework/Radiography/RadiographyWindowingTracker.h" | 33 #include "../../Framework/Radiography/RadiographyWindowingTracker.h" |
34 #include "../../Framework/SmartLoader.h" | |
34 | 35 |
35 #include <Core/HttpClient.h> | 36 #include <Core/HttpClient.h> |
36 #include <Core/Images/FontRegistry.h> | 37 #include <Core/Images/FontRegistry.h> |
37 #include <Core/Logging.h> | 38 #include <Core/Logging.h> |
38 #include <Core/OrthancException.h> | 39 #include <Core/OrthancException.h> |
380 public IObserver | 381 public IObserver |
381 { | 382 { |
382 private: | 383 private: |
383 std::auto_ptr<RadiographyScene> scene_; | 384 std::auto_ptr<RadiographyScene> scene_; |
384 RadiographyEditorInteractor interactor_; | 385 RadiographyEditorInteractor interactor_; |
386 std::auto_ptr<SmartLoader> smartLoader_; | |
385 | 387 |
386 public: | 388 public: |
387 SingleFrameEditorApplication(MessageBroker& broker) : | 389 SingleFrameEditorApplication(MessageBroker& broker) : |
388 IObserver(broker), | 390 IObserver(broker), |
389 interactor_(broker) | 391 interactor_(broker) |
441 int frame = parameters["frame"].as<unsigned int>(); | 443 int frame = parameters["frame"].as<unsigned int>(); |
442 | 444 |
443 Orthanc::FontRegistry fonts; | 445 Orthanc::FontRegistry fonts; |
444 fonts.AddFromResource(Orthanc::EmbeddedResources::FONT_UBUNTU_MONO_BOLD_16); | 446 fonts.AddFromResource(Orthanc::EmbeddedResources::FONT_UBUNTU_MONO_BOLD_16); |
445 | 447 |
448 smartLoader_.reset(new SmartLoader(IObserver::GetBroker(), context->GetOrthancApiClient())); | |
449 smartLoader_->SetImageQuality(SliceImageQuality_FullPam); | |
450 | |
446 scene_.reset(new RadiographyScene(GetBroker())); | 451 scene_.reset(new RadiographyScene(GetBroker())); |
447 //scene_->LoadDicomFrame(instance, frame, false); //.SetPan(200, 0); | 452 //scene_->LoadDicomFrame(instance, frame, false); //.SetPan(200, 0); |
448 scene_->LoadDicomFrame(context->GetOrthancApiClient(), "61f3143e-96f34791-ad6bbb8d-62559e75-45943e1b", 0, false); | 453 //scene_->LoadDicomFrame(context->GetOrthancApiClient(), "61f3143e-96f34791-ad6bbb8d-62559e75-45943e1b", 0, false); |
454 smartLoader_->SetFrameInRadiographyScene(*scene_, "61f3143e-96f34791-ad6bbb8d-62559e75-45943e1b", 0); | |
449 | 455 |
450 #if !defined(ORTHANC_ENABLE_WASM) || ORTHANC_ENABLE_WASM != 1 | 456 #if !defined(ORTHANC_ENABLE_WASM) || ORTHANC_ENABLE_WASM != 1 |
451 Orthanc::HttpClient::ConfigureSsl(true, "/etc/ssl/certs/ca-certificates.crt"); | 457 Orthanc::HttpClient::ConfigureSsl(true, "/etc/ssl/certs/ca-certificates.crt"); |
452 #endif | 458 #endif |
453 | 459 |