Skip to main content

r2star_qsm

Function r2star_qsm 

Source
pub fn r2star_qsm(
    chi_total: &[f64],
    r2star: &[f64],
    mask: &[u8],
    params: &R2starQsmParams,
) -> (Vec<f64>, Vec<f64>, Vec<f64>)
Expand description

Closed-form R2*-QSM separation from a QSM and an R2* map.

§Arguments

  • chi_total — Conventional QSM χ_total in ppm (n voxels).
  • r2star — R2* map in Hz (n voxels), e.g. from crate::r2star::r2star_arlo.
  • mask — Binary brain mask (n voxels, 1 = inside).
  • params — See R2starQsmParams.

§Returns

(chi_pos, chi_neg, chi_total) in ppm, restricted to mask — matching the chi_sep_ilsqr/chi_sep_medi convention: chi_pos ≥ 0 (paramagnetic), chi_neg ≤ 0 (diamagnetic, signed), and chi_total = chi_pos + chi_neg.