GaussianFilter Struct Reference

`#include <Resample.h>`

Inheritance diagram for GaussianFilter:

## Public Types

typedef boost::shared_ptr< const GaussianFilter > | CPtr
typedef boost::shared_ptr< GaussianFilter > | 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 t) const
| Evaluates the filter at coordinate 't'.
| GaussianFilter (const float alpha=2.0, const float width=2.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_alpha
const float | m_exp
const float | m_width

## Detailed Description

Definition at line 305 of file Resample.h.

## Member Typedef Documentation

## Ptr

typedef boost::shared_ptr<GaussianFilter> GaussianFilter::Ptr

Definition at line 308 of file Resample.h.

## CPtr

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

Definition at line 309 of file Resample.h.

## Constructor & Destructor Documentation

## GaussianFilter()

GaussianFilter::GaussianFilter | ( | const float | alpha = 2.0,
|  | const float | width = 2.0 )

inline

Definition at line 314 of file Resample.h.

: m_alpha(alpha),
m_exp(std::exp(-alpha * width * width)),
m_width(width)
{ /* Empty */ }
GaussianFilter::m_exp
const float m_exp
Definition Resample.h:333
GaussianFilter::m_alpha
const float m_alpha
Definition Resample.h:333
GaussianFilter::m_width
const float m_width
Definition Resample.h:333

References m_alpha, m_exp, and m_width.

## Member Function Documentation

## eval()

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

inline virtual

Evaluates the filter at coordinate 't'.

Implements Filter.

Definition at line 320 of file Resample.h.

{
const float x = t / m_width;
return std::max(0.0f, std::exp(-m_alpha * x * x) - m_exp);
}

References m_alpha, m_exp, and m_width.

## support()

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

inline virtual

Radial width of the filter (half of diameter).

Implements Filter.

Definition at line 325 of file Resample.h.

{
return 2.0f * m_width;
}

References m_width.

## op()

template<typename Value_T>

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

inline static

Definition at line 330 of file Resample.h.

{ /* No-op */ }

## Member Data Documentation

## isAnalytic

const bool GaussianFilter::isAnalytic = false

static

Definition at line 311 of file Resample.h.

## m_alpha

const float GaussianFilter::m_alpha

private

Definition at line 333 of file Resample.h.

Referenced by eval(), and GaussianFilter().

## m_exp

const float GaussianFilter::m_exp

private

Definition at line 333 of file Resample.h.

Referenced by eval(), and GaussianFilter().

## m_width

const float GaussianFilter::m_width

private

Definition at line 333 of file Resample.h.

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

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

- export/Resample.h