osg::ImageHammingFilter Class Reference

#include <OSGImageScaler.h>

Inheritance diagram for osg::ImageHammingFilter:
osg::ImageGenericFilter

List of all members.

Public Member Functions

 ImageHammingFilter (osg::Real64 dWidth=osg::Real64(0.5))
virtual ~ImageHammingFilter (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

hamming filter

Definition at line 70 of file OSGImageScaler.h.


Constructor & Destructor Documentation

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

Definition at line 105 of file OSGImageScaler.cpp.

00105                                                     :
00106     ImageGenericFilter(dWidth)
00107 {
00108 }

ImageHammingFilter::~ImageHammingFilter ( void   )  [virtual]

Definition at line 110 of file OSGImageScaler.cpp.

00111 {
00112 }


Member Function Documentation

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

Implements osg::ImageGenericFilter.

Definition at line 114 of file OSGImageScaler.cpp.

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

00115 {
00116     if (fabs (dVal) > m_dWidth)
00117         return 0.0;
00118 
00119     Real64 dWindow = 0.54 + 0.46 * cos (OSG_FILTER_2PI * dVal);
00120     Real64 dSinc = (dVal == 0) ? 1.0 : sin (OSG_FILTER_PI * dVal) / (OSG_FILTER_PI * dVal);
00121     return dWindow * dSinc;
00122 }

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