comparison Framework/Toolbox/ShearWarpProjectiveTransform.cpp @ 684:7719eb852dd5

new class: VolumeImageGeometry
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 May 2019 16:47:46 +0200
parents b70e9be013e4
children 9a474e90e832
comparison
equal deleted inserted replaced
683:dbc1d8bfc68a 684:7719eb852dd5
378 * M_view. 378 * M_view.
379 **/ 379 **/
380 380
381 // Compute the "world" matrix that maps the source volume to the 381 // Compute the "world" matrix that maps the source volume to the
382 // (0,0,0)->(1,1,1) unit cube 382 // (0,0,0)->(1,1,1) unit cube
383 Vector origin = source.GetCoordinates(0, 0, 0); 383 Vector origin = source.GetGeometry().GetCoordinates(0, 0, 0);
384 Vector ps = source.GetVoxelDimensions(VolumeProjection_Axial); 384 Vector ps = source.GetGeometry().GetVoxelDimensions(VolumeProjection_Axial);
385 Matrix world = LinearAlgebra::Product( 385 Matrix world = LinearAlgebra::Product(
386 GeometryToolbox::CreateScalingMatrix(1.0 / ps[0], 1.0 / ps[1], 1.0 / ps[2]), 386 GeometryToolbox::CreateScalingMatrix(1.0 / ps[0], 1.0 / ps[1], 1.0 / ps[2]),
387 GeometryToolbox::CreateTranslationMatrix(-origin[0], -origin[1], -origin[2])); 387 GeometryToolbox::CreateTranslationMatrix(-origin[0], -origin[1], -origin[2]));
388 388
389 Matrix worldInv; 389 Matrix worldInv;