MaxFilter Struct Reference

`#include <Resample.h>`

Inheritance diagram for MaxFilter:

## Public Types

typedef boost::shared_ptr< const MaxFilter > | CPtr
typedef boost::shared_ptr< MaxFilter > | Ptr
Public Types inherited from Filter
typedef boost::shared_ptr< const Filter > | CPtr
typedef boost::shared_ptr< Filter > | Ptr

## 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).
| MaxFilter ()
| MaxFilter (const float width)
virtual float | support () const
| Radial width of the filter (half of diameter).

## 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 209 of file Resample.h.

## Member Typedef Documentation

## Ptr

typedef boost::shared_ptr<MaxFilter> MaxFilter::Ptr

Definition at line 212 of file Resample.h.

## CPtr

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

Definition at line 213 of file Resample.h.

## Constructor & Destructor Documentation

## MaxFilter() [1/2]

MaxFilter::MaxFilter | ( |  | ) |

inline

Definition at line 218 of file Resample.h.

: m_width(1.0)
{ }
MaxFilter::m_width
const float m_width
Definition Resample.h:259

References m_width.

## MaxFilter() [2/2]

MaxFilter::MaxFilter | ( | const float | width | ) |

inline

Definition at line 221 of file Resample.h.

: m_width(width)
{ }

References m_width.

## Member Function Documentation

## eval()

virtual float MaxFilter::eval | ( | const float | t | ) | const

inline virtual

Evaluates the filter at coordinate 't'.

Implements Filter.

Definition at line 225 of file Resample.h.

{
const float t = x / m_width;
if (t <= 0.5f) {
return 1.0f;
} else {
return 0.0f;
}
}

References m_width.

## support()

virtual float MaxFilter::support | ( |  | ) | const

inline virtual

Radial width of the filter (half of diameter).

Implements Filter.

Definition at line 234 of file Resample.h.

{
return 0.5f * m_width;
}

References m_width.

## initialValue()

virtual float MaxFilter::initialValue | ( |  | ) | const

inline virtual

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

Reimplemented from Filter.

Definition at line 238 of file Resample.h.

{
return -std::numeric_limits<float>::max();
}

## op() [1/2]

template<typename T>

void MaxFilter::op | ( | Imath::Vec3< T > & | accumValue,
|  | const Imath::Vec3< T > | value )

inline static

Definition at line 245 of file Resample.h.

{
accumValue.x = std::max(accumValue.x, value.x);
accumValue.y = std::max(accumValue.y, value.y);
accumValue.z = std::max(accumValue.z, value.z);
}

## op() [2/2]

template<typename Value_T>

void MaxFilter::op | ( | Value_T & | accumValue,
|  | const Value_T | value )

inline static

Definition at line 253 of file Resample.h.

{
accumValue = std::max(accumValue, value);
}

## Member Data Documentation

## isAnalytic

const bool MaxFilter::isAnalytic = true

static

Definition at line 215 of file Resample.h.

## m_width

const float MaxFilter::m_width

private

Definition at line 259 of file Resample.h.

Referenced by eval(), MaxFilter(), MaxFilter(), and support().

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

- export/Resample.h