pub struct Input<'a, T: 'a + Type, C: 'a + Color> {
pub images: Vec<&'a Image<T, C>>,
pub pixel: Option<(Point, Pixel<C>)>,
}
Expand description
Filter input
Fields§
§images: Vec<&'a Image<T, C>>
Input images
pixel: Option<(Point, Pixel<C>)>
Input pixel
Implementations§
source§impl<'a, T: 'a + Type, C: 'a + Color> Input<'a, T, C>
impl<'a, T: 'a + Type, C: 'a + Color> Input<'a, T, C>
sourcepub fn with_pixel(self, point: Point, pixel: Pixel<C>) -> Self
pub fn with_pixel(self, point: Point, pixel: Pixel<C>) -> Self
Add chained pixel data
sourcepub fn without_pixel(self) -> Self
pub fn without_pixel(self) -> Self
Remove chained pixel data
sourcepub fn get_pixel(
&self,
pt: impl Into<Point>,
image_index: Option<usize>
) -> Pixel<C>
pub fn get_pixel( &self, pt: impl Into<Point>, image_index: Option<usize> ) -> Pixel<C>
Get input pixel at pt
- if pt
matches the stored pixel from a preview computation then
that pixel will be returned instead of the actual input pixel. If image_index
is not
None
then input from the image with that index will be used.
sourcepub fn get_f(
&self,
pt: impl Into<Point>,
c: Channel,
image_index: Option<usize>
) -> f64
pub fn get_f( &self, pt: impl Into<Point>, c: Channel, image_index: Option<usize> ) -> f64
Get input float value - if pt
matches the stored pixel from a preview computation then
that pixel will be returned instead of the actual input pixel. If image_index
is not
None
then input from the image with that index will be used.