pub(crate) fn crop_grid(
mask: &[u8],
dims: (usize, usize, usize),
) -> Option<[(usize, usize, usize); 3]>Expand description
The grid upstream solves on: the mask’s bounding box (zealouscrop), each extent made even
by one trailing voxel and then grown by the anti-aliasing frame less one voxel
(prepareforconvolution: makeeven, 20 voxels per side, makeodd).
Returns (start, extent, padded) per axis, or None for an empty mask. The crop sits
FRAME_OFFSET voxels in, as upstream’s (for LSQR only the grid size matters, as every
operator is a circular convolution or pointwise; HEIDI’s gradients and diffusion see the
grid’s edges).