pub fn calculate_weights_romeo(
phase: &[f64],
mag: &[f64],
phase2: Option<&[f64]>,
te1: f64,
te2: f64,
mask: &[u8],
nx: usize,
ny: usize,
nz: usize,
) -> Vec<u8> ⓘExpand description
Calculate ROMEO edge weights for phase unwrapping
Returns weights array with shape (3, nx, ny, nz) for 3 directions (x, y, z). Weights are normalized to 0-255 for use with the bucket priority queue.
§Arguments
phase- Wrapped phase data (nx * ny * nz), first echomag- 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 scalingmask- Binary mask (nx * ny * nz), 1 = processnx,ny,nz- Array dimensions
§Returns
Weights array of size 3 * nx * ny * nz in C order [dim][i][j][k]