Skip to main content

calculate_weights_romeo_configurable

Function calculate_weights_romeo_configurable 

Source
pub fn calculate_weights_romeo_configurable(
    phase: &[f64],
    mag: &[f64],
    phase2: Option<&[f64]>,
    te1: f64,
    te2: f64,
    mask: &[u8],
    nx: usize,
    ny: usize,
    nz: usize,
    use_phase_gradient_coherence: bool,
    use_mag_coherence: bool,
    use_mag_weight: bool,
) -> Vec<u8> 
Expand description

Calculate ROMEO edge weights with configurable weight components

§Arguments

  • phase - Wrapped phase data (nx * ny * nz), first echo
  • mag - Magnitude data (nx * ny * nz), optional (pass empty slice if none)
  • phase2 - Second echo phase for gradient coherence (optional)
  • te1, te2 - Echo times for gradient coherence scaling
  • mask - Binary mask (nx * ny * nz), 1 = process
  • nx, ny, nz - Array dimensions
  • use_phase_gradient_coherence - Include phase gradient coherence (multi-echo temporal)
  • use_mag_coherence - Include magnitude coherence (min/max similarity)
  • use_mag_weight - Include magnitude weight (penalize low signal)

§Returns

Weights array of size 3 * nx * ny * nz in C order [dim][i][j][k]