Skip to main content

tdcsmv

Function tdcsmv 

Source
pub fn tdcsmv(
    dims: (usize, usize, usize),
    voxel_size: (f64, f64, f64),
    radius: f64,
) -> Vec<f64>
Expand description

tdcsmv.m (agr78/mSMV 42a1f18): the SMV sphere of radius mm on a dims array, centred at the FFT origin, normalised to sum 1 (image space; tdcsmv.m returns its fftn).

Each voxel within the sphere’s reach gets the fraction of its w-per-edge sub-voxel samples inside the sphere. Two changes, unchanged on every input tdcsmv.m runs on (see the module docs): the second axis uses voxel_size.1 (tdcsmv.m uses voxel_size(1) for it), and the search for w stops at TDCSMV_MAX_SUBVOXEL. Placement wraps around the array (tdcsmv.m places at end/2+1+offset and fftshifts, which is the same on even sizes).