pub fn create_mip(
data: &[f64],
grid: &Grid,
affine: &[f64; 16],
window: usize,
) -> Result<Mip, String>Expand description
Minimum intensity projection along the z-axis.
For each (x, y) position, takes the minimum value over a sliding window of window slices
along z. The result is window - 1 slices shorter than data and sits half a slab further
along the slice direction, so it comes back as a Mip carrying its own grid and affine —
see mip_geometry for the convention.
§Arguments
data- 3D volume (Fortran order)grid- Volume grid (dimensions and voxel sizes)affine- Row-major 4×4 voxel→world affine ofdata. Pass an identity affine if the caller has no world geometry; the projection’s affine is then identity-with-origin-shift.window- Number of slices in the projection window
§Errors
If window is zero or deeper than the volume, or if data does not match grid.