Skip to main content

medi

Function medi 

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

MEDI L1 dipole inversion (OPTIMIZED f32 VERSION)

§Arguments

  • local_field - Local field/phase (RDF) in radians (nx * ny * nz)
  • n_std - Noise standard deviation map (same size as local_field)
  • magnitude - Magnitude image for gradient weighting (nx * ny * nz)
  • mask - Binary mask (nx * ny * nz), 1 = brain
  • grid - Volume grid (dimensions and voxel sizes)
  • bdir - B0 field direction
  • params - MEDI parameters
  • progress - Progress callback (current_step, total_steps)

§Returns

Susceptibility map (in same units as input field)