Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyLayerCropTracker.cpp @ 739:be9c1530d40a
deprecating enum SliceImageQuality
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 22 May 2019 09:13:04 +0200 |
parents | 4f2416d519b4 |
children | 2d8ab34c8c91 |
comparison
equal
deleted
inserted
replaced
738:8e31b174ab26 | 739:be9c1530d40a |
---|---|
110 RadiographyLayer& layer = accessor_.GetLayer(); | 110 RadiographyLayer& layer = accessor_.GetLayer(); |
111 if (layer.GetPixel(x, y, sceneX, sceneY)) | 111 if (layer.GetPixel(x, y, sceneX, sceneY)) |
112 { | 112 { |
113 unsigned int targetX, targetWidth; | 113 unsigned int targetX, targetWidth; |
114 | 114 |
115 if (startControlPoint_.index == ControlPoint_TopLeftCorner || | 115 if (startControlPoint_.index == RadiographyControlPointType_TopLeftCorner || |
116 startControlPoint_.index == ControlPoint_BottomLeftCorner) | 116 startControlPoint_.index == RadiographyControlPointType_BottomLeftCorner) |
117 { | 117 { |
118 targetX = std::min(x, cropX_ + cropWidth_); | 118 targetX = std::min(x, cropX_ + cropWidth_); |
119 targetWidth = cropX_ + cropWidth_ - targetX; | 119 targetWidth = cropX_ + cropWidth_ - targetX; |
120 } | 120 } |
121 else | 121 else |
124 targetWidth = std::max(x, cropX_) - cropX_; | 124 targetWidth = std::max(x, cropX_) - cropX_; |
125 } | 125 } |
126 | 126 |
127 unsigned int targetY, targetHeight; | 127 unsigned int targetY, targetHeight; |
128 | 128 |
129 if (startControlPoint_.index == ControlPoint_TopLeftCorner || | 129 if (startControlPoint_.index == RadiographyControlPointType_TopLeftCorner || |
130 startControlPoint_.index == ControlPoint_TopRightCorner) | 130 startControlPoint_.index == RadiographyControlPointType_TopRightCorner) |
131 { | 131 { |
132 targetY = std::min(y, cropY_ + cropHeight_); | 132 targetY = std::min(y, cropY_ + cropHeight_); |
133 targetHeight = cropY_ + cropHeight_ - targetY; | 133 targetHeight = cropY_ + cropHeight_ - targetY; |
134 } | 134 } |
135 else | 135 else |