pub fn erode_mask(mask: &[u8], grid: &Grid, iterations: usize) -> Vec<u8> ⓘExpand description
Erode a binary mask by removing boundary voxels (6-connectivity).
Each iteration removes voxels that have any 6-connected neighbor equal to 0 or that sit on the volume boundary.