Skip to main content

voxel_quality_romeo

Function voxel_quality_romeo 

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

Calculate per-voxel quality map from ROMEO edge weights

Computes ROMEO edge weights and then aggregates them per-voxel by averaging the incident edge weights across all 6 neighboring directions (±x, ±y, ±z). This produces a quality map where high values indicate voxels with coherent phase and magnitude, suitable for thresholding into a brain mask.

Reference: MriResearchTools.jl romeovoxelquality() function

§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

§Returns

Quality map of size nx * ny * nz with values in range [0, 100]