pub fn msmv(
field: &[f64],
mask: &[u8],
grid: &Grid,
params: &MsmvParams,
progress: impl FnMut(usize, usize),
) -> (Vec<f64>, Vec<u8>)Expand description
mSMV background field removal (SMV primary removal + boundary shadow correction).
§Arguments
field— Field in ppm (nx·ny·nz, column-major): the unwrapped total field whenparams.prefilteristrue, or an already-local field (from a primary BFR) whenfalse.mask— Binary brain mask (nx·ny·nz, 1 = inside).grid— Volume dimensions and voxel sizes.params— SeeMsmvParams.progress— Progress callback(iteration, max_iterations)over the boundary-correction loop.
§Returns
(local_field_ppm, mask) — the filtered local field in ppm restricted to
mask, and the mask unchanged (mSMV preserves the brain edge; it does not
erode). Same (field, eroded_mask) return shape as the other BFR methods.