Skip to main content

unwrap_romeo_multi_echo

Function unwrap_romeo_multi_echo 

Source
pub fn unwrap_romeo_multi_echo<P: AsRef<[f64]> + Sync, M: AsRef<[f64]> + Sync>(
    phases: &[P],
    mags: &[M],
    tes: &[f64],
    mask: &[u8],
    params: &RomeoParams,
    grid: &Grid,
) -> Vec<Vec<f64>>
Expand description

Unwrap 4D multi-echo phase data using ROMEO.

Supports two modes matching ROMEO.jl:

Template-based (default, individual=false): Spatially unwraps one template echo, then temporally unwraps all others by scaling with TE ratios. Optionally re-unwraps uncertain voxels spatially.

Individual (individual=true): Spatially unwraps each echo independently, then optionally corrects global 2π offsets between echoes using median wrap counting.

§Arguments

  • phases - Wrapped phase for each echo [n_echoes][nxnynz]
  • mags - Magnitude for each echo (pass empty &[] if none)
  • tes - Echo times (units don’t matter, only ratios are used)
  • mask - Binary mask (nx * ny * nz)
  • params - ROMEO parameters
  • nx, ny, nz - Array dimensions

§Returns

Unwrapped phase for each echo