Skip to main content

qsm_core/unwrap/
mod.rs

1//! Phase unwrapping methods
2//!
3//! Removes 2π wraps from MRI phase data.
4//!
5//! - [`unwrap_romeo`] / [`unwrap_romeo_multi_echo`] — ROMEO, region growing with
6//!   quality-guided ordering ([`RomeoParams`])
7//! - [`laplacian_unwrap`] — Laplacian unwrapping (Neumann BC on the array)
8//! - [`laplacian_unwrap_bfr`] — Laplacian unwrapping **+ background field removal**
9//!   (∇² masked to the ROI); see the [`laplacian`] module docs for why these differ
10
11pub mod romeo;
12pub mod laplacian;
13
14pub use romeo::{
15    unwrap_romeo, unwrap_romeo_multi_echo, correct_multi_echo_wraps,
16    calculate_weights_romeo, voxel_quality_romeo,
17    RomeoParams, RomeoWeightType,
18};
19#[allow(deprecated)]
20pub use laplacian::laplacian_unwrap_bfr;
21pub use laplacian::laplacian_unwrap;
22
23/// Phase unwrapping method selection.
24///
25/// These select unwrappers only. [`laplacian_unwrap_bfr`], which unwraps *and* removes the
26/// harmonic background, is deliberately not reachable here — call it directly if that
27/// combination is what you want, and read the [`laplacian`] module docs first.
28#[derive(Clone, Copy, Debug, PartialEq)]
29pub enum UnwrapMethod {
30    Romeo,
31    /// Laplacian unwrapping under a Neumann boundary condition; see
32    /// [`laplacian_unwrap`]. Unwraps only — the background field is left alone.
33    Laplacian,
34}