Skip to main content

resharp

Function resharp 

Source
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 ROI
  • grid - Volume dimensions and voxel sizes
  • params - RESHARP algorithm parameters
  • progress - Progress callback (current_iteration, max_iterations)

§Returns

(local_field, eroded_mask)