Expand description
iQSM single-step deep-learning reconstruction (onnx feature).
iQSM (Gao 2022) maps raw wrapped MRI phase (radians) directly to
susceptibility (ppm) — unwrapping, background removal and dipole inversion in
one network (a learnable-Laplacian “LoT” front-end + a U-Net). The exported
graph takes four inputs: phase, mask, te (s, scalar), b0 (T, scalar).
This mirrors the authors’ inference.run_iqsm: flip the phase sign, erode the
mask by a radius-3 sphere, centre-pad each dim to a multiple of 16, run the
net, multiply by the (padded) mask, and crop back. For multi-echo data each
echo is reconstructed and combined with magnitude·TE² weighting
(iqsm_multi_echo).
Weights are not bundled; the caller passes the exported iqsm.onnx bytes.
Functions§
- iqsm
- Run iQSM on a single echo of wrapped phase.
- iqsm_
multi_ echo - Multi-echo iQSM: reconstruct each echo and combine with magnitude·TE² weights
(the authors’
--echo_4dpath).phases/magnitudesare per-echo volumes;testhe echo times (s). Falls back to uniform weights ifmagnitudesis empty. - iqsm_
with 🔒 - sphere_
erode 🔒 - Binary erosion by a solid sphere of the given radius (voxels), matching
scipy.ndimage.binary_erosionwithborder_value=0(out-of-bounds = false).