Skip to main content

ismv

Function ismv 

Source
pub fn ismv(
    field: &[f64],
    mask: &[u8],
    grid: &Grid,
    params: &IsmvParams,
    progress: impl FnMut(usize, usize),
) -> (Vec<f64>, Vec<u8>)
Expand description

iSMV background field removal

§Arguments

  • field - Total field (nx * ny * nz)
  • mask - Binary mask (nx * ny * nz), 1 = brain, 0 = background
  • grid - Volume dimensions and voxel sizes
  • params - iSMV parameters (tolerance, max iterations, radius in mm)
  • progress - Progress callback (iteration, max_iter)

§Returns

Tuple of (local field, eroded mask)