fn convergence_mask(mask: &[bool], dims: (usize, usize, usize)) -> Vec<bool>Expand description
chi_sep_MEDI’s convergence mask (Mask_erode): the mask eroded by a sphere of radius
erode_size = min(round(min(effective_mask_size)/10), 5) voxels, where effective_mask_size
counts, along each axis, the slices that hold any mask voxel (probed in licensed R2023b: two
10³ cubes far apart give [20 20 20]; voxel sizes and pad_size play no part; a head gives 5).
A radius of 0 (an axis with fewer than five such slices) makes it the whole padded grid, as in
the toolbox. round is MATLAB’s, halves away from zero (15 slices give 2, 25 give 3), as
Rust’s.