pub fn dilate_mask(mask: &[u8], grid: &Grid, iterations: usize) -> Vec<u8> ⓘ
Dilate a binary mask by expanding into neighboring voxels (6-connectivity).
Each iteration adds voxels that have any 6-connected neighbor equal to 1.