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.
For multi-echo data, runs field mapping first to get B0, then converts to phase at TE1. For single-echo, uses wrapped phase directly. TGV internally handles unwrapping + background removal + inversion.
§Returns
Susceptibility map in ppm (unreferenced — call apply_reference after)