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...
 
- Public Member Functions inherited from Filter
virtual float initialValue () const
 Initial value (zero by default, but need to be different for min/max) More...
 

Static Public Member Functions

template<typename Value_T >
static void op (Value_T &accumValue, const Value_T value)
 

Static Public Attributes

static const bool isAnalytic = false
 

Private Attributes

const float m_width
 

Detailed Description

Definition at line 113 of file Resample.h.

Member Typedef Documentation

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

Definition at line 116 of file Resample.h.

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

Definition at line 117 of file Resample.h.

Constructor & Destructor Documentation

BoxFilter::BoxFilter ( )
inline

Definition at line 122 of file Resample.h.

123  : m_width(1.0)
124  { }
const float m_width
Definition: Resample.h:146
BoxFilter::BoxFilter ( const float  width)
inline

Definition at line 125 of file Resample.h.

126  : m_width(width)
127  { }
const float m_width
Definition: Resample.h:146

Member Function Documentation

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

Evaluates the filter at coordinate 't'.

Implements Filter.

Definition at line 129 of file Resample.h.

130  {
131  const float t = x / m_width;
132  if (t <= 0.5f) {
133  return 1.0f;
134  } else {
135  return 0.0f;
136  }
137  }
const float m_width
Definition: Resample.h:146
virtual float BoxFilter::support ( ) const
inlinevirtual

Radial width of the filter (half of diameter)

Implements Filter.

Definition at line 138 of file Resample.h.

139  {
140  return 0.5f * m_width;
141  }
const float m_width
Definition: Resample.h:146
template<typename Value_T >
static void BoxFilter::op ( Value_T &  accumValue,
const Value_T  value 
)
inlinestatic

Definition at line 143 of file Resample.h.

144  { /* no-op */ }

Member Data Documentation

const bool BoxFilter::isAnalytic = false
static

Definition at line 119 of file Resample.h.

const float BoxFilter::m_width
private

Definition at line 146 of file Resample.h.


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