CSplineKernel Class Referenceabstract
Interpolation

Base class for all spline based interpolation kernels. More...

`#include <mia/core/splinekernel.hh>`

Inheritance diagram for CSplineKernel:
[legend]
Collaboration diagram for CSplineKernel:
[legend]

## Data Structures

struct | SCache

## Public Types

typedef CSplineKernel | plugin_data
| helper typedef for plugin handling
typedef CSplineKernel | plugin_type
| helper typedef for plugin handling
typedef std::vector< int > | VIndex
| type for the index vector
typedef std::vector< double > | VWeight
| type for the weight vector
Public Types inherited from CPropertyFlagHolder
typedef std::set< const char * > | Set
| define the type of the set of flags

## Public Member Functions

| CSplineKernel (int degree, double shift, EInterpolation type)
void | derivative (double x, VWeight &weight, VIndex &index) const
void | derivative (double x, VWeight &weight, VIndex &index, int order) const
int | get_active_halfrange () const
void | get_cached (double x, SCache &cache) const
virtual void | get_derivative_weights (double x, VWeight &weight) const =0
virtual void | get_derivative_weights (double x, VWeight &weight, int order) const =0
int | get_indices (double x, VIndex &index) const
double | get_nonzero_radius () const
const std::vector< double > & | get_poles () const
int | get_start_idx_and_derivative_weights (double x, VWeight &weights) const
int | get_start_idx_and_value_weights (double x, VWeight &weights) const
EInterpolation | get_type () const
void | get_uncached (double x, SCache &cache) const
virtual double | get_weight_at (double x, int order) const
virtual void | get_weights (double x, VWeight &weight) const =0
void | operator() (double x, SCache &cache) const
void | operator() (double x, VWeight &weight, VIndex &index) const
size_t | size () const
virtual | ~CSplineKernel ()
Public Member Functions inherited from CProductBase
const char * | get_init_string () const
void | set_init_string (const char *init)
void | set_module (PPluginModule module)
Public Member Functions inherited from CPropertyFlagHolder
void | add (const char *property)
Set | get_missing_properties (const CPropertyFlagHolder &testset) const
bool | has (const char *property) const
bool | has_all_in (const CPropertyFlagHolder &testset) const
virtual | ~CPropertyFlagHolder ()

## Static Public Attributes

static const char * | data_descr
| plugin handling data description
static const char * | type_descr
| plugin handling type description

## Protected Member Functions

void | add_pole (double x)

## Detailed Description

Base class for all spline based interpolation kernels.

The kernel of spline based interpolations that provides the interface to evaluate weights and indices into the coefficient field.

Definition at line 45 of file splinekernel.hh.

## Member Typedef Documentation

## plugin_data

typedef CSplineKernel CSplineKernel::plugin_data

helper typedef for plugin handling

Definition at line 50 of file splinekernel.hh.

## plugin_type

typedef CSplineKernel CSplineKernel::plugin_type

helper typedef for plugin handling

Definition at line 52 of file splinekernel.hh.

## VIndex

typedef std::vector<int> CSplineKernel::VIndex

type for the index vector

Definition at line 64 of file splinekernel.hh.

## VWeight

typedef std::vector<double> CSplineKernel::VWeight

type for the weight vector

Definition at line 61 of file splinekernel.hh.

## Constructor & Destructor Documentation

## CSplineKernel()

CSplineKernel::CSplineKernel | ( | int | degree,
|  | double | shift,
|  | EInterpolation | type )

Parameters

  degree | of the spline
  shift | location shift of the input coordinate to obtain the proper support
  type | interpolation type

Remarks
  why to I give the type, it should alwas be bspline

## ~CSplineKernel()

virtual CSplineKernel::~CSplineKernel | ( |  | ) |

virtual

The virtual destructor is just here to avoid some warning

## Member Function Documentation

## add_pole()

void CSplineKernel::add_pole | ( | double | x | ) |

protected

add a pole to the list of poles

Parameters

  x |

## derivative() [1/2]

void CSplineKernel::derivative | ( | double | x,
|  | VWeight & | weight,
|  | VIndex & | index ) const

Evaluate the first order derivative weights of the B-Spline at the given position

Parameters

  | x | location where to evaluate the derivative
  [out] | weight | the interpolation weights are stored here
  [out] | index | the interpolation coefficient intices are stored here

## derivative() [2/2]

void CSplineKernel::derivative | ( | double | x,
|  | VWeight & | weight,
|  | VIndex & | index,
|  | int | order ) const

Evaluate the derivative weights of the B-Spline at the given position

Parameters

  | x | location where to evaluate the derivative
  [out] | weight | the interpolation weights are stored here
  [out] | index | the interpolation coefficient intices are stored here
  | order | order of the derivative to be evaluated

## get_active_halfrange()

int CSplineKernel::get_active_halfrange | ( |  | ) | const

Returns
  the number of the neighboring grind points used on each side of the center

## get_cached()

void CSplineKernel::get_cached | ( | double | x,
|  | SCache & | cache ) const

This operator evaluates the weights and indices of the interpolation at a given position. The boundary conditions given in the value cache are applied. The result is stored in the return value cache and this cache is only updated if neccesary. The index set is always fully set.

Parameters

  | x | location for which to evaluate weights and indices
  [in,out] | cache | storage for returned value

## get_derivative_weights() [1/2]

virtual void CSplineKernel::get_derivative_weights | ( | double | x,
|  | VWeight & | weight ) const

pure virtual

evaluate the first order derivative weights, this needs to be implemented for a specific spline

Parameters

  | x | coordinate
  [out] | weight | the weights

Remarks
  why is this not a private function?

## get_derivative_weights() [2/2]

virtual void CSplineKernel::get_derivative_weights | ( | double | x,
|  | VWeight & | weight,
|  | int | order ) const

pure virtual

evaluate the first order derivative weights, this needs to be implemented for a specific spline

Parameters

  | x | coordinate
  [out] | weight | the weights
  | order | derivative order

Remarks
  why is this not a private function?

## get_indices()

int CSplineKernel::get_indices | ( | double | x,
|  | VIndex & | index ) const

Evaluate the indices of the coefficients that would be used for interpolation

Parameters

  | x | location where to evaluate
  [out] | index | the interpolation coefficient indices are stored here

Returns
  start index

## get_nonzero_radius()

double CSplineKernel::get_nonzero_radius | ( |  | ) | const

Returns
  the radius around zero where the B-spline does not evaluate to zero

## get_poles()

const std::vector< double > & CSplineKernel::get_poles | ( |  | ) | const

Returns
  the poles of the spline used for pre-filtering

References size().

## get_start_idx_and_derivative_weights()

int CSplineKernel::get_start_idx_and_derivative_weights | ( | double | x,
|  | VWeight & | weights ) const

Evaluate the first coefficient index and the derivative weights vor B-spline interpolation

Parameters

  | x | location to evaluate the spline at
  [out] | weights | weights of the B-spline

Returns
  first index into the coefficient field to be used - note this may be a negiative value

## get_start_idx_and_value_weights()

int CSplineKernel::get_start_idx_and_value_weights | ( | double | x,
|  | VWeight & | weights ) const

Evaluate the first coefficient index and the weights vor B-spline interpolation

Parameters

  | x | location to evaluate the spline at
  [out] | weights | weights of the B-spline

Returns
  first index into the coefficient field to be used - note this may be a negiative value

## get_type()

EInterpolation CSplineKernel::get_type | ( |  | ) | const

Returns
  the type of this interpolator

## get_uncached()

void CSplineKernel::get_uncached | ( | double | x,
|  | SCache & | cache ) const

This operator evaluates the weights and indices of the interpolation at a given position. The boundary conditions given in the value cache are applied. The result is stored in the return value cache and this cache is always updated. The index set will only be set correctly if the boundary conditions had to be applied.

Parameters

  | x | location for which to evaluate weights and indices
  [in,out] | cache | storage for returned value

## get_weight_at()

virtual double CSplineKernel::get_weight_at | ( | double | x,
|  | int | order ) const

virtual

Evaluate the weight at a single position

Parameters

  x | location to evaluate B-spline at
  order | order of derivative to be evaluated (0 = value)

Returns
  B-spline weight

## get_weights()

virtual void CSplineKernel::get_weights | ( | double | x,
|  | VWeight & | weight ) const

pure virtual

evaluate the weights, this needs to be implemented for a specific spline

Parameters

  | x | coordinate
  [out] | weight | the weights

Remarks
  why is this not a private function?

## operator()() [1/2]

void CSplineKernel::operator() | ( | double | x,
|  | SCache & | cache ) const

This operator evaluates the weights and indices of the interpolation at a given position. The boundary conditions given in the value cache are applied. The result is stored in the return value cache and this cache is only updated if neccesary

Parameters

  | x | location for which to evaluate weights and indices
  [in,out] | cache | storage for returned value

## operator()() [2/2]

void CSplineKernel::operator() | ( | double | x,
|  | VWeight & | weight,
|  | VIndex & | index ) const

This operator evaluates the weights and indices of the interpolation

Parameters

  | x | input coordinate
  [out] | weight | weights of the interpolation
  [out] | index | indices corresponding to the weights, No boundary conditions are applied.

## size()

size_t CSplineKernel::size | ( |  | ) | const

inline

Returns
  the size of the support of this kernel

Definition at line 358 of file splinekernel.hh.

Referenced by get_poles().

## Field Documentation

## data_descr

const char* CSplineKernel::data_descr

static

plugin handling data description

Definition at line 58 of file splinekernel.hh.

## type_descr

const char* CSplineKernel::type_descr

static

plugin handling type description

Definition at line 55 of file splinekernel.hh.

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

- splinekernel.hh