Skip to main content

laplacian_unwrap

Function laplacian_unwrap 

Source
pub fn laplacian_unwrap(phase: &[f64], mask: &[u8], grid: &Grid) -> Vec<f64>
Expand description

Laplacian phase unwrapping, without background field removal.

Solves the Poisson equation over the whole array under a Neumann (zero normal derivative) boundary condition, via a DCT-II in place. Nothing is masked out, 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.

Use laplacian_unwrap_bfr if you want unwrapping and background removal together.

Because the whole array participates, this is sensitive to phase quality outside the ROI in a way laplacian_unwrap_bfr is not. Where the phase outside the object is noise, or wraps faster than one radian per voxel, prefer ROMEO (super::romeo::unwrap_romeo) or the masked variant.

§Arguments

  • phase - Wrapped phase (nx * ny * nz)
  • mask - Binary mask (nx * ny * nz); applied to the output only
  • grid - Volume grid (dimensions and voxel sizes)

§Returns

Unwrapped phase, zero outside mask.

§References

Schofield, M.A., Zhu, Y. (2003). “Fast phase unwrapping algorithm for interferometric applications.” Optics Letters, 28(14):1194-1196. https://doi.org/10.1364/OL.28.001194