pub fn run_nextqsm(
total_field_ppm: &[f64],
mask: &[u8],
grid: &Grid,
bdir: (f64, f64, f64),
tile: Option<(usize, usize)>,
progress: &mut dyn FnMut(usize, usize),
) -> Result<Vec<f64>, PipelineError>Expand description
Run NeXtQSM end-to-end from the total field (it does its own background
removal), sourcing both weight files from the registry. Unlike the entries in
InversionAlgorithm, NeXtQSM spans BFR + dipole inversion, so it is exposed
as a standalone reconstruction rather than a dipole-inversion-stage option.
total_field_ppm and mask are column-major (nx,ny,nz); bdir is the B0
direction. Requires the onnx feature; weights resolve local-first then via
the download feature. Returns susceptibility (ppm), masked.