Mercurial > hg > orthanc-stone
changeset 629:8d66efecd91c am-dev
rename
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 08 May 2019 16:38:25 +0200 |
parents | 84af39146e76 |
children | 0c5398c3b994 |
files | Framework/Radiography/RadiographyLayer.cpp Framework/Radiography/RadiographyLayer.h Framework/Radiography/RadiographySceneReader.cpp Framework/Radiography/RadiographySceneWriter.cpp |
diffstat | 4 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyLayer.cpp Wed May 08 16:32:57 2019 +0200 +++ b/Framework/Radiography/RadiographyLayer.cpp Wed May 08 16:38:25 2019 +0200 @@ -34,8 +34,8 @@ RadiographyLayer::Geometry::Geometry() : hasCrop_(false), - verticalFlip_(false), - horizontalFlip_(false), + flipVertical_(false), + flipHorizontal_(false), panX_(0), panY_(0), angle_(0), @@ -206,17 +206,17 @@ EmitMessage(RadiographyLayer::LayerEditedMessage(*this)); } - void RadiographyLayer::SetVerticalFlip(bool flip) + void RadiographyLayer::SetFlipVertical(bool flip) { - geometry_.SetVerticalFlip(flip); + geometry_.SetFlipVertical(flip); UpdateTransform(); EmitMessage(RadiographyLayer::LayerEditedMessage(*this)); } - void RadiographyLayer::SetHorizontalFlip(bool flip) + void RadiographyLayer::SetFlipHorizontal(bool flip) { - geometry_.SetHorizontalFlip(flip); + geometry_.SetFlipHorizontal(flip); UpdateTransform(); EmitMessage(RadiographyLayer::LayerEditedMessage(*this));
--- a/Framework/Radiography/RadiographyLayer.h Wed May 08 16:32:57 2019 +0200 +++ b/Framework/Radiography/RadiographyLayer.h Wed May 08 16:38:25 2019 +0200 @@ -75,8 +75,8 @@ unsigned int cropY_; unsigned int cropWidth_; unsigned int cropHeight_; - bool verticalFlip_; - bool horizontalFlip_; + bool flipVertical_; + bool flipHorizontal_; double panX_; double panY_; double angle_; @@ -168,34 +168,34 @@ return pixelSpacingY_; } - void SetVerticalFlip(bool flip) // mirrors image around an horizontal axis (note: flip is applied before the rotation !) + void SetFlipVertical(bool flip) // mirrors image around an horizontal axis (note: flip is applied before the rotation !) { - verticalFlip_ = flip; + flipVertical_ = flip; } - void SetHorizontalFlip(bool flip) // mirrors image around a vertical 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 !) { - horizontalFlip_ = flip; + flipHorizontal_ = flip; } - bool GetVerticalFlip() const + bool GetFlipVertical() const { - return verticalFlip_; + return flipVertical_; } - bool GetHorizontalFlip() const + bool GetHorizontalVertical() const { - return horizontalFlip_; + return flipHorizontal_; } double GetScalingX() const { - return (horizontalFlip_ ? - pixelSpacingX_: pixelSpacingX_); + return (flipHorizontal_ ? - pixelSpacingX_: pixelSpacingX_); } double GetScalingY() const { - return (verticalFlip_ ? - pixelSpacingY_: pixelSpacingY_); + return (flipVertical_ ? - pixelSpacingY_: pixelSpacingY_); } }; @@ -282,9 +282,9 @@ void SetPan(double x, double y); - void SetVerticalFlip(bool flip); // mirrors image around an horizontal axis (note: flip is applied before the rotation !) + void SetFlipVertical(bool flip); // mirrors image around an horizontal axis (note: flip is applied before the rotation !) - void SetHorizontalFlip(bool flip); // mirrors image around a vertical 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) {
--- a/Framework/Radiography/RadiographySceneReader.cpp Wed May 08 16:32:57 2019 +0200 +++ b/Framework/Radiography/RadiographySceneReader.cpp Wed May 08 16:38:25 2019 +0200 @@ -236,13 +236,13 @@ geometry.SetPixelSpacing(jsonLayer["pixelSpacing"]["x"].asDouble(), jsonLayer["pixelSpacing"]["y"].asDouble()); // these fields were introduced later -> they might not exist - if (jsonLayer.isMember("verticalFlip")) + if (jsonLayer.isMember("flipVertical")) { - geometry.SetVerticalFlip(jsonLayer["verticalFlip"].asBool()); + geometry.SetFlipVertical(jsonLayer["flipVertical"].asBool()); } - if (jsonLayer.isMember("horizontalFlip")) + if (jsonLayer.isMember("flipHorizontal")) { - geometry.SetHorizontalFlip(jsonLayer["horizontalFlip"].asBool()); + geometry.SetFlipHorizontal(jsonLayer["flipHorizontal"].asBool()); } }
--- a/Framework/Radiography/RadiographySceneWriter.cpp Wed May 08 16:32:57 2019 +0200 +++ b/Framework/Radiography/RadiographySceneWriter.cpp Wed May 08 16:38:25 2019 +0200 @@ -132,8 +132,8 @@ output["pixelSpacing"] = pan; } - output["verticalFlip"] = geometry.GetVerticalFlip(); - output["horizontalFlip"] = geometry.GetHorizontalFlip(); + output["flipVertical"] = geometry.GetFlipVertical(); + output["flipHorizontal"] = geometry.GetHorizontalVertical(); if (dynamic_cast<const RadiographyTextLayer*>(&layer) != NULL) {