pub fn resharp(
field: &[f64],
mask: &[u8],
grid: &Grid,
params: &ResharpParams,
progress: impl FnMut(usize, usize),
) -> (Vec<f64>, Vec<u8>)Expand description
RESHARP background field removal
§Arguments
field- Unwrapped total field (nx * ny * nz)mask- Binary mask (nx * ny * nz), 1 = inside ROIgrid- Volume dimensions and voxel sizesparams- RESHARP algorithm parametersprogress- Progress callback (current_iteration, max_iterations)
§Returns
(local_field, eroded_mask)