Field3D
MinFilter Struct Reference

#include <Resample.h>

Inheritance diagram for MinFilter:
Filter

Public Types

typedef boost::shared_ptr< const MinFilterCPtr
 
typedef boost::shared_ptr< MinFilterPtr
 
- Public Types inherited from Filter
typedef boost::shared_ptr< const FilterCPtr
 
typedef boost::shared_ptr< FilterPtr
 

Public Member Functions

virtual float eval (const float x) const
 Evaluates the filter at coordinate 't'.
 
virtual float initialValue () const
 Initial value (zero by default, but need to be different for min/max)
 
 MinFilter ()
 
 MinFilter (const float width)
 
virtual float support () const
 Radial width of the filter (half of diameter)
 
- Public Member Functions inherited from Filter

Static Public Member Functions

template<typename T >
static void op (Imath::Vec3< T > &accumValue, const Imath::Vec3< T > value)
 
template<typename Value_T >
static void op (Value_T &accumValue, const Value_T value)
 

Static Public Attributes

static const bool isAnalytic = true
 

Private Attributes

const float m_width
 

Detailed Description

Definition at line 153 of file Resample.h.

Member Typedef Documentation

◆ Ptr

boost::shared_ptr<MinFilter> MinFilter::Ptr

Definition at line 156 of file Resample.h.

◆ CPtr

boost::shared_ptr<const MinFilter> MinFilter::CPtr

Definition at line 157 of file Resample.h.

Constructor & Destructor Documentation

◆ MinFilter() [1/2]

MinFilter::MinFilter ( )
inline

Definition at line 162 of file Resample.h.

163 : m_width(1.0)
164 { }
const float m_width
Definition Resample.h:202

◆ MinFilter() [2/2]

MinFilter::MinFilter ( const float width)
inline

Definition at line 165 of file Resample.h.

166 : m_width(width)
167 { }

Member Function Documentation

◆ eval()

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

Evaluates the filter at coordinate 't'.

Implements Filter.

Definition at line 169 of file Resample.h.

170 {
171 const float t = x / m_width;
172 if (t <= 0.5f) {
173 return 1.0f;
174 } else {
175 return 0.0f;
176 }
177 }

References m_width.

◆ support()

virtual float MinFilter::support ( ) const
inlinevirtual

Radial width of the filter (half of diameter)

Implements Filter.

Definition at line 178 of file Resample.h.

179 {
180 return 0.5f * m_width;
181 }

References m_width.

◆ initialValue()

virtual float MinFilter::initialValue ( ) const
inlinevirtual

Initial value (zero by default, but need to be different for min/max)

Reimplemented from Filter.

Definition at line 182 of file Resample.h.

183 {
184 return std::numeric_limits<float>::max();
185 }

◆ op() [1/2]

template<typename T >
static void MinFilter::op ( Imath::Vec3< T > & accumValue,
const Imath::Vec3< T > value )
inlinestatic

Definition at line 188 of file Resample.h.

189 {
190 accumValue.x = std::min(accumValue.x, value.x);
191 accumValue.y = std::min(accumValue.y, value.y);
192 accumValue.z = std::min(accumValue.z, value.z);
193 }

◆ op() [2/2]

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

Definition at line 196 of file Resample.h.

197 {
198 accumValue = std::min(accumValue, value);
199 }

Member Data Documentation

◆ isAnalytic

const bool MinFilter::isAnalytic = true
static

Definition at line 159 of file Resample.h.

◆ m_width

const float MinFilter::m_width
private

Definition at line 202 of file Resample.h.

Referenced by eval(), and support().


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