pub fn laplacian_unwrap(
phase: &[f64],
mask: &[u8],
grid: &Grid,
solver: LaplacianSolver,
) -> Vec<f64>Expand description
Laplacian phase unwrapping, without background field removal.
Solves the Poisson equation over the whole array with the chosen LaplacianSolver (see
the module docs for both). Nothing is masked out of the input, so field sources
anywhere in the FOV are retained and the harmonic (background) component survives: the
result is an unwrapped total field, suitable for a subsequent background-removal stage.
(With LaplacianSolver::Fft the total field carries a harmonic error from the zero
padding wherever the phase at the array edge is not zero; the local field is unaffected.)
Because the whole array participates, this is sensitive to phase quality outside the
ROI. STI Suite-based pipelines zero the phase outside the brain first (mask · φ), which
run_field_mapping does on its multi-echo Laplacian
path; otherwise, where the phase outside the object is
noise, or wraps faster than one radian per voxel, prefer ROMEO
(super::romeo::unwrap_romeo).
§Arguments
phase- Wrapped phase (nx * ny * nz)mask- Binary mask (nx * ny * nz); applied to the output onlygrid- Volume grid (dimensions and voxel sizes)solver-LaplacianSolver::Dct(default) orLaplacianSolver::Fft
§Returns
Unwrapped phase, zero outside mask.
§References
Ghiglia & Romero (1994) for Dct; Schofield & Zhu (2003) for Fft. See the module docs.