pub fn run_tgv(
phases: &[&[f64]],
magnitudes: Option<&[&[f64]]>,
mask: &[u8],
metadata: &ScanMetadata,
field_mapping_config: &FieldMappingConfig,
tgv_params: &TgvParams,
reference: QsmReference,
progress: &mut dyn FnMut(usize, usize),
) -> Result<Vec<f64>, PipelineError>Expand description
Run TGV single-step QSM reconstruction.
Multi-echo data goes through field mapping first and TGV runs on the field in ppm
(TgvInput::FieldPpm), expressed as phase at the
echo time TgvParams::te picks (by default the first).
Single-echo data goes in as the wrapped phase with its echo time
(TgvInput::WrappedPhase), and TGV handles
unwrapping as well. Either way the scan’s field strength is passed, α are in the
reference’s rad units at that TE and B0, and TGV also does background removal and
inversion. A multi-echo field is defined only in its
valid_mask, so TGV runs (and χ is non-zero) there.
§Returns
Susceptibility map in ppm (unreferenced — call apply_reference after)