MitchellFilter Struct Reference

`#include <Resample.h>`

Inheritance diagram for MitchellFilter:

## Public Types

typedef boost::shared_ptr< const MitchellFilter > | CPtr
typedef boost::shared_ptr< MitchellFilter > | 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'.
| MitchellFilter (const float width=1.0, const float B=1.0/3.0, const float C=1.0/3.0)
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_B
const float | m_C
const float | m_width

## Detailed Description

Definition at line 340 of file Resample.h.

## Member Typedef Documentation

## Ptr

typedef boost::shared_ptr<MitchellFilter> MitchellFilter::Ptr

Definition at line 343 of file Resample.h.

## CPtr

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

Definition at line 344 of file Resample.h.

## Constructor & Destructor Documentation

## MitchellFilter()

MitchellFilter::MitchellFilter | ( | const float | width = 1.0,
|  | const float | B = 1.0 / 3.0,
|  | const float | C = 1.0 / 3.0 )

inline

Definition at line 349 of file Resample.h.

: m_B(B), m_C(C), m_width(width)
{ /* Empty */ }
MitchellFilter::m_width
const float m_width
Definition Resample.h:377
MitchellFilter::m_B
const float m_B
Definition Resample.h:376
MitchellFilter::m_C
const float m_C
Definition Resample.h:376

References m_B, m_C, and m_width.

## Member Function Documentation

## eval()

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

inline virtual

Evaluates the filter at coordinate 't'.

Implements Filter.

Definition at line 354 of file Resample.h.

{
const float ax = std::abs(x / m_width);
if (ax < 1) {
return ((12 - 9 * m_B - 6 * m_C) * ax * ax * ax +
(-18 + 12 * m_B + 6 * m_C) * ax * ax + (6 - 2 * m_B)) / 6;
} else if ((ax >= 1) && (ax < 2)) {
return ((-m_B - 6 * m_C) * ax * ax * ax +
(6 * m_B + 30 * m_C) * ax * ax + (-12 * m_B - 48 * m_C) *
ax + (8 * m_B + 24 * m_C)) / 6;
} else {
return 0;
}
}

References m_B, m_C, and m_width.

## support()

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

inline virtual

Radial width of the filter (half of diameter).

Implements Filter.

Definition at line 368 of file Resample.h.

{
return 2.0f * m_width;
}

References m_width.

## op()

template<typename Value_T>

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

inline static

Definition at line 373 of file Resample.h.

{ /* No-op */ }

## Member Data Documentation

## isAnalytic

const bool MitchellFilter::isAnalytic = false

static

Definition at line 346 of file Resample.h.

## m_B

const float MitchellFilter::m_B

private

Definition at line 376 of file Resample.h.

Referenced by eval(), and MitchellFilter().

## m_C

const float MitchellFilter::m_C

private

Definition at line 376 of file Resample.h.

Referenced by eval(), and MitchellFilter().

## m_width

const float MitchellFilter::m_width

private

Definition at line 377 of file Resample.h.

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

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

- export/Resample.h