KernelFilter Class Reference
2D discrete, symmetric filter which can be compactly / efficiently stored / applied using a 2D kernel (array) More...
#include <KernelFilter.h>

Public Member Functions | |
Constructors | |
| KernelFilter (real_t support=2) | |
| virtual | ~KernelFilter () |
Initialization | |
| virtual void | init () |
| Performs any initialization which may be necessary before filter evaluation. | |
Main usage interface | |
| virtual real_t | evaluate (const Vector2 &pt)=0 |
| void | apply (Image *image) |
| Applies this filter to the given image, (performs discrete convolution with the given image and this 2D filter). | |
| RgbaHDR | apply (Image *image, real_t x, real_t y) |
| Convolves this filter with the image at the given location and returns the result. | |
Accessors / Mutators | |
| const real_t * | getKernel () const |
| unsigned | getWidth () const |
| unsigned | getSize () const |
Static Public Member Functions | |
Static factory | |
| static KernelFilter * | create (const std::string &type, PropertyMap &p) |
Protected Member Functions | |
| virtual void | _computeKernel () |
| Allocates and initializes m_kernel. | |
Protected Attributes | |
| unsigned | m_width |
| real_t * | m_kernel |
| bool | m_isNormalized |
| whether or not 'apply' should assume the kernel is normalized | |
Detailed Description
2D discrete, symmetric filter which can be compactly / efficiently stored / applied using a 2D kernel (array)
- Date:
- Fall 2008
Definition at line 20 of file KernelFilter.h.
Constructor & Destructor Documentation
| KernelFilter::KernelFilter | ( | real_t | support = 2 |
) | [inline] |
Definition at line 25 of file KernelFilter.h.
| KernelFilter::~KernelFilter | ( | ) | [virtual] |
Definition at line 46 of file KernelFilter.cpp.
Member Function Documentation
| KernelFilter * KernelFilter::create | ( | const std::string & | type, | |
| PropertyMap & | p | |||
| ) | [static] |
Definition at line 17 of file KernelFilter.cpp.
| void KernelFilter::init | ( | ) | [virtual] |
Performs any initialization which may be necessary before filter evaluation.
- Note:
- Default implementation initializes the filter support based on its PropertyMap
Reimplemented from Filter< N, T >.
Reimplemented in GaussianFilter, LanczosSincFilter, and MitchellFilter.
Definition at line 50 of file KernelFilter.cpp.
- Returns:
- the value of this filter function evaluated at the given point
Implements Filter< N, T >.
Implemented in BoxFilter, GaussianFilter, LanczosSincFilter, MitchellFilter, and TriangleFilter.
| void KernelFilter::apply | ( | Image * | image | ) |
Applies this filter to the given image, (performs discrete convolution with the given image and this 2D filter).
- Note:
- this involves allocating a temporary intermediate image
Definition at line 77 of file KernelFilter.cpp.
Convolves this filter with the image at the given location and returns the result.
Definition at line 131 of file KernelFilter.cpp.
| const real_t* KernelFilter::getKernel | ( | ) | const [inline] |
| unsigned KernelFilter::getWidth | ( | ) | const [inline] |
- Returns:
- the width of the kernel (same as height since its symmetric)
Definition at line 90 of file KernelFilter.h.
| unsigned KernelFilter::getSize | ( | ) | const [inline] |
| void KernelFilter::_computeKernel | ( | ) | [protected, virtual] |
Member Data Documentation
unsigned KernelFilter::m_width [protected] |
Definition at line 106 of file KernelFilter.h.
real_t* KernelFilter::m_kernel [protected] |
Definition at line 107 of file KernelFilter.h.
bool KernelFilter::m_isNormalized [protected] |
whether or not 'apply' should assume the kernel is normalized
Definition at line 110 of file KernelFilter.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6