pub fn tfi(
total_field: &[f64],
mask: &[u8],
magnitude: EchoMagnitudes<'_>,
grid: &Grid,
bdir: (f64, f64, f64),
params: &TfiParams,
progress: impl FnMut(usize, usize),
) -> Vec<f64>Expand description
Preconditioned total field inversion (2024 MEDI_L1.m with a preconditioner)
§Arguments
total_field- Total field in ppm, before background removal (nx * ny * nz)mask- Binary mask (nx * ny * nz), 1 = brain:P = 1and the data are fitted heremagnitude- Echo magnitudes, or a combined magnitude (see module docs)grid- Volume grid (dimensions and voxel sizes)bdir- B0 field directionparams- TFI parameters, including field strength and echo spacingprogress- Progress callback(current_step, total_steps)over CG iterations
§Returns
Susceptibility P·y in ppm, zero outside the mask