Skip to main content

direction_cosines

Function direction_cosines 

Source
fn direction_cosines(affine: &[f64; 16]) -> [[f64; 3]; 3]
Expand description

The direction-cosine matrix of an affine: its 3×3 with the voxel sizes divided out, so what is left is the pure rotation taking voxel axes to world axes.

Factoring the voxel sizes out first is what makes everything downstream correct for anisotropic voxels — the same trap b0_direction_from_affine documents.