Expand description
QSM pipeline stages and utilities
Shared stage functions that both qsmxt.rs and qsmbly call to ensure identical processing. Each consumer calls the stages individually with its own I/O and caching layer on top.
§Pipeline stages (typical order)
run_motion_correction— optional: co-register the echo series before fitting across itrun_field_mapping— multi-echo phase → B0 field map (ppm)run_bg_removal— total field → local field (ppm)run_dipole_inversion— local field → susceptibility (ppm)apply_reference— mean subtraction
Two-pass artefact reduction (two_pass) runs stages 2-3 a second time against a mask whose
holes are intact, then folds the two reconstructions together.
per_echo runs stages 1-4 once per echo instead (QsmPipelineConfig::qsm_per_echo): a
QSM for each echo, and their mean.
For TGV, use run_tgv which combines steps 1-4 internally.
run_qsmart reports its progress and intermediates (vessel mask, per-stage local fields and
χ) to an Observer as borrowed slices, so a host can show or save them without the stage
keeping copies.
rules says what each method requires, recommends and discourages of the rest of the
configuration, with sources, and checks a configuration against it (rules::evaluate).
§Combined algorithms
- HARPERELLA: SMV-based exterior Laplacian estimation (Li et al., 2014)
- iHARPERELLA: Phase-domain exterior estimation with improved low-freq suppression (Li et al., 2015)
Re-exports§
pub use phase_utils::scale_phase_to_pi;pub use phase_utils::hz_to_ppm;pub use phase_utils::rads_to_ppm;pub use phase_utils::ppm_to_hz;pub use phase_utils::ppm_to_rads;pub use phase_utils::rss_combine;pub use referencing::apply_reference;pub use masking::apply_mask_ops;pub use masking::build_mask_section;pub use masking::resolve_masking_input;pub use masking::run_masking;pub use masking::section_magnitude;pub use motion::run_motion_correction;pub use motion::MotionCorrectionConfig;pub use motion::MotionCorrectionResult;pub use field_mapping::run_field_mapping;pub use bg_removal::run_bg_removal;pub use inversion::heidi_seed_problem;pub use inversion::run_dipole_inversion;pub use inversion::run_heidi_cone_fill;pub use inversion::run_tgv;pub use inversion::run_nextqsm;pub use inversion::run_iqsm;pub use inversion::run_iqsm_plus;pub use inversion::run_iqfm;pub use separation::run_separation;pub use separation::SeparationInputs;pub use separation::SeparationResult;pub use observer::Observer;pub use observer::VolumeRef;pub use qsmart::run_qsmart;pub use two_pass::combine_two_pass;pub use two_pass::default_reliable_sections;pub use two_pass::restrict_reliable_mask;pub use config::*;
Modules§
- bg_
removal - Background field removal stage
- config
- Pipeline configuration types
- field_
mapping - Field mapping stage
- inversion
- Dipole inversion stage
- masking
- Masking stage
- motion
- Motion-correction stage: co-register a multi-echo series onto one echo before field mapping.
- observer
- Progress and intermediate outputs reported by pipeline stages as they run.
- per_
echo - Per-echo QSM: a susceptibility map reconstructed from each echo on its own.
- phase_
utils - Phase and field conversion utilities
- qsmart
- QSMART two-stage reconstruction
- referencing
- QSM referencing
- rules
- Pipeline rules: what each method requires, recommends and discourages, with sources.
- separation
- Susceptibility source-separation stage.
- two_
pass - Two-pass artefact reduction.