comparison Framework/Radiography/RadiographyScene.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 aee3d7941c9b
children
comparison
equal deleted inserted replaced
420:8bf717c4e497 421:f87f28624b96
20 20
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "RadiographyLayer.h" 24 #include "RadiographyLayer.h"
25 #include <Framework/Layers/IVolumeSlicer.h>
25 #include "../Toolbox/OrthancApiClient.h" 26 #include "../Toolbox/OrthancApiClient.h"
26 27
27 28
28 namespace OrthancStone 29 namespace OrthancStone
29 { 30 {
31 class IVolumeSlicer;
32
30 class RadiographyScene : 33 class RadiographyScene :
31 public IObserver, 34 public IObserver,
32 public IObservable 35 public IObservable
33 { 36 {
34 public: 37 public:
78 bool hasWindowing_; 81 bool hasWindowing_;
79 float windowingCenter_; 82 float windowingCenter_;
80 float windowingWidth_; 83 float windowingWidth_;
81 Layers layers_; 84 Layers layers_;
82 85
86 std::map<const IVolumeSlicer*, size_t> layersIndexBySlice_;
87
83 RadiographyLayer& RegisterLayer(RadiographyLayer* layer); 88 RadiographyLayer& RegisterLayer(RadiographyLayer* layer);
84 89
85 void OnTagsReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); 90 void OnTagsReceived(const OrthancApiClient::BinaryResponseReadyMessage& message);
86 91
87 void OnFrameReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); 92 void OnFrameReceived(const OrthancApiClient::BinaryResponseReadyMessage& message);
88 93
89 void OnDicomExported(const OrthancApiClient::JsonResponseReadyMessage& message); 94 void OnDicomExported(const OrthancApiClient::JsonResponseReadyMessage& message);
90 95
91 void OnDicomWebReceived(const IWebService::HttpRequestSuccessMessage& message); 96 void OnDicomWebReceived(const IWebService::HttpRequestSuccessMessage& message);
97
98 void OnTagsReady(const IVolumeSlicer::TagsReadyMessage& message);
99
100 void OnImageReady(const IVolumeSlicer::FrameReadyMessage& message);
92 101
93 public: 102 public:
94 RadiographyScene(MessageBroker& broker); 103 RadiographyScene(MessageBroker& broker);
95 104
96 virtual ~RadiographyScene(); 105 virtual ~RadiographyScene();
114 const std::string& instance, 123 const std::string& instance,
115 unsigned int frame, 124 unsigned int frame,
116 bool httpCompression); 125 bool httpCompression);
117 126
118 RadiographyLayer& LoadDicomWebFrame(IWebService& web); 127 RadiographyLayer& LoadDicomWebFrame(IWebService& web);
128
129 RadiographyLayer& SetFrame(IVolumeSlicer* slice);
119 130
120 Extent2D GetSceneExtent() const; 131 Extent2D GetSceneExtent() const;
121 132
122 void Render(Orthanc::ImageAccessor& buffer, 133 void Render(Orthanc::ImageAccessor& buffer,
123 const AffineTransform2D& viewTransform, 134 const AffineTransform2D& viewTransform,