pub fn heidi(
local_field: &[f64],
mask: &[u8],
magnitude: Option<&[f64]>,
grid: &Grid,
bdir: (f64, f64, f64),
lsqr: &LsqrQsmParams,
params: &HeidiParams,
progress: impl FnMut(usize, usize),
) -> Vec<f64>Expand description
HEIDI dipole inversion: LSQR ([super::lsqr_qsm]) followed by HEIDI’s cone fill, as
qsm_heidi’s inversion_lsqr.m then inversion_heidi.m.
§Arguments
local_field- Local field in ppm (nx * ny * nz, Fortran order)mask- Binary brain maskmagnitude- Optional magnitude image, the LSQR seed’s data weightgrid- Volume gridbdir- B0 directionlsqr- Parameters of the LSQR seed (itsmask_outputis ignored: the seed stays unmasked, as upstream’ssusceptibilityRaw)params- HEIDI parametersprogress- Progress callback(iteration, total_iterations), over both stages
§Returns
Susceptibility map in ppm, masked.