Skip to main content

lsqr_qsm

Function lsqr_qsm 

Source
pub fn lsqr_qsm(
    local_field: &[f64],
    mask: &[u8],
    magnitude: Option<&[f64]>,
    grid: &Grid,
    bdir: (f64, f64, f64),
    params: &LsqrQsmParams,
    progress: impl FnMut(usize, usize),
) -> Vec<f64>
Expand description

Minimally regularised LSQR dipole inversion.

§Arguments

  • local_field - Local field in ppm (nx * ny * nz, Fortran order)
  • mask - Binary mask; the data equation is written over these voxels only
  • magnitude - Optional magnitude image, the row weight W (used as is; LSQR’s solution does not depend on its scale)
  • grid - Volume grid
  • bdir - B0 direction
  • params - Algorithm parameters
  • progress - Progress callback (iteration, max_iter)

§Returns

Susceptibility map in ppm (zero outside the mask’s bounding box, and outside the mask with mask_output).