Enum ndarray_ndimage::BorderMode
source · pub enum BorderMode<T> {
Constant(T),
Nearest,
Mirror,
Reflect,
Wrap,
}Expand description
Method that will be used to determines how the input array is extended beyond its boundaries.
Variants§
Constant(T)
The input is extended by filling all values beyond the edge with the same constant value,
[1, 2, 3] -> [T, T, 1, 2, 3, T, T]
Nearest
The input is extended by replicating the last pixel.
[1, 2, 3] -> [1, 1, 1, 2, 3, 3, 3]
Mirror
The input is extended by reflecting about the center of the last pixel.
[1, 2, 3] -> [3, 2, 1, 2, 3, 2, 1]
Reflect
The input is extended by reflecting about the edge of the last pixel.
[1, 2, 3] -> [2, 1, 1, 2, 3, 3, 2]
Wrap
The input is extended by wrapping around to the opposite edge.
[1, 2, 3] -> [2, 3, 1, 2, 3, 1, 2]
Trait Implementations§
source§impl<T: Clone> Clone for BorderMode<T>
impl<T: Clone> Clone for BorderMode<T>
source§fn clone(&self) -> BorderMode<T>
fn clone(&self) -> BorderMode<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more