fn erode(
mask: &[u8],
nx: usize,
ny: usize,
nz: usize,
vsx: f64,
vsy: f64,
vsz: f64,
radius: f64,
) -> Vec<u8> ⓘExpand description
Erode mask by a sphere of radius mm: keep the voxels whose whole sphere lies in the mask.
The radius is widened by one part in 10^6 so that a voxel exactly radius away counts as
inside the sphere whatever the rounding of the voxel size: a header voxel size of
0.99999994 mm must not drop the voxels at exactly radius from the sphere.