module Vissen::Output::Filter
An output filter is defined as a time invariant operation on a pixel cloud. Upon initialization the filter is given the output context as a chance to precompute some results. The rest of the work is done in `#apply` and should not depend on time.
Attributes
context[R]
@return [Context] the filter context.
Public Class Methods
new(context)
click to toggle source
@raise [TypeError] if the context is not a `Context`.
@param context [Context] the context within which the filter will be
applied.
# File lib/vissen/output/filter.rb, line 17 def initialize(context) raise TypeError unless context.is_a? Context @context = context end
Public Instance Methods
apply(_pixel_buffer)
click to toggle source
This method should apply the filter to the given `PixelBuffer`.
@raise NotImplementedError if the method is not implemented in the
specific `Filter` implementation.
@param _pixel_buffer [PixelBuffer] the pixel cloud to which the filter
should be applied.
# File lib/vissen/output/filter.rb, line 30 def apply(_pixel_buffer) raise NotImplementedError end