Mercurial > hg > orthanc-stone
diff Framework/Layers/OrthancFrameLayerSource.cpp @ 102:fcec0ab44054 wasm
display volumes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 31 May 2017 17:01:18 +0200 |
parents | 166a555becbf |
children | 53025eecbc95 |
line wrap: on
line diff
--- a/Framework/Layers/OrthancFrameLayerSource.cpp Wed May 31 10:35:20 2017 +0200 +++ b/Framework/Layers/OrthancFrameLayerSource.cpp Wed May 31 17:01:18 2017 +0200 @@ -94,19 +94,7 @@ if (loader_.IsGeometryReady() && loader_.LookupSlice(index, viewportSlice)) { - const Slice& slice = loader_.GetSlice(index); - const SliceGeometry& plane = slice.GetGeometry(); - - double sx = slice.GetPixelSpacingX(); - double sy = slice.GetPixelSpacingY(); - double w = static_cast<double>(slice.GetWidth()); - double h = static_cast<double>(slice.GetHeight()); - - points.clear(); - points.push_back(plane.MapSliceToWorldCoordinates(-0.5 * sx, -0.5 * sy)); - points.push_back(plane.MapSliceToWorldCoordinates((w - 0.5) * sx, -0.5 * sy)); - points.push_back(plane.MapSliceToWorldCoordinates(-0.5 * sx, (h - 0.5) * sy)); - points.push_back(plane.MapSliceToWorldCoordinates((w - 0.5) * sx, (h - 0.5) * sy)); + loader_.GetSlice(index).GetExtent(points); return true; } else