Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyLayer.h Tue May 14 16:54:13 2019 +0200 +++ b/Framework/Radiography/RadiographyLayer.h Tue May 14 18:39:50 2019 +0200 @@ -64,6 +64,8 @@ unsigned int cropY_; unsigned int cropWidth_; unsigned int cropHeight_; + bool flipVertical_; + bool flipHorizontal_; double panX_; double panY_; double angle_; @@ -155,6 +157,35 @@ return pixelSpacingY_; } + void SetFlipVertical(bool flip) // mirrors image around an horizontal axis (note: flip is applied before the rotation !) + { + flipVertical_ = flip; + } + + void SetFlipHorizontal(bool flip) // mirrors image around a vertical axis (note: flip is applied before the rotation !) + { + flipHorizontal_ = flip; + } + + bool GetFlipVertical() const + { + return flipVertical_; + } + + bool GetFlipHorizontal() const + { + return flipHorizontal_; + } + + double GetScalingX() const + { + return (flipHorizontal_ ? - pixelSpacingX_: pixelSpacingX_); + } + + double GetScalingY() const + { + return (flipVertical_ ? - pixelSpacingY_: pixelSpacingY_); + } }; private: @@ -240,6 +271,10 @@ void SetPan(double x, double y); + void SetFlipVertical(bool flip); // mirrors image around an horizontal axis (note: flip is applied before the rotation !) + + void SetFlipHorizontal(bool flip); // mirrors image around a vertical axis (note: flip is applied before the rotation !) + void SetResizeable(bool resizeable) { geometry_.SetResizeable(resizeable);