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'.
 
virtual float support () const
 Radial width of the filter (half of diameter)
 
- Public Member Functions inherited from Filter
virtual float initialValue () const
 Initial value (zero by default, but need to be different for min/max)
 

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

◆ Ptr

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

Definition at line 116 of file Resample.h.

◆ CPtr

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

Definition at line 117 of file Resample.h.

Constructor & Destructor Documentation

◆ BoxFilter() [1/2]

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() [2/2]

BoxFilter::BoxFilter ( const float width)
inline

Definition at line 125 of file Resample.h.

126 : m_width(width)
127 { }
#define FIELD3D_MTX_T
Definition StdMathLib.h:99

Member Function Documentation

◆ eval()

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 }

References FIELD3D_MTX_T, and m_width.

◆ support()

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 }

References m_width.

◆ op()

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

◆ isAnalytic

const bool BoxFilter::isAnalytic = false
static

Definition at line 119 of file Resample.h.

◆ m_width

const float BoxFilter::m_width
private

Definition at line 146 of file Resample.h.

Referenced by eval(), and support().


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