osg::ImageBlackmanFilter Class Reference

#include <OSGImageScaler.h>

Inheritance diagram for osg::ImageBlackmanFilter:
osg::ImageGenericFilter

List of all members.

Public Member Functions

 ImageBlackmanFilter (osg::Real64 dWidth=osg::Real64(0.5))
virtual ~ImageBlackmanFilter (void)
virtual osg::Real64 filter (osg::Real64 dVal) const
osg::Real64 getWidth (void) const
void setWidth (osg::Real64 dWidth)

Protected Attributes

osg::Real64 m_dWidth

Detailed Description

blackman filter

Definition at line 82 of file OSGImageScaler.h.


Constructor & Destructor Documentation

ImageBlackmanFilter::ImageBlackmanFilter ( osg::Real64  dWidth = osg ::Real64(0.5)  ) 

Definition at line 126 of file OSGImageScaler.cpp.

00126                                                        :
00127     ImageGenericFilter(dWidth)
00128 {
00129 }

ImageBlackmanFilter::~ImageBlackmanFilter ( void   )  [virtual]

Definition at line 131 of file OSGImageScaler.cpp.

00132 {
00133 }


Member Function Documentation

Real64 ImageBlackmanFilter::filter ( osg::Real64  dVal  )  const [virtual]

Implements osg::ImageGenericFilter.

Definition at line 135 of file OSGImageScaler.cpp.

References osg::ImageGenericFilter::m_dWidth, OSG_FILTER_2PI, and OSG_FILTER_4PI.

00136 {
00137     if (fabs (dVal) > m_dWidth)
00138         return 0.0;
00139 
00140     Real64 dN = 2.0 * m_dWidth + 1.0;
00141     return 0.42 + 0.5 * cos (OSG_FILTER_2PI * dVal / ( dN - 1.0 )) +
00142         0.08 * cos (OSG_FILTER_4PI * dVal / ( dN - 1.0 ));
00143 }

Real64 ImageGenericFilter::getWidth ( void   )  const [inherited]

Definition at line 41 of file OSGImageScaler.cpp.

References osg::ImageGenericFilter::m_dWidth.

Referenced by osg::ImageScaler::calcContributions().

00042 {
00043     return m_dWidth;
00044 }

void ImageGenericFilter::setWidth ( osg::Real64  dWidth  )  [inherited]

Definition at line 46 of file OSGImageScaler.cpp.

References osg::ImageGenericFilter::m_dWidth.

00047 {
00048     m_dWidth = dWidth;
00049 }


Member Data Documentation

osg ::Real64 osg::ImageGenericFilter::m_dWidth [protected, inherited]

The documentation for this class was generated from the following files:

Generated on 8 Feb 2010 for OpenSG by  doxygen 1.6.1