annotate Framework/Radiography/RadiographyLayer.h @ 1145:4f99c7905f8d broker

mingw qt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 Nov 2019 18:28:46 +0100
parents d7e06542304c
children 54cbffabdc45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
439
b70e9be013e4 preparing for 2019
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 410
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "../Toolbox/AffineTransform2D.h"
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "../Toolbox/Extent2D.h"
807
c237e0625065 deprecating CairoFont
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 739
diff changeset
26 #include "../Wrappers/CairoContext.h"
503
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
27 #include "../Messages/IMessage.h"
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
28 #include "../Messages/IObservable.h"
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 namespace OrthancStone
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
503
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
32 class RadiographyScene;
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
33
739
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
34 enum RadiographyControlPointType
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
35 {
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
36 RadiographyControlPointType_TopLeftCorner = 0,
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
37 RadiographyControlPointType_TopRightCorner = 1,
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
38 RadiographyControlPointType_BottomRightCorner = 2,
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
39 RadiographyControlPointType_BottomLeftCorner = 3
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
40 };
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
41
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
42 enum RadiographyPhotometricDisplayMode
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
43 {
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
44 RadiographyPhotometricDisplayMode_Default,
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
45
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
46 RadiographyPhotometricDisplayMode_Monochrome1,
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
47 RadiographyPhotometricDisplayMode_Monochrome2
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
48 };
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
49
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
50
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
51 struct ControlPoint
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
52 {
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
53 double x;
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
54 double y;
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
55 size_t index;
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
56
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
57 ControlPoint(double x, double y, size_t index)
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
58 : x(x),
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
59 y(y),
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
60 index(index)
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
61 {}
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
62
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
63 ControlPoint()
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
64 : x(0),
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
65 y(0),
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
66 index(std::numeric_limits<size_t>::max())
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
67 {}
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
68 };
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
69
503
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
70 class RadiographyLayer : public IObservable
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 friend class RadiographyScene;
432
4eb96c6b4e96 improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents: 430
diff changeset
73
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
74 public:
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 503
diff changeset
75 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, LayerEditedMessage, RadiographyLayer);
503
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
76
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
77 class Geometry
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
78 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
79 bool hasCrop_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
80 unsigned int cropX_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
81 unsigned int cropY_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
82 unsigned int cropWidth_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
83 unsigned int cropHeight_;
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
84 bool flipVertical_;
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
85 bool flipHorizontal_;
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
86 double panX_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
87 double panY_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
88 double angle_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
89 bool resizeable_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
90 double pixelSpacingX_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
91 double pixelSpacingY_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
92
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
93 public:
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
94 Geometry();
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
95
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
96 void ResetCrop()
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
97 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
98 hasCrop_ = false;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
99 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
100
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
101 void SetCrop(unsigned int x,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
102 unsigned int y,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
103 unsigned int width,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
104 unsigned int height)
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
105 {
436
04711a2e12cd fix crop + export photometric interpretation correctly
am@osimis.io
parents: 432
diff changeset
106 hasCrop_ = true;
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
107 cropX_ = x;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
108 cropY_ = y;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
109 cropWidth_ = width;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
110 cropHeight_ = height;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
111 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
112
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
113 bool HasCrop() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
114 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
115 return hasCrop_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
116 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
117
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
118 void GetCrop(unsigned int& x,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
119 unsigned int& y,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
120 unsigned int& width,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
121 unsigned int& height) const;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
122
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
123 void SetAngle(double angle)
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
124 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
125 angle_ = angle;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
126 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
127
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
128 double GetAngle() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
129 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
130 return angle_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
131 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
132
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
133 void SetPan(double x,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
134 double y)
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
135 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
136 panX_ = x;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
137 panY_ = y;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
138 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
139
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
140 double GetPanX() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
141 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
142 return panX_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
143 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
144
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
145 double GetPanY() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
146 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
147 return panY_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
148 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
149
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
150 bool IsResizeable() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
151 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
152 return resizeable_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
153 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
154
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
155 void SetResizeable(bool resizeable)
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
156 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
157 resizeable_ = resizeable;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
158 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
159
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
160 void SetPixelSpacing(double x,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
161 double y)
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
162 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
163 pixelSpacingX_ = x;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
164 pixelSpacingY_ = y;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
165 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
166
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
167 double GetPixelSpacingX() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
168 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
169 return pixelSpacingX_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
170 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
171
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
172 double GetPixelSpacingY() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
173 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
174 return pixelSpacingY_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
175 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
176
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
177 void SetFlipVertical(bool flip) // mirrors image around an horizontal axis (note: flip is applied before the rotation !)
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
178 {
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
179 flipVertical_ = flip;
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
180 }
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
181
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
182 void SetFlipHorizontal(bool flip) // mirrors image around a vertical axis (note: flip is applied before the rotation !)
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
183 {
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
184 flipHorizontal_ = flip;
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
185 }
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
186
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
187 bool GetFlipVertical() const
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
188 {
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
189 return flipVertical_;
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
190 }
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
191
630
Alain Mazy <alain@mazy.be>
parents: 629
diff changeset
192 bool GetFlipHorizontal() const
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
193 {
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
194 return flipHorizontal_;
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
195 }
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
196
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
197 double GetScalingX() const
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
198 {
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
199 return (flipHorizontal_ ? - pixelSpacingX_: pixelSpacingX_);
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
200 }
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
201
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
202 double GetScalingY() const
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
203 {
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
204 return (flipVertical_ ? - pixelSpacingY_: pixelSpacingY_);
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
205 }
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
206 };
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
207
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 private:
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 size_t index_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 bool hasSize_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 unsigned int width_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 unsigned int height_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 AffineTransform2D transform_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 AffineTransform2D transformInverse_;
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
215 Geometry geometry_;
739
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
216 RadiographyPhotometricDisplayMode prefferedPhotometricDisplayMode_;
503
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
217 const RadiographyScene& scene_;
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 protected:
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
220 virtual const AffineTransform2D& GetTransform() const
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 return transform_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 }
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
225 virtual const AffineTransform2D& GetTransformInverse() const
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
226 {
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
227 return transformInverse_;
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
228 }
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
229
739
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
230 void SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode prefferedPhotometricDisplayMode);
432
4eb96c6b4e96 improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents: 430
diff changeset
231
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 private:
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 void UpdateTransform();
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
234
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 void AddToExtent(Extent2D& extent,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 double x,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 double y) const;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 void SetIndex(size_t index)
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 index_ = index;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 }
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
243
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 bool Contains(double x,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 double y) const;
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
246
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 void DrawBorders(CairoContext& context,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 double zoom);
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250 public:
1066
b537002f83a9 removing broker from deprecated classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 876
diff changeset
251 RadiographyLayer(const RadiographyScene& scene);
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 virtual ~RadiographyLayer()
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 }
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 size_t GetIndex() const
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 return index_;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 }
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261
503
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
262 const RadiographyScene& GetScene() const
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
263 {
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
264 return scene_;
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
265 }
77e0eb83ff63 layers are now Observable and emitting LayerEdited messages
amazy
parents: 480
diff changeset
266
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
267 const Geometry& GetGeometry() const
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268 {
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
269 return geometry_;
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 }
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
272 void SetGeometry(const Geometry& geometry);
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
273
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
274 void ResetCrop();
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
275
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 void SetCrop(unsigned int x,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 unsigned int y,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 unsigned int width,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 unsigned int height);
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 void GetCrop(unsigned int& x,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 unsigned int& y,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 unsigned int& width,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 unsigned int& height) const;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 void SetAngle(double angle);
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
288 void SetPan(double x,
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
289 double y);
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
290
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
291 void SetFlipVertical(bool flip); // mirrors image around an horizontal axis (note: flip is applied before the rotation !)
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
292
629
Alain Mazy <alain@mazy.be>
parents: 620
diff changeset
293 void SetFlipHorizontal(bool flip); // mirrors image around a vertical axis (note: flip is applied before the rotation !)
620
fd9b9d993fc7 added flip to RadiographyLayer
Alain Mazy <alain@mazy.be>
parents: 503
diff changeset
294
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
295 void SetResizeable(bool resizeable)
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 {
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
297 geometry_.SetResizeable(resizeable);
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 }
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 void SetSize(unsigned int width,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 unsigned int height);
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302
430
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
303 bool HasSize() const
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
304 {
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
305 return hasSize_;
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
306 }
b85f635f1eb5 added serialization for RadiographyScene
am@osimis.io
parents: 410
diff changeset
307
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 unsigned int GetWidth() const
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 return width_;
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
311 }
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313 unsigned int GetHeight() const
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314 {
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
315 return height_;
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
316 }
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
317
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
318 Extent2D GetExtent() const;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
319
480
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
320 virtual bool GetPixel(unsigned int& imageX,
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
321 unsigned int& imageY,
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
322 double sceneX,
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
323 double sceneY) const;
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
324
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 void SetPixelSpacing(double x,
1118
35e798b16b65 RadiographyDicomLayer: allow replacing low res image by high res image
Alain Mazy <alain@mazy.be>
parents: 876
diff changeset
326 double y,
35e798b16b65 RadiographyDicomLayer: allow replacing low res image by high res image
Alain Mazy <alain@mazy.be>
parents: 876
diff changeset
327 bool emitLayerEditedEvent = true);
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
328
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
329 void GetCenter(double& centerX,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
330 double& centerY) const;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
331
480
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
332 virtual void GetControlPoint(ControlPoint& cpScene /* out in scene coordinates */,
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
333 size_t index) const;
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
334
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
335 virtual size_t GetControlPointCount() const;
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
336
480
2f6ecb5037ea added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents: 476
diff changeset
337 bool LookupControlPoint(ControlPoint& cpScene /* out */,
476
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
338 double x,
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
339 double y,
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
340 double zoom,
a95090305dd4 Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
am@osimis.io
parents: 475
diff changeset
341 double viewportDistance) const;
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 virtual bool GetDefaultWindowing(float& center,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344 float& width) const = 0;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
345
739
be9c1530d40a deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 658
diff changeset
346 RadiographyPhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const
432
4eb96c6b4e96 improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents: 430
diff changeset
347 {
4eb96c6b4e96 improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents: 430
diff changeset
348 return prefferedPhotometricDisplayMode_;
4eb96c6b4e96 improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents: 430
diff changeset
349 }
4eb96c6b4e96 improved handling of MONOCHROME1, background and invertion
am@osimis.io
parents: 430
diff changeset
350
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351 virtual void Render(Orthanc::ImageAccessor& buffer,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352 const AffineTransform2D& viewTransform,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353 ImageInterpolation interpolation) const = 0;
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355 virtual bool GetRange(float& minValue,
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356 float& maxValue) const = 0;
475
3c28542229a3 added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents: 440
diff changeset
357
3c28542229a3 added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents: 440
diff changeset
358 friend class RadiographyMaskLayer; // because it needs to GetTransform on the dicomLayer it relates to
876
580dd82e13f5 added GetApproximateMemoryUsage
Alain Mazy <alain@mazy.be>
parents: 807
diff changeset
359
580dd82e13f5 added GetApproximateMemoryUsage
Alain Mazy <alain@mazy.be>
parents: 807
diff changeset
360 virtual size_t GetApproximateMemoryUsage() const // this is used to limit the number of scenes loaded in RAM when resources are limited (we actually only count the size used by the images, not the C structs)
580dd82e13f5 added GetApproximateMemoryUsage
Alain Mazy <alain@mazy.be>
parents: 807
diff changeset
361 {
580dd82e13f5 added GetApproximateMemoryUsage
Alain Mazy <alain@mazy.be>
parents: 807
diff changeset
362 return 0;
580dd82e13f5 added GetApproximateMemoryUsage
Alain Mazy <alain@mazy.be>
parents: 807
diff changeset
363 }
475
3c28542229a3 added a mask layer in the RadiographyWidget (to be cleaned)
am@osimis.io
parents: 440
diff changeset
364 };
410
6decc0ba9da5 rename RadiographyScene::Layer as RadiographyLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365 }