Trait image2::Filter[][src]

pub trait Filter<T: Type, C: Color, U: Type = T, D: Color = C>: Debug + Sync {
    fn compute_at(
        &self,
        pt: Point,
        input: &Input<'_, T, C>,
        dest: &mut DataMut<'_, U, D>
    ); fn schedule(&self) -> Schedule { ... }
fn output_size(
        &self,
        _input: &Input<'_, T, C>,
        dest: &mut Image<U, D>
    ) -> Size { ... }
fn eval_partial(
        &self,
        roi: Region,
        input: &[&Image<T, C>],
        output: &mut Image<U, D>
    ) { ... }
fn eval_partial_in_place(&self, roi: Region, output: &mut Image<U, D>) { ... }
fn eval(&self, input: &[&Image<T, C>], output: &mut Image<U, D>) { ... }
fn eval_in_place(&self, output: &mut Image<U, D>) { ... } }
Expand description

Filters are used to manipulate images in a generic, composable manner

Required methods

Compute filter at the given point for the provided input

  • pt: Current output point
  • input: Input images, input pixel from previous filters in chain
  • dest: Single pixel output buffer

Provided methods

Determines whether a filter should be executed one pixel at a time, or a whole image at a time

Get filter output size, this is typically the destination image size, however when used as part of a pipeline a single filter might have a different output size

Evaluate a filter on part of an image

Evaluate filter on part of an image using the same image for input and output

Evaluate filter

Evaluate filter using the same image for input and output

Implementors