pub fn sharp(
field: &[f64],
mask: &[u8],
grid: &Grid,
params: &SharpParams,
) -> (Vec<f64>, Vec<u8>)Expand description
SHARP background field removal
Uses spherical mean value (SMV) filtering to remove background field. The local field is obtained by deconvolving the SMV-filtered field.
§Arguments
field- Unwrapped total field (nx * ny * nz)mask- Binary mask (nx * ny * nz), 1 = inside ROIgrid- Volume dimensions and voxel sizesparams- SHARP parameters (threshold, radius in mm)
§Returns
(local_field, eroded_mask)