Skip to main content

iqsm_plus_multi_echo

Function iqsm_plus_multi_echo 

Source
pub fn iqsm_plus_multi_echo(
    phases: &[&[f64]],
    magnitudes: &[&[f64]],
    mask: &[u8],
    grid: &Grid,
    tes: &[f64],
    b0: f64,
    b0_dir: (f64, f64, f64),
    phase_sign: f64,
    eroded_rad: i32,
    model_onnx: &[u8],
    tile: Option<&TileConfig>,
) -> Result<Vec<f64>, OnnxError>
Expand description

Multi-echo iQSM+: reconstruct each echo and combine them with weights (magnitude·TE)², i.e. IqsmEchoWeighting::MagnitudeSquaredTeSquared; without magnitudes, TE² alone.

Both of the authors’ implementations weight this way (checked at sunhongfu/iQSM_Plus 3ba25f5): the MATLAB legacy/matlab/iQSM_plus.m:273-275 (weights = (mag.*TE).^2; sum(weights.*chi,4)./sum(weights,4)) and the Python run.py:199 and app.py:415 (weights = (mag_data * te_bc) ** 2), and it is the inverse-variance weight. Unlike iQSM and iQFM, whose MATLAB uses mag·TE² (an option there; see IqsmEchoWeighting), there is no other weighting to offer.

tile: None runs each echo on the brain’s bounding box in one pass; Some runs it patch by patch, with memory bounded by the patch (an approximation; see [super::iqsm]).