comparison Framework/Radiography/RadiographyDicomLayer.cpp @ 1204:b519c1c878f1 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Nov 2019 21:24:29 +0100
parents 54cbffabdc45 ab958fd99b07
children 7ec8fea061b9
comparison
equal deleted inserted replaced
1203:f3bb9a6dd949 1204:b519c1c878f1
160 AffineTransform2D::CreateOffset(cropX, cropY)); 160 AffineTransform2D::CreateOffset(cropX, cropY));
161 161
162 Orthanc::ImageAccessor cropped; 162 Orthanc::ImageAccessor cropped;
163 converted_->GetRegion(cropped, cropX, cropY, cropWidth, cropHeight); 163 converted_->GetRegion(cropped, cropX, cropY, cropWidth, cropHeight);
164 164
165 unsigned int x1, y1, x2, y2;
166 if (!OrthancStone::GetProjectiveTransformExtent(x1, y1, x2, y2,
167 t.GetHomogeneousMatrix(),
168 cropped.GetWidth(),
169 cropped.GetHeight(),
170 buffer.GetWidth(),
171 buffer.GetHeight()))
172 {
173 return; // layer is outside the buffer
174 }
175
165 t.Apply(buffer, cropped, interpolation, false); 176 t.Apply(buffer, cropped, interpolation, false);
166 unsigned int x1, y1, x2, y2;
167 OrthancStone::GetProjectiveTransformExtent(x1, y1, x2, y2,
168 t.GetHomogeneousMatrix(),
169 cropped.GetWidth(),
170 cropped.GetHeight(),
171 buffer.GetWidth(),
172 buffer.GetHeight());
173 177
174 if (applyWindowing) 178 if (applyWindowing)
175 { 179 {
176 // apply windowing but stay in the range [0.0, 65535.0] 180 // apply windowing but stay in the range [0.0, 65535.0]
177 float w0 = windowCenter - windowWidth / 2.0f; 181 float w0 = windowCenter - windowWidth / 2.0f;