Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyScene.h @ 754:92c400a09f1b
Merge from default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 22 May 2019 16:13:46 +0200 |
parents | be9c1530d40a |
children | 580dd82e13f5 |
comparison
equal
deleted
inserted
replaced
753:a386bbc955dc | 754:92c400a09f1b |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "RadiographyLayer.h" | 24 #include "RadiographyLayer.h" |
25 #include "../Toolbox/DicomFrameConverter.h" | 25 #include "../Deprecated/Toolbox/DicomFrameConverter.h" |
26 #include "../Toolbox/OrthancApiClient.h" | 26 #include "../Deprecated/Toolbox/OrthancApiClient.h" |
27 #include "Framework/StoneEnumerations.h" | 27 #include "../StoneEnumerations.h" |
28 #include "Core/Images/Image.h" | 28 #include "Core/Images/Image.h" |
29 #include "Core/Images/ImageProcessing.h" | 29 #include "Core/Images/ImageProcessing.h" |
30 | 30 |
31 namespace OrthancStone | 31 namespace OrthancStone |
32 { | 32 { |
147 Layers layers_; | 147 Layers layers_; |
148 | 148 |
149 protected: | 149 protected: |
150 RadiographyLayer& RegisterLayer(RadiographyLayer* layer); | 150 RadiographyLayer& RegisterLayer(RadiographyLayer* layer); |
151 | 151 |
152 void OnTagsReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); | 152 void OnTagsReceived(const Deprecated::OrthancApiClient::BinaryResponseReadyMessage& message); |
153 | 153 |
154 virtual void OnFrameReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); | 154 virtual void OnFrameReceived(const Deprecated::OrthancApiClient::BinaryResponseReadyMessage& message); |
155 | 155 |
156 void OnDicomExported(const OrthancApiClient::JsonResponseReadyMessage& message); | 156 void OnDicomExported(const Deprecated::OrthancApiClient::JsonResponseReadyMessage& message); |
157 | 157 |
158 void OnDicomWebReceived(const IWebService::HttpRequestSuccessMessage& message); | 158 void OnDicomWebReceived(const Deprecated::IWebService::HttpRequestSuccessMessage& message); |
159 | 159 |
160 void OnLayerEdited(const RadiographyLayer::LayerEditedMessage& message); | 160 virtual void OnLayerEdited(const RadiographyLayer::LayerEditedMessage& message); |
161 public: | 161 public: |
162 RadiographyScene(MessageBroker& broker); | 162 RadiographyScene(MessageBroker& broker); |
163 | 163 |
164 virtual ~RadiographyScene(); | 164 virtual ~RadiographyScene(); |
165 | 165 |
167 float& width) const; | 167 float& width) const; |
168 | 168 |
169 void GetWindowingWithDefault(float& center, | 169 void GetWindowingWithDefault(float& center, |
170 float& width) const; | 170 float& width) const; |
171 | 171 |
172 void SetWindowing(float center, | 172 virtual void SetWindowing(float center, |
173 float width); | 173 float width); |
174 | 174 |
175 PhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const; | 175 RadiographyPhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const; |
176 | 176 |
177 RadiographyLayer& LoadText(const Orthanc::Font& font, | 177 RadiographyLayer& LoadText(const Orthanc::Font& font, |
178 const std::string& utf8, | 178 const std::string& utf8, |
179 RadiographyLayer::Geometry* geometry); | 179 RadiographyLayer::Geometry* geometry); |
180 | 180 |
192 | 192 |
193 virtual RadiographyLayer& LoadDicomImage(Orthanc::ImageAccessor* dicomImage, // takes ownership | 193 virtual RadiographyLayer& LoadDicomImage(Orthanc::ImageAccessor* dicomImage, // takes ownership |
194 const std::string& instance, | 194 const std::string& instance, |
195 unsigned int frame, | 195 unsigned int frame, |
196 Deprecated::DicomFrameConverter* converter, // takes ownership | 196 Deprecated::DicomFrameConverter* converter, // takes ownership |
197 PhotometricDisplayMode preferredPhotometricDisplayMode, | 197 RadiographyPhotometricDisplayMode preferredPhotometricDisplayMode, |
198 RadiographyLayer::Geometry* geometry); | 198 RadiographyLayer::Geometry* geometry); |
199 | 199 |
200 virtual RadiographyLayer& LoadDicomFrame(OrthancApiClient& orthanc, | 200 virtual RadiographyLayer& LoadDicomFrame(Deprecated::OrthancApiClient& orthanc, |
201 const std::string& instance, | 201 const std::string& instance, |
202 unsigned int frame, | 202 unsigned int frame, |
203 bool httpCompression, | 203 bool httpCompression, |
204 RadiographyLayer::Geometry* geometry); // pass NULL if you want default geometry | 204 RadiographyLayer::Geometry* geometry); // pass NULL if you want default geometry |
205 | 205 |
206 RadiographyLayer& LoadDicomWebFrame(IWebService& web); | 206 RadiographyLayer& LoadDicomWebFrame(Deprecated::IWebService& web); |
207 | 207 |
208 void RemoveLayer(size_t layerIndex); | 208 void RemoveLayer(size_t layerIndex); |
209 | 209 |
210 const RadiographyLayer& GetLayer(size_t layerIndex) const; | 210 const RadiographyLayer& GetLayer(size_t layerIndex) const; |
211 | 211 |
276 void GetRange(float& minValue, | 276 void GetRange(float& minValue, |
277 float& maxValue) const; | 277 float& maxValue) const; |
278 | 278 |
279 // Export using PAM is faster than using PNG, but requires Orthanc | 279 // Export using PAM is faster than using PNG, but requires Orthanc |
280 // core >= 1.4.3 | 280 // core >= 1.4.3 |
281 void ExportDicom(OrthancApiClient& orthanc, | 281 void ExportDicom(Deprecated::OrthancApiClient& orthanc, |
282 const Orthanc::DicomMap& dicom, | 282 const Orthanc::DicomMap& dicom, |
283 const std::string& parentOrthancId, | 283 const std::string& parentOrthancId, |
284 double pixelSpacingX, | 284 double pixelSpacingX, |
285 double pixelSpacingY, | 285 double pixelSpacingY, |
286 bool invert, | 286 bool invert, |
287 ImageInterpolation interpolation, | 287 ImageInterpolation interpolation, |
288 bool usePam); | 288 bool usePam); |
289 | 289 |
290 void ExportDicom(OrthancApiClient& orthanc, | 290 void ExportDicom(Deprecated::OrthancApiClient& orthanc, |
291 const Json::Value& dicomTags, | 291 const Json::Value& dicomTags, |
292 const std::string& parentOrthancId, | 292 const std::string& parentOrthancId, |
293 double pixelSpacingX, | 293 double pixelSpacingX, |
294 double pixelSpacingY, | 294 double pixelSpacingY, |
295 bool invert, | 295 bool invert, |