Module: Vissen::Output::Filter
- Defined in:
- lib/vissen/output/filter.rb,
lib/vissen/output/filter/gamma.rb,
lib/vissen/output/filter/quantizer.rb
Overview
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.
Defined Under Namespace
Instance Attribute Summary collapse
-
#context ⇒ Context
readonly
The filter context.
Instance Method Summary collapse
-
#apply(_pixel_buffer) ⇒ Object
This method should apply the filter to the given ‘PixelBuffer`.
- #initialize(context) ⇒ Object
Instance Attribute Details
#context ⇒ Context (readonly)
Returns the filter context.
11 12 13 |
# File 'lib/vissen/output/filter.rb', line 11 def context @context end |
Instance Method Details
#apply(_pixel_buffer) ⇒ Object
This method should apply the filter to the given ‘PixelBuffer`.
30 31 32 |
# File 'lib/vissen/output/filter.rb', line 30 def apply(_pixel_buffer) raise NotImplementedError end |
#initialize(context) ⇒ Object
17 18 19 20 21 |
# File 'lib/vissen/output/filter.rb', line 17 def initialize(context) raise TypeError unless context.is_a? Context @context = context end |