Skip to main content

reorient

Function reorient 

Source
pub fn reorient<T: Copy>(
    data: &[T],
    dims: (usize, usize, usize),
    perm: [usize; 3],
    flip: [bool; 3],
) -> (Vec<T>, (usize, usize, usize))
Expand description

Permute and flip a column-major volume. Returns the volume and its new dimensions.

Output axis i is the input’s axis perm[i], reversed when flip[i] — the convention alignment_to returns. Pure gather, so it is exact: no interpolation, no resampling.