Skip to main content

chi_sep_medi

Function chi_sep_medi 

Source
pub fn chi_sep_medi<F>(
    local_field: &[f64],
    r2prime: &[f64],
    magnitude: &[f64],
    mask: &[u8],
    grid: &Grid,
    bdir: (f64, f64, f64),
    params: &ChiSepParams,
    progress: F,
) -> (Vec<f64>, Vec<f64>, Vec<f64>)
where F: FnMut(usize, usize),
Expand description

Chi-separation using MEDI-based coupled optimization.

§Arguments

  • local_field - Local field map in ppm (same units convention as the dipole-inversion algorithms; converted to Hz internally via params.cf)
  • r2prime - R2’ map in Hz
  • magnitude - Magnitude image for edge weighting
  • mask - Binary brain mask, 1 = brain
  • grid - Volume grid (dimensions and voxel sizes)
  • bdir - B0 field direction
  • params - Chi-separation parameters (see ChiSepParams)
  • progress - Progress callback: (iteration, total_iterations)

§Returns

(chi_pos, chi_neg, chi_total) — susceptibility maps in ppm

Volumes whose dimensions are not FFT-friendly (2ᵃ·3ᵇ·5ᶜ) are transparently zero-padded to the next fast size for the internal FFTs and cropped back (see chi_sep_ilsqr for details).