Skip to main content

Module romeo

Module romeo 

Source
Expand description

ROMEO weight calculation for phase unwrapping

Calculates edge weights for region-growing phase unwrapping based on:

  • Phase coherence
  • Phase gradient coherence (multi-echo)
  • Magnitude coherence
  • Magnitude weights

Reference: Dymerska, B., Eckstein, K., Bachrata, B., Siow, B., Trattnig, S., Shmueli, K., Robinson, S.D. (2021). “Phase unwrapping with a rapid opensource minimum spanning tree algorithm (ROMEO).” Magnetic Resonance in Medicine, 85(4):2294-2308. https://doi.org/10.1002/mrm.28563

Reference implementation: https://github.com/korbinian90/MriResearchTools.jl

Structs§

RomeoParams
Parameters for ROMEO phase unwrapping.

Enums§

RomeoWeightType
Weight calculation scheme for ROMEO unwrapping.

Constants§

TWO_PI 🔒

Functions§

calculate_weights_bestpath
Calculate BestPath edge weights.
calculate_weights_romeo
Calculate ROMEO edge weights for phase unwrapping.
calculate_weights_romeo_configurable
Calculate ROMEO edge weights with configurable weight components.
calculate_weights_romeo_with_flags
Calculate ROMEO edge weights with full 6-component flag control.
calculate_weights_single_echo
Simplified weight calculation for single-echo data (no phase2)
compute_weights_from_params 🔒
Compute weights from params (dispatches BestPath vs ROMEO).
correct_global_offset 🔒
Correct global 2π offset for a single 3D volume.
correct_multi_echo_wraps
Correct global 2π offsets between echoes using median wrap counting.
correct_regions 🔒
Correct each region’s median to nearest 0 by subtracting n·2π.
find_seed_point
Find a seed point at the center of mass of the mask.
idx3d 🔒
Index into a 3D array in Fortran order (column-major, matches NIfTI)
merge_regions_post 🔒
Merge adjacent regions by computing inter-region phase offsets.
percentile_95 🔒
Compute 95th percentile of magnitude within mask (matching ROMEO.jl).
phase_linearity_edge 🔒
Phase linearity for an edge between two voxels.
phase_linearity_triplet 🔒
Phase linearity of three consecutive phase values.
rescale_weight 🔒
Rescale weight from [0,1] to u8 [1,255], with 0 = invalid.
temporal_uncertain_rewrap 🔒
Re-unwrap voxels that are uncertain after temporal unwrapping.
unwrap_individual 🔒
Individual multi-echo unwrapping.
unwrap_romeo
Unwrap a single 3D phase volume using ROMEO.
unwrap_romeo_multi_echo
Unwrap 4D multi-echo phase data using ROMEO.
unwrap_template 🔒
Template-based multi-echo unwrapping.
unwrap_voxel 🔒
Temporal unwrap: remove 2π wraps by comparing to a reference value.
voxel_quality_romeo
Calculate per-voxel quality map from ROMEO edge weights
wrap_angle 🔒
Wrap angle to [-π, π]