Skip to main content

wavesep

Function wavesep 

Source
pub fn wavesep(
    chi_total: &[f64],
    r2prime: &[f64],
    mask: &[u8],
    grid: &Grid,
    params: &WaveSepParams,
    progress: impl FnMut(usize, usize),
) -> (Vec<f64>, Vec<f64>, Vec<f64>)
Expand description

WaveSep source separation from a QSM and an R2’ map.

§Arguments

  • chi_total — Conventional QSM χ_total in ppm (nx·ny·nz, column-major).
  • r2prime — R2’ map in Hz (nx·ny·nz).
  • mask — Binary brain mask (nx·ny·nz, 1 = inside).
  • grid — Volume dimensions and voxel sizes.
  • params — See WaveSepParams.
  • progress — Progress callback (iteration, max_iterations).

§Returns

(chi_pos, chi_neg, chi_total) in ppm, restricted to mask — matching the chi_sep_ilsqr/chi_sep_medi convention: chi_pos ≥ 0 (paramagnetic), chi_neg ≤ 0 (diamagnetic, signed), and chi_total = chi_pos + chi_neg.