Mercurial > hg > orthanc-stone
diff Framework/Toolbox/ShearWarpProjectiveTransform.cpp @ 735:c3bbb130abc4
removing dependencies in ImageBuffer3D
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 May 2019 16:15:06 +0200 |
parents | f45fca2ebd10 |
children | 2d8ab34c8c91 |
line wrap: on
line diff
--- a/Framework/Toolbox/ShearWarpProjectiveTransform.cpp Tue May 21 15:20:04 2019 +0200 +++ b/Framework/Toolbox/ShearWarpProjectiveTransform.cpp Tue May 21 16:15:06 2019 +0200 @@ -343,6 +343,7 @@ float& maxValue, const Matrix& M_view, const ImageBuffer3D& source, + const VolumeImageGeometry& geometry, double pixelSpacing, unsigned int countSlices, ImageInterpolation shearInterpolation, @@ -385,8 +386,8 @@ // Compute the "world" matrix that maps the source volume to the // (0,0,0)->(1,1,1) unit cube - Vector origin = source.GetGeometry().GetCoordinates(0, 0, 0); - Vector ps = source.GetGeometry().GetVoxelDimensions(VolumeProjection_Axial); + Vector origin = geometry.GetCoordinates(0, 0, 0); + Vector ps = geometry.GetVoxelDimensions(VolumeProjection_Axial); Matrix world = LinearAlgebra::Product( GeometryToolbox::CreateScalingMatrix(1.0 / ps[0], 1.0 / ps[1], 1.0 / ps[2]), GeometryToolbox::CreateTranslationMatrix(-origin[0], -origin[1], -origin[2])); @@ -598,6 +599,7 @@ float& maxValue, const Matrix& M_view, const ImageBuffer3D& source, + const VolumeImageGeometry& geometry, bool mip, double pixelSpacing, unsigned int countSlices, @@ -607,13 +609,13 @@ if (mip) { ApplyAxialInternal<SourceFormat, TargetFormat, true> - (target, maxValue, M_view, source, pixelSpacing, + (target, maxValue, M_view, source, geometry, pixelSpacing, countSlices, shearInterpolation, warpInterpolation); } else { ApplyAxialInternal<SourceFormat, TargetFormat, false> - (target, maxValue, M_view, source, pixelSpacing, + (target, maxValue, M_view, source, geometry, pixelSpacing, countSlices, shearInterpolation, warpInterpolation); } } @@ -623,6 +625,7 @@ ShearWarpProjectiveTransform::ApplyAxial(float& maxValue, const Matrix& M_view, const ImageBuffer3D& source, + const VolumeImageGeometry& geometry, Orthanc::PixelFormat targetFormat, unsigned int targetWidth, unsigned int targetHeight, @@ -640,7 +643,7 @@ { ApplyAxialInternal2<Orthanc::PixelFormat_Grayscale16, Orthanc::PixelFormat_Grayscale16> - (*target, maxValue, M_view, source, mip, pixelSpacing, + (*target, maxValue, M_view, source, geometry, mip, pixelSpacing, countSlices, shearInterpolation, warpInterpolation); } else if (source.GetFormat() == Orthanc::PixelFormat_SignedGrayscale16 && @@ -648,7 +651,7 @@ { ApplyAxialInternal2<Orthanc::PixelFormat_SignedGrayscale16, Orthanc::PixelFormat_SignedGrayscale16> - (*target, maxValue, M_view, source, mip, pixelSpacing, + (*target, maxValue, M_view, source, geometry, mip, pixelSpacing, countSlices, shearInterpolation, warpInterpolation); } else