Skip to main content

majority_label

Function majority_label 

Source
fn majority_label<T: Copy + PartialEq>(
    data: &[T],
    (nx, ny, nz): (usize, usize, usize),
    x: f64,
    y: f64,
    z: f64,
) -> T
Expand description

The label with the largest total trilinear weight among the (up to) eight source voxels around a fractional coordinate: the argmax of each label’s indicator, linearly interpolated. A tie goes to the nearest voxel’s label, then to the first found.