Field3D
BoxFilter Struct Reference

#include <Resample.h>

Inheritance diagram for BoxFilter:
Filter

Public Types

typedef boost::shared_ptr< const BoxFilterCPtr
 
typedef boost::shared_ptr< BoxFilterPtr
 
- Public Types inherited from Filter
typedef boost::shared_ptr< const FilterCPtr
 
typedef boost::shared_ptr< FilterPtr
 

Public Member Functions

 BoxFilter ()
 
 BoxFilter (const float width)
 
virtual float eval (const float x) const
 Evaluates the filter at coordinate 't'. More...
 
virtual float support () const
 Radial width of the filter (half of diameter) More...
 

Private Attributes

const float m_width
 

Detailed Description

Definition at line 107 of file Resample.h.

Member Typedef Documentation

typedef boost::shared_ptr<BoxFilter> BoxFilter::Ptr

Definition at line 110 of file Resample.h.

typedef boost::shared_ptr<const BoxFilter> BoxFilter::CPtr

Definition at line 111 of file Resample.h.

Constructor & Destructor Documentation

BoxFilter::BoxFilter ( )
inline

Definition at line 113 of file Resample.h.

114  : m_width(1.0)
115  { }
const float m_width
Definition: Resample.h:134
BoxFilter::BoxFilter ( const float  width)
inline

Definition at line 116 of file Resample.h.

117  : m_width(width)
118  { }
const float m_width
Definition: Resample.h:134

Member Function Documentation

virtual float BoxFilter::eval ( const float  t) const
inlinevirtual

Evaluates the filter at coordinate 't'.

Implements Filter.

Definition at line 120 of file Resample.h.

121  {
122  const float t = x / m_width;
123  if (t <= 0.5f) {
124  return 1.0f;
125  } else {
126  return 0.0f;
127  }
128  }
const float m_width
Definition: Resample.h:134
virtual float BoxFilter::support ( ) const
inlinevirtual

Radial width of the filter (half of diameter)

Implements Filter.

Definition at line 129 of file Resample.h.

130  {
131  return 0.5f * m_width;
132  }
const float m_width
Definition: Resample.h:134

Member Data Documentation

const float BoxFilter::m_width
private

Definition at line 134 of file Resample.h.


The documentation for this struct was generated from the following file: