Skip to main content

mindgrab

Function mindgrab 

Source
pub fn mindgrab(
    image: &[f64],
    grid: &Grid,
    affine: &[f64; 16],
    model_onnx: &[u8],
    params: &MindGrabParams,
    progress: impl FnMut(usize, usize),
) -> Result<Vec<u8>, OnnxError>
Expand description

Brain mask via MindGrab.

  • image — head image of any contrast (for GRE, a magnitude), column-major (nx, ny, nz).
  • affine — the image’s voxel→world affine (row-major 4×4, as in a NIfTI sform/qform).
  • model_onnx — bytes of the exported mindgrab.onnx (see crate::models).
  • progress(done, total) — called after each network evaluation.

Returns a binary mask (0/1) on the input grid.