comparison OrthancStone/Sources/Volumes/DicomVolumeImageMPRSlicer.cpp @ 1775:fca942f4b4a7

fix conversion from voxel centers to texture borders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 May 2021 19:57:50 +0200
parents f302bbddf94d
children 9ab251c03eda
comparison
equal deleted inserted replaced
1774:95ece40bb298 1775:fca942f4b4a7
93 } 93 }
94 } 94 }
95 95
96 const CoordinateSystem3D& system = volume_.GetGeometry().GetProjectionGeometry(projection_); 96 const CoordinateSystem3D& system = volume_.GetGeometry().GetProjectionGeometry(projection_);
97 97
98 /**
99 * TODO => There was a shift of (0.5, 0.5) introduced by
100 * TextureBaseSceneLayer::GetTransform(). Is it an error?
101 **/
102
103 Vector pixelSpacing = volume_.GetGeometry().GetVoxelDimensions(projection_); 98 Vector pixelSpacing = volume_.GetGeometry().GetVoxelDimensions(projection_);
104 99
105 texture->SetCuttingPlaneTransform(cuttingPlane, system.GetOrigin(), 100 texture->SetCuttingPlaneTransform(cuttingPlane, system.GetOrigin(),
106 system.GetAxisX() * pixelSpacing[0], 101 system.GetAxisX() * pixelSpacing[0],
107 system.GetAxisY() * pixelSpacing[1]); 102 system.GetAxisY() * pixelSpacing[1]);