pub fn ismv(
field: &[f64],
mask: &[u8],
grid: &Grid,
params: &IsmvParams,
progress: impl FnMut(usize, usize),
) -> Result<(Vec<f64>, Vec<u8>), InputError>Expand description
iSMV background field removal (see the module docs)
§Arguments
field- Total field (nx * ny * nz)mask- Binary mask (nx * ny * nz), 1 = brain, 0 = backgroundgrid- Volume dimensions and voxel sizesparams- iSMV parametersprogress- Progress callback (iteration, expected iterations; with no cap the second is an estimate from the convergence rate so far)
§Returns
(local field, eroded mask). IsmvVariant::Wen2014’s local field is zero outside the
eroded mask (iSMV.m), IsmvVariant::QsmJl’s outside the input mask (QSM.jl).