Skip to main content

heidi

Function heidi 

Source
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 mask
  • magnitude - Optional magnitude image, the LSQR seed’s data weight
  • grid - Volume grid
  • bdir - B0 direction
  • lsqr - Parameters of the LSQR seed (its mask_output is ignored: the seed stays unmasked, as upstream’s susceptibilityRaw)
  • params - HEIDI parameters
  • progress - Progress callback (iteration, total_iterations), over both stages

§Returns

Susceptibility map in ppm, masked.