Skip to main content

amp_pe

Function amp_pe 

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

AMP-PE nonlinear dipole inversion.

  • local_field — local (tissue) field, ppm-scale, full volume (nx*ny*nz).
  • mask — binary ROI mask (non-zero = inside).
  • magnitude — optional data-fidelity weight (single combined volume, e.g. RSS over echoes). When None, uniform weights and no morphology mask.
  • grid — volume grid (dims + voxel size).
  • bdir — B0 direction.
  • params — see AmpPeParams.
  • progress — callback (stage_iter, total) where total counts both stages.

Returns the susceptibility map (ppm-scale), masked to the ROI, on the input grid.