Mercurial > hg > orthanc-stone
annotate Framework/Radiography/RadiographyScene.h @ 918:d6c029d15aaa
Merged am-dev into default
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 19 Jul 2019 15:15:13 +0200 |
parents | 580dd82e13f5 |
children | 692291406f6a |
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" |
732
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
25 #include "../Deprecated/Toolbox/DicomFrameConverter.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
26 #include "../Deprecated/Toolbox/OrthancApiClient.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
27 #include "../StoneEnumerations.h" |
481
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
28 #include "Core/Images/Image.h" |
488 | 29 #include "Core/Images/ImageProcessing.h" |
408 | 30 |
31 namespace OrthancStone | |
32 { | |
475
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
33 class RadiographyDicomLayer; |
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: | |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
40 class GeometryChangedMessage : public OriginMessage<RadiographyScene> |
430 | 41 { |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
42 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
43 |
430 | 44 private: |
45 RadiographyLayer& layer_; | |
46 | |
47 public: | |
48 GeometryChangedMessage(const RadiographyScene& origin, | |
49 RadiographyLayer& layer) : | |
50 OriginMessage(origin), | |
51 layer_(layer) | |
52 { | |
53 } | |
54 | |
55 RadiographyLayer& GetLayer() const | |
56 { | |
57 return layer_; | |
58 } | |
59 }; | |
60 | |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
61 class ContentChangedMessage : public OriginMessage<RadiographyScene> |
430 | 62 { |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
63 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
64 |
430 | 65 private: |
66 RadiographyLayer& layer_; | |
67 | |
68 public: | |
69 ContentChangedMessage(const RadiographyScene& origin, | |
438 | 70 RadiographyLayer& layer) : |
430 | 71 OriginMessage(origin), |
72 layer_(layer) | |
73 { | |
74 } | |
75 | |
76 RadiographyLayer& GetLayer() const | |
77 { | |
78 return layer_; | |
79 } | |
80 }; | |
81 | |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
82 class LayerEditedMessage : public OriginMessage<RadiographyScene> |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
83 { |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
84 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
85 |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
86 private: |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
87 const RadiographyLayer& layer_; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
88 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
89 public: |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
90 LayerEditedMessage(const RadiographyScene& origin, |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
91 const RadiographyLayer& layer) : |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
92 OriginMessage(origin), |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
93 layer_(layer) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
94 { |
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 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
97 const RadiographyLayer& GetLayer() const |
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 return layer_; |
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 }; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
102 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
103 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
104 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, WindowingChangedMessage, RadiographyScene); |
408 | 105 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
587
diff
changeset
|
106 |
408 | 107 class LayerAccessor : public boost::noncopyable |
108 { | |
109 private: | |
110 RadiographyScene& scene_; | |
111 size_t index_; | |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
112 RadiographyLayer* layer_; |
408 | 113 |
114 public: | |
115 LayerAccessor(RadiographyScene& scene, | |
116 size_t index); | |
117 | |
118 LayerAccessor(RadiographyScene& scene, | |
119 double x, | |
120 double y); | |
121 | |
122 void Invalidate() | |
123 { | |
124 layer_ = NULL; | |
125 } | |
126 | |
127 bool IsValid() const | |
128 { | |
129 return layer_ != NULL; | |
130 } | |
131 | |
132 RadiographyScene& GetScene() const; | |
133 | |
134 size_t GetIndex() const; | |
135 | |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
136 RadiographyLayer& GetLayer() const; |
408 | 137 }; |
138 | |
139 | |
452
9a8fe40acfff
improved inheritence of RadiographyScene
Alain Mazy <alain@mazy.be>
parents:
440
diff
changeset
|
140 protected: |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
141 typedef std::map<size_t, RadiographyLayer*> Layers; |
408 | 142 |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
143 size_t countLayers_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
144 bool hasWindowing_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
145 float windowingCenter_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
146 float windowingWidth_; |
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
147 Layers layers_; |
408 | 148 |
438 | 149 protected: |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
150 RadiographyLayer& RegisterLayer(RadiographyLayer* layer); |
408 | 151 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
152 void OnTagsReceived(const Deprecated::OrthancApiClient::BinaryResponseReadyMessage& message); |
408 | 153 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
154 virtual void OnFrameReceived(const Deprecated::OrthancApiClient::BinaryResponseReadyMessage& message); |
408 | 155 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
156 void OnDicomExported(const Deprecated::OrthancApiClient::JsonResponseReadyMessage& message); |
408 | 157 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
158 void OnDicomWebReceived(const Deprecated::IWebService::HttpRequestSuccessMessage& message); |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
159 |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
726
diff
changeset
|
160 virtual void OnLayerEdited(const RadiographyLayer::LayerEditedMessage& message); |
408 | 161 public: |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
162 RadiographyScene(MessageBroker& broker); |
408 | 163 |
164 virtual ~RadiographyScene(); | |
165 | |
876 | 166 virtual size_t GetApproximateMemoryUsage() const; |
167 | |
408 | 168 bool GetWindowing(float& center, |
169 float& width) const; | |
170 | |
171 void GetWindowingWithDefault(float& center, | |
172 float& width) const; | |
173 | |
730
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
726
diff
changeset
|
174 virtual void SetWindowing(float center, |
fe938bddb932
fix after namespace rename to Deprecated
Alain Mazy <alain@mazy.be>
parents:
726
diff
changeset
|
175 float width); |
408 | 176 |
739
be9c1530d40a
deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
733
diff
changeset
|
177 RadiographyPhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const; |
432
4eb96c6b4e96
improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents:
430
diff
changeset
|
178 |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
179 RadiographyLayer& LoadText(const Orthanc::Font& font, |
430 | 180 const std::string& utf8, |
181 RadiographyLayer::Geometry* geometry); | |
408 | 182 |
410
6decc0ba9da5
rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
183 RadiographyLayer& LoadTestBlock(unsigned int width, |
430 | 184 unsigned int height, |
185 RadiographyLayer::Geometry* geometry); | |
186 | |
488 | 187 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
|
188 const RadiographyDicomLayer& dicomLayer, |
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
189 float foreground, |
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
190 RadiographyLayer::Geometry* geometry); |
3c28542229a3
added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents:
452
diff
changeset
|
191 |
430 | 192 RadiographyLayer& LoadAlphaBitmap(Orthanc::ImageAccessor* bitmap, // takes ownership |
193 RadiographyLayer::Geometry* geometry); | |
194 | |
553
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
195 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
|
196 const std::string& instance, |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
197 unsigned int frame, |
714
d2c0e347ddc2
deprecating DicomFrameConverter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
658
diff
changeset
|
198 Deprecated::DicomFrameConverter* converter, // takes ownership |
739
be9c1530d40a
deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
733
diff
changeset
|
199 RadiographyPhotometricDisplayMode preferredPhotometricDisplayMode, |
553
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
200 RadiographyLayer::Geometry* geometry); |
92305ee35b1c
web-worker consequences: give access to lower level data
Alain Mazy <alain@mazy.be>
parents:
503
diff
changeset
|
201 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
202 virtual RadiographyLayer& LoadDicomFrame(Deprecated::OrthancApiClient& orthanc, |
438 | 203 const std::string& instance, |
204 unsigned int frame, | |
205 bool httpCompression, | |
206 RadiographyLayer::Geometry* geometry); // pass NULL if you want default geometry | |
408 | 207 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
208 RadiographyLayer& LoadDicomWebFrame(Deprecated::IWebService& web); |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
209 |
425 | 210 void RemoveLayer(size_t layerIndex); |
211 | |
430 | 212 const RadiographyLayer& GetLayer(size_t layerIndex) const; |
425 | 213 |
492 | 214 template <typename TypeLayer> |
215 TypeLayer* GetLayer(size_t index = 0) | |
216 { | |
217 std::vector<size_t> layerIndexes; | |
218 GetLayersIndexes(layerIndexes); | |
219 | |
220 size_t count = 0; | |
221 | |
222 for (size_t i = 0; i < layerIndexes.size(); ++i) | |
223 { | |
224 TypeLayer* typedLayer = dynamic_cast<TypeLayer*>(layers_[layerIndexes[i]]); | |
225 if (typedLayer != NULL) | |
226 { | |
227 if (count == index) | |
228 { | |
229 return typedLayer; | |
230 } | |
231 count++; | |
232 } | |
233 } | |
234 | |
235 return NULL; | |
236 } | |
237 | |
503
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
238 template <typename TypeLayer> |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
239 const TypeLayer* GetLayer(size_t index = 0) const |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
240 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
241 std::vector<size_t> layerIndexes; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
242 GetLayersIndexes(layerIndexes); |
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 size_t count = 0; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
245 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
246 for (size_t i = 0; i < layerIndexes.size(); ++i) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
247 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
248 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
|
249 if (typedLayer != NULL) |
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 if (count == index) |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
252 { |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
253 return typedLayer; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
254 } |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
255 count++; |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
256 } |
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 |
77e0eb83ff63
layers are now Observable and emitting LayerEdited messages
amazy
parents:
492
diff
changeset
|
259 return NULL; |
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 |
430 | 262 void GetLayersIndexes(std::vector<size_t>& output) const; |
425 | 263 |
408 | 264 Extent2D GetSceneExtent() const; |
265 | |
266 void Render(Orthanc::ImageAccessor& buffer, | |
409 | 267 const AffineTransform2D& viewTransform, |
408 | 268 ImageInterpolation interpolation) const; |
269 | |
270 bool LookupLayer(size_t& index /* out */, | |
271 double x, | |
272 double y) const; | |
273 | |
274 void DrawBorder(CairoContext& context, | |
275 unsigned int layer, | |
276 double zoom); | |
277 | |
278 void GetRange(float& minValue, | |
279 float& maxValue) const; | |
280 | |
281 // Export using PAM is faster than using PNG, but requires Orthanc | |
282 // core >= 1.4.3 | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
283 void ExportDicom(Deprecated::OrthancApiClient& orthanc, |
417
aee3d7941c9b
preparing to load images using DICOMweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
410
diff
changeset
|
284 const Orthanc::DicomMap& dicom, |
426 | 285 const std::string& parentOrthancId, |
408 | 286 double pixelSpacingX, |
287 double pixelSpacingY, | |
288 bool invert, | |
289 ImageInterpolation interpolation, | |
290 bool usePam); | |
426 | 291 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
292 void ExportDicom(Deprecated::OrthancApiClient& orthanc, |
483 | 293 const Json::Value& dicomTags, |
294 const std::string& parentOrthancId, | |
295 double pixelSpacingX, | |
296 double pixelSpacingY, | |
297 bool invert, | |
298 ImageInterpolation interpolation, | |
299 bool usePam); | |
300 | |
484
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
301 void ExportToCreateDicomRequest(Json::Value& createDicomRequestContent, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
302 const Json::Value& dicomTags, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
303 const std::string& parentOrthancId, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
304 double pixelSpacingX, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
305 double pixelSpacingY, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
306 bool invert, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
307 ImageInterpolation interpolation, |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
308 bool usePam); |
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
309 |
587 | 310 Orthanc::Image* ExportToCreateDicomRequestAndImage(Json::Value& createDicomRequestContent, |
311 const Json::Value& dicomTags, | |
312 const std::string& parentOrthancId, | |
313 double pixelSpacingX, | |
314 double pixelSpacingY, | |
315 bool invert, | |
316 ImageInterpolation interpolation); | |
317 | |
481
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
318 Orthanc::Image* ExportToImage(double pixelSpacingX, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
319 double pixelSpacingY, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
320 ImageInterpolation interpolation) |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
321 { |
484
7bf001b9d244
re-added ExportToCreateDicomRequest
Alain Mazy <alain@mazy.be>
parents:
483
diff
changeset
|
322 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
|
323 } |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
324 |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
325 Orthanc::Image* ExportToImage(double pixelSpacingX, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
326 double pixelSpacingY, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
327 ImageInterpolation interpolation, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
328 bool invert, |
159a465e27bd
reworked RadiographyScene export to export to an Orthanc::Image too
am@osimis.io
parents:
475
diff
changeset
|
329 int64_t maxValue /* for inversion */); |
408 | 330 }; |
331 } |