imaging::Bspline< DATA_t > Class Template Reference
[B-Spline Module]

Class template for B-Splines of arbitrary data type. More...

#include <Bspline.hpp>

Inheritance diagram for imaging::Bspline< DATA_t >:

imaging::PeriodicBspline< DATA_t >

List of all members.

Public Member Functions

 Bspline (size_t spline_order, size_t n_coefficients)
 Bspline (const Bspline &source)
const Bsplineoperator= (const Bspline &rhs)
size_t spline_order () const
float_t knot (size_t i) const
float_t first_knot () const
float_t last_knot () const
void set_knot (size_t i, float_t value)
const DATA_t & coefficient (size_t i) const
void set_coefficient (size_t i, const DATA_t &value)
void resize (size_t spline_order, size_t n_coefficients)
size_t n_knots () const
size_t n_coefficients () const
DATA_t operator() (float_t t, DATA_t &first_derivative) const
DATA_t operator() (float_t t) const
void regular_knots (float_t x_0, float_t x_1)
DATA_t operator() (float_t t, DATA_t &first_derivative, DATA_t &second_derivative) const
bool is_in_basis_spline_support (size_t i, float_t t) const


Detailed Description

template<class DATA_t>
class imaging::Bspline< DATA_t >

Class template for B-Splines of arbitrary data type.

This class template implements a B-Spline of arbitrary spline order. For template parameter DATA_t vector space operations (scalar multiplication, addition) and explicit construction from a float value must be implemented. Instantiating this class for 2-dimensional vectors creates a B-Spline curve.

See also:
PeriodicBspline

Constructor & Destructor Documentation

template<class DATA_t>
imaging::Bspline< DATA_t >::Bspline ( size_t  spline_order,
size_t  n_coefficients 
) [inline]

Construct a B-Spline of spline_order with n_coefficients. The number of knots is then the number of coefficients plus the spline order.

template<class DATA_t>
imaging::Bspline< DATA_t >::Bspline ( const Bspline< DATA_t > &  source  )  [inline]

Copy constructor.


Member Function Documentation

template<class DATA_t>
const Bspline& imaging::Bspline< DATA_t >::operator= ( const Bspline< DATA_t > &  rhs  )  [inline]

Copy assignement.

template<class DATA_t>
size_t imaging::Bspline< DATA_t >::spline_order (  )  const [inline]

template<class DATA_t>
float_t imaging::Bspline< DATA_t >::knot ( size_t  i  )  const [inline]

template<class DATA_t>
float_t imaging::Bspline< DATA_t >::first_knot (  )  const [inline]

template<class DATA_t>
float_t imaging::Bspline< DATA_t >::last_knot (  )  const [inline]

template<class DATA_t>
void imaging::Bspline< DATA_t >::set_knot ( size_t  i,
float_t  value 
) [inline]

template<class DATA_t>
const DATA_t& imaging::Bspline< DATA_t >::coefficient ( size_t  i  )  const [inline]

template<class DATA_t>
void imaging::Bspline< DATA_t >::set_coefficient ( size_t  i,
const DATA_t &  value 
) [inline]

template<class DATA_t>
void imaging::Bspline< DATA_t >::resize ( size_t  spline_order,
size_t  n_coefficients 
) [inline]

Sets the order of the B-Spline to spline_order and its number of coefficients to n_coefficients.

Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.

template<class DATA_t>
size_t imaging::Bspline< DATA_t >::n_knots (  )  const [inline]

template<class DATA_t>
size_t imaging::Bspline< DATA_t >::n_coefficients (  )  const [inline]

template<class DATA_t>
DATA_t imaging::Bspline< DATA_t >::operator() ( float_t  t,
DATA_t &  first_derivative 
) const [inline]

Evaluates the B-Spline at t and computes its first_derivative at t. If t is outside the spline support, first_derivative is set to 0 and 0 is returned.

Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.

Referenced by imaging::Bspline< boost::numeric::ublas::fixed_vector< double, 2 > >::operator()().

template<class DATA_t>
DATA_t imaging::Bspline< DATA_t >::operator() ( float_t  t  )  const [inline]

Evaluates the B-Spline at t. If t is outside the spline support, 0 is returned.

Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.

template<class DATA_t>
void imaging::Bspline< DATA_t >::regular_knots ( float_t  x_0,
float_t  x_1 
) [inline]

Initializes the knots of the B-Spline to be equally distributed between x_0 and x_1.

Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.

template<class DATA_t>
DATA_t imaging::Bspline< DATA_t >::operator() ( float_t  t,
DATA_t &  first_derivative,
DATA_t &  second_derivative 
) const [inline]

Evaluates the B-Spline at t and computes its first_derivative and second_derivative at t. If t is outside the spline support, first_derivative and second_derivative are set to 0 and 0 is returned.

Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.

template<class DATA_t>
bool imaging::Bspline< DATA_t >::is_in_basis_spline_support ( size_t  i,
float_t  t 
) const [inline]

Returns true if t is in the support of the i-th basis spline defined by the current knots of this spline.

Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.


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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5