comparison Framework/Radiography/RadiographyLayer.h @ 658:63982c8c294a

merge am-dev -> default
author Alain Mazy <alain@mazy.be>
date Tue, 14 May 2019 18:39:50 +0200
parents f0008c55e5f7 0c5398c3b994
children be9c1530d40a
comparison
equal deleted inserted replaced
656:002d9562c8f5 658:63982c8c294a
62 bool hasCrop_; 62 bool hasCrop_;
63 unsigned int cropX_; 63 unsigned int cropX_;
64 unsigned int cropY_; 64 unsigned int cropY_;
65 unsigned int cropWidth_; 65 unsigned int cropWidth_;
66 unsigned int cropHeight_; 66 unsigned int cropHeight_;
67 bool flipVertical_;
68 bool flipHorizontal_;
67 double panX_; 69 double panX_;
68 double panY_; 70 double panY_;
69 double angle_; 71 double angle_;
70 bool resizeable_; 72 bool resizeable_;
71 double pixelSpacingX_; 73 double pixelSpacingX_;
153 double GetPixelSpacingY() const 155 double GetPixelSpacingY() const
154 { 156 {
155 return pixelSpacingY_; 157 return pixelSpacingY_;
156 } 158 }
157 159
160 void SetFlipVertical(bool flip) // mirrors image around an horizontal axis (note: flip is applied before the rotation !)
161 {
162 flipVertical_ = flip;
163 }
164
165 void SetFlipHorizontal(bool flip) // mirrors image around a vertical axis (note: flip is applied before the rotation !)
166 {
167 flipHorizontal_ = flip;
168 }
169
170 bool GetFlipVertical() const
171 {
172 return flipVertical_;
173 }
174
175 bool GetFlipHorizontal() const
176 {
177 return flipHorizontal_;
178 }
179
180 double GetScalingX() const
181 {
182 return (flipHorizontal_ ? - pixelSpacingX_: pixelSpacingX_);
183 }
184
185 double GetScalingY() const
186 {
187 return (flipVertical_ ? - pixelSpacingY_: pixelSpacingY_);
188 }
158 }; 189 };
159 190
160 private: 191 private:
161 size_t index_; 192 size_t index_;
162 bool hasSize_; 193 bool hasSize_;
238 void SetAngle(double angle); 269 void SetAngle(double angle);
239 270
240 void SetPan(double x, 271 void SetPan(double x,
241 double y); 272 double y);
242 273
274 void SetFlipVertical(bool flip); // mirrors image around an horizontal axis (note: flip is applied before the rotation !)
275
276 void SetFlipHorizontal(bool flip); // mirrors image around a vertical axis (note: flip is applied before the rotation !)
277
243 void SetResizeable(bool resizeable) 278 void SetResizeable(bool resizeable)
244 { 279 {
245 geometry_.SetResizeable(resizeable); 280 geometry_.SetResizeable(resizeable);
246 } 281 }
247 282