pub fn iharperella_with_weights(
phase: &[f64],
mask: &[u8],
grid: &Grid,
max_iter: usize,
tol: f64,
w_brain: &[f64],
progress: impl FnMut(usize, usize),
) -> (Vec<f64>, Vec<u8>)Expand description
iHARPERELLA with custom W_Brain weighting
Allows specifying an arbitrary weighting function for the phase minimization. The weighting should be non-negative and defined over the full volume (nxnynz).
§Arguments
phase- Wrapped phase in radians (nx * ny * nz)mask- Binary brain mask (nx * ny * nz), 1 = insidegrid- Volume dimensions and voxel sizesmax_iter- Maximum CG iterationstol- CG convergence tolerancew_brain- Weighting function for phase minimizationprogress- Progress callback (iteration, max_iter)
§Returns
(tissue_phase, mask)