Mercurial > hg > orthanc-stone
annotate Framework/Radiography/RadiographyScene.h @ 585:b9ce24c606ae
TextSceneLayer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 19 Apr 2019 17:57:58 +0200 |
parents | 92305ee35b1c |
children | 848170ca4351 |
rev | line source |
---|---|
408 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
408 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
24 #include "RadiographyLayer.h" |
408 | 25 #include "../Toolbox/OrthancApiClient.h" |
432
4eb96c6b4e96
improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents:
430
diff
changeset
|
26 #include "Framework/StoneEnumerations.h" |
481
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
27 #include "Core/Images/Image.h" |
488 | 28 #include "Core/Images/ImageProcessing.h" |
408 | 29 |
30 namespace OrthancStone | |
31 { | |
475
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
32 class RadiographyDicomLayer; |
553
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
33 class DicomFrameConverter; |
475
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
34 |
408 | 35 class RadiographyScene : |
426 | 36 public IObserver, |
37 public IObservable | |
408 | 38 { |
39 public: | |
430 | 40 class GeometryChangedMessage : |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
41 public OriginMessage<MessageType_RadiographyScene_GeometryChanged, RadiographyScene> |
430 | 42 { |
43 private: | |
44 RadiographyLayer& layer_; | |
45 | |
46 public: | |
47 GeometryChangedMessage(const RadiographyScene& origin, | |
48 RadiographyLayer& layer) : | |
49 OriginMessage(origin), | |
50 layer_(layer) | |
51 { | |
52 } | |
53 | |
54 RadiographyLayer& GetLayer() const | |
55 { | |
56 return layer_; | |
57 } | |
58 }; | |
59 | |
60 class ContentChangedMessage : | |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
61 public OriginMessage<MessageType_RadiographyScene_ContentChanged, RadiographyScene> |
430 | 62 { |
63 private: | |
64 RadiographyLayer& layer_; | |
65 | |
66 public: | |
67 ContentChangedMessage(const RadiographyScene& origin, | |
438 | 68 RadiographyLayer& layer) : |
430 | 69 OriginMessage(origin), |
70 layer_(layer) | |
71 { | |
72 } | |
73 | |
74 RadiographyLayer& GetLayer() const | |
75 { | |
76 return layer_; | |
77 } | |
78 }; | |
79 | |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
80 class LayerEditedMessage : |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
81 public OriginMessage<MessageType_RadiographyScene_LayerEdited, RadiographyScene> |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
82 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
83 private: |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
84 const RadiographyLayer& layer_; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
85 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
86 public: |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
87 LayerEditedMessage(const RadiographyScene& origin, |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
88 const RadiographyLayer& layer) : |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
89 OriginMessage(origin), |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
90 layer_(layer) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
91 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
92 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
93 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
94 const RadiographyLayer& GetLayer() const |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
95 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
96 return layer_; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
97 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
98 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
99 }; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
100 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
101 class WindowingChangedMessage : |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
102 public OriginMessage<MessageType_RadiographyScene_WindowingChanged, RadiographyScene> |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
103 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
104 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
105 public: |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
106 WindowingChangedMessage(const RadiographyScene& origin) : |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
107 OriginMessage(origin) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
108 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
109 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
110 }; |
408 | 111 |
112 class LayerAccessor : public boost::noncopyable | |
113 { | |
114 private: | |
115 RadiographyScene& scene_; | |
116 size_t index_; | |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
117 RadiographyLayer* layer_; |
408 | 118 |
119 public: | |
120 LayerAccessor(RadiographyScene& scene, | |
121 size_t index); | |
122 | |
123 LayerAccessor(RadiographyScene& scene, | |
124 double x, | |
125 double y); | |
126 | |
127 void Invalidate() | |
128 { | |
129 layer_ = NULL; | |
130 } | |
131 | |
132 bool IsValid() const | |
133 { | |
134 return layer_ != NULL; | |
135 } | |
136 | |
137 RadiographyScene& GetScene() const; | |
138 | |
139 size_t GetIndex() const; | |
140 | |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
141 RadiographyLayer& GetLayer() const; |
408 | 142 }; |
143 | |
144 | |
452
9a8fe40acfff
improved inheritence of RadiographyScene
Alain Mazy <alain@mazy.be>
parents:
440
diff
changeset
|
145 protected: |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
146 typedef std::map<size_t, RadiographyLayer*> Layers; |
408 | 147 |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
148 size_t countLayers_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
149 bool hasWindowing_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
150 float windowingCenter_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
151 float windowingWidth_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
152 Layers layers_; |
408 | 153 |
438 | 154 protected: |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
155 RadiographyLayer& RegisterLayer(RadiographyLayer* layer); |
408 | 156 |
157 void OnTagsReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); | |
158 | |
159 void OnFrameReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); | |
160 | |
161 void OnDicomExported(const OrthancApiClient::JsonResponseReadyMessage& message); | |
162 | |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
163 void OnDicomWebReceived(const IWebService::HttpRequestSuccessMessage& message); |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
164 |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
165 void OnLayerEdited(const RadiographyLayer::LayerEditedMessage& message); |
408 | 166 public: |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
167 RadiographyScene(MessageBroker& broker); |
408 | 168 |
169 virtual ~RadiographyScene(); | |
170 | |
171 bool GetWindowing(float& center, | |
172 float& width) const; | |
173 | |
174 void GetWindowingWithDefault(float& center, | |
175 float& width) const; | |
176 | |
177 void SetWindowing(float center, | |
178 float width); | |
179 | |
432
4eb96c6b4e96
improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents:
430
diff
changeset
|
180 PhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const; |
4eb96c6b4e96
improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents:
430
diff
changeset
|
181 |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
182 RadiographyLayer& LoadText(const Orthanc::Font& font, |
430 | 183 const std::string& utf8, |
184 RadiographyLayer::Geometry* geometry); | |
408 | 185 |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
186 RadiographyLayer& LoadTestBlock(unsigned int width, |
430 | 187 unsigned int height, |
188 RadiographyLayer::Geometry* geometry); | |
189 | |
488 | 190 RadiographyLayer& LoadMask(const std::vector<Orthanc::ImageProcessing::ImagePoint>& corners, |
475
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
191 const RadiographyDicomLayer& dicomLayer, |
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
192 float foreground, |
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
193 RadiographyLayer::Geometry* geometry); |
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
194 |
430 | 195 RadiographyLayer& LoadAlphaBitmap(Orthanc::ImageAccessor* bitmap, // takes ownership |
196 RadiographyLayer::Geometry* geometry); | |
197 | |
553
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
198 virtual RadiographyLayer& LoadDicomImage(Orthanc::ImageAccessor* dicomImage, // takes ownership |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
199 const std::string& instance, |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
200 unsigned int frame, |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
201 DicomFrameConverter* converter, // takes ownership |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
202 PhotometricDisplayMode preferredPhotometricDisplayMode, |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
203 RadiographyLayer::Geometry* geometry); |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
204 |
438 | 205 virtual RadiographyLayer& LoadDicomFrame(OrthancApiClient& orthanc, |
206 const std::string& instance, | |
207 unsigned int frame, | |
208 bool httpCompression, | |
209 RadiographyLayer::Geometry* geometry); // pass NULL if you want default geometry | |
408 | 210 |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
211 RadiographyLayer& LoadDicomWebFrame(IWebService& web); |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
212 |
425 | 213 void RemoveLayer(size_t layerIndex); |
214 | |
430 | 215 const RadiographyLayer& GetLayer(size_t layerIndex) const; |
425 | 216 |
492 | 217 template <typename TypeLayer> |
218 TypeLayer* GetLayer(size_t index = 0) | |
219 { | |
220 std::vector<size_t> layerIndexes; | |
221 GetLayersIndexes(layerIndexes); | |
222 | |
223 size_t count = 0; | |
224 | |
225 for (size_t i = 0; i < layerIndexes.size(); ++i) | |
226 { | |
227 TypeLayer* typedLayer = dynamic_cast<TypeLayer*>(layers_[layerIndexes[i]]); | |
228 if (typedLayer != NULL) | |
229 { | |
230 if (count == index) | |
231 { | |
232 return typedLayer; | |
233 } | |
234 count++; | |
235 } | |
236 } | |
237 | |
238 return NULL; | |
239 } | |
240 | |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
241 template <typename TypeLayer> |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
242 const TypeLayer* GetLayer(size_t index = 0) const |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
243 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
244 std::vector<size_t> layerIndexes; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
245 GetLayersIndexes(layerIndexes); |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
246 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
247 size_t count = 0; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
248 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
249 for (size_t i = 0; i < layerIndexes.size(); ++i) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
250 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
251 const TypeLayer* typedLayer = dynamic_cast<const TypeLayer*>(layers_.at(layerIndexes[i])); |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
252 if (typedLayer != NULL) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
253 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
254 if (count == index) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
255 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
256 return typedLayer; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
257 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
258 count++; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
259 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
260 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
261 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
262 return NULL; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
263 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
264 |
430 | 265 void GetLayersIndexes(std::vector<size_t>& output) const; |
425 | 266 |
408 | 267 Extent2D GetSceneExtent() const; |
268 | |
269 void Render(Orthanc::ImageAccessor& buffer, | |
409 | 270 const AffineTransform2D& viewTransform, |
408 | 271 ImageInterpolation interpolation) const; |
272 | |
273 bool LookupLayer(size_t& index /* out */, | |
274 double x, | |
275 double y) const; | |
276 | |
277 void DrawBorder(CairoContext& context, | |
278 unsigned int layer, | |
279 double zoom); | |
280 | |
281 void GetRange(float& minValue, | |
282 float& maxValue) const; | |
283 | |
284 // Export using PAM is faster than using PNG, but requires Orthanc | |
285 // core >= 1.4.3 | |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
286 void ExportDicom(OrthancApiClient& orthanc, |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
287 const Orthanc::DicomMap& dicom, |
426 | 288 const std::string& parentOrthancId, |
408 | 289 double pixelSpacingX, |
290 double pixelSpacingY, | |
291 bool invert, | |
292 ImageInterpolation interpolation, | |
293 bool usePam); | |
426 | 294 |
483 | 295 void ExportDicom(OrthancApiClient& orthanc, |
296 const Json::Value& dicomTags, | |
297 const std::string& parentOrthancId, | |
298 double pixelSpacingX, | |
299 double pixelSpacingY, | |
300 bool invert, | |
301 ImageInterpolation interpolation, | |
302 bool usePam); | |
303 | |
484
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
304 void ExportToCreateDicomRequest(Json::Value& createDicomRequestContent, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
305 const Json::Value& dicomTags, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
306 const std::string& parentOrthancId, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
307 double pixelSpacingX, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
308 double pixelSpacingY, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
309 bool invert, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
310 ImageInterpolation interpolation, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
311 bool usePam); |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
312 |
481
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
313 Orthanc::Image* ExportToImage(double pixelSpacingX, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
314 double pixelSpacingY, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
315 ImageInterpolation interpolation) |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
316 { |
484
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
317 return ExportToImage(pixelSpacingX, pixelSpacingY, interpolation, false, 0); |
481
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
318 } |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
319 |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
320 Orthanc::Image* ExportToImage(double pixelSpacingX, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
321 double pixelSpacingY, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
322 ImageInterpolation interpolation, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
323 bool invert, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
324 int64_t maxValue /* for inversion */); |
408 | 325 }; |
326 } |