pub fn r2star_qsm_from_magnitude(
magnitude: &[f64],
echo_times: &[f64],
chi_total: &[f64],
mask: &[u8],
params: &R2starQsmParams,
) -> (Vec<f64>, Vec<f64>, Vec<f64>)Expand description
R2*-QSM separation fitting R2* from multi-echo magnitude, then separating.
Fits R2* by magnitude-weighted log-linear least squares (weight ∝ magnitude²),
matching the QSM-CI reference implementation, then calls r2star_qsm.
§Arguments
magnitude— Multi-echo magnitude, flattened as(n_voxels, n_echoes)in row-major order (echo fastest per voxel) — the same layout ascrate::r2star::r2star_arlo.echo_times— Echo times in seconds (n_echoes).chi_total— Conventional QSM χ_total in ppm (n_voxels).mask— Binary brain mask (n_voxels).params— SeeR2starQsmParams.
§Returns
(chi_pos, chi_neg, chi_total) as in r2star_qsm.