[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

BSplineBase< ORDER, T > Class Template Reference

#include <vigra/splines.hxx>

Public Types

typedef T argument_type
 
typedef T first_argument_type
 
typedef T result_type
 
typedef unsigned int second_argument_type
 
enum  StaticOrder
 
typedef T value_type
 

Public Member Functions

 BSplineBase (unsigned int derivativeOrder=0)
 
unsigned int derivativeOrder () const
 
result_type operator() (argument_type x) const
 
result_type operator() (first_argument_type x, second_argument_type derivative_order) const
 
value_type operator[] (value_type x) const
 
ArrayVector< double > const & prefilterCoefficients () const
 
double radius () const
 

Static Public Member Functions

static WeightMatrix const & weights ()
 

Detailed Description

template<int ORDER, class T = double>
class vigra::BSplineBase< ORDER, T >

Basic interface of the spline functors.

Implements the spline functions defined by the recursion

\[ B_0(x) = \left\{ \begin{array}{ll}
                              1 & -\frac{1}{2} \leq x < \frac{1}{2} \\
                              0 & \mbox{otherwise}
                    \end{array}\right.
\]

and

\[ B_n(x) = B_0(x) * B_{n-1}(x)
\]

where * denotes convolution, and n is the spline order given by the template parameter ORDER with ORDER < 18. These spline classes can be used as unary and binary functors, as kernels for resamplingConvolveImage(), and as arguments for SplineImageView. Note that the spline order is given as a template argument.

#include <vigra/splines.hxx>
Namespace: vigra

Member Typedef Documentation

◆ value_type

template<int ORDER, class T = double>
typedef T value_type

the value type if used as a kernel in resamplingConvolveImage().

◆ argument_type

template<int ORDER, class T = double>
typedef T argument_type

the functor's unary argument type

◆ first_argument_type

template<int ORDER, class T = double>
typedef T first_argument_type

the functor's first binary argument type

◆ second_argument_type

template<int ORDER, class T = double>
typedef unsigned int second_argument_type

the functor's second binary argument type

◆ result_type

template<int ORDER, class T = double>
typedef T result_type

the functor's result type (unary and binary)

Member Enumeration Documentation

◆ StaticOrder

template<int ORDER, class T = double>
enum StaticOrder

the spline order

Constructor & Destructor Documentation

◆ BSplineBase()

template<int ORDER, class T = double>
BSplineBase ( unsigned int derivativeOrder = 0)
explicit

Create functor for given derivative of the spline. The spline's order is specified spline by the template argument ORDER.

Member Function Documentation

◆ operator()() [1/2]

template<int ORDER, class T = double>
result_type operator() ( argument_type x) const

Unary function call. Returns the value of the spline with the derivative order given in the constructor. Note that only derivatives up to ORDER-1 are continuous, and derivatives above ORDER+1 are zero.

◆ operator()() [2/2]

template<int ORDER, class T = double>
result_type operator() ( first_argument_type x,
second_argument_type derivative_order ) const

Binary function call. The given derivative order is added to the derivative order specified in the constructor. Note that only derivatives up to ORDER-1 are continuous, and derivatives above ORDER+1 are zero.

◆ operator[]()

template<int ORDER, class T = double>
value_type operator[] ( value_type x) const

Index operator. Same as unary function call.

◆ radius()

template<int ORDER, class T = double>
double radius ( ) const

Get the required filter radius for a discrete approximation of the spline. Always equal to (ORDER + 1) / 2.0.

◆ derivativeOrder()

template<int ORDER, class T = double>
unsigned int derivativeOrder ( ) const

Get the derivative order of the Gaussian.

◆ prefilterCoefficients()

template<int ORDER, class T = double>
ArrayVector< double > const & prefilterCoefficients ( ) const

Get the prefilter coefficients required for interpolation. To interpolate with a B-spline, resamplingConvolveImage() can be used. However, the image to be interpolated must be pre-filtered using recursiveFilterX() and recursiveFilterY() with the filter coefficients given by this function. The length of the array corresponds to how many times the above recursive filtering has to be applied (zero length means no prefiltering necessary).

◆ weights()

template<int ORDER, class T = double>
static WeightMatrix const & weights ( )
static

Get the coefficients to transform spline coefficients into the coefficients of the corresponding polynomial. Currently internally used in SplineImageView; needs more documentation ???


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

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.12.2 (Mon Apr 14 2025)