#include <Bspline.hpp>

Public Member Functions | |
| Bspline (size_t spline_order, size_t n_coefficients) | |
| Bspline (const Bspline &source) | |
| const Bspline & | operator= (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 |
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.
| 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.
| imaging::Bspline< DATA_t >::Bspline | ( | const Bspline< DATA_t > & | source | ) | [inline] |
Copy constructor.
| const Bspline& imaging::Bspline< DATA_t >::operator= | ( | const Bspline< DATA_t > & | rhs | ) | [inline] |
Copy assignement.
| size_t imaging::Bspline< DATA_t >::spline_order | ( | ) | const [inline] |
Returns the spline order.
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 > >::is_in_basis_spline_support().
| float_t imaging::Bspline< DATA_t >::knot | ( | size_t | i | ) | const [inline] |
Returns the i-th knot.
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 > >::is_in_basis_spline_support().
| float_t imaging::Bspline< DATA_t >::first_knot | ( | ) | const [inline] |
Returns the first knot.
Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.
| float_t imaging::Bspline< DATA_t >::last_knot | ( | ) | const [inline] |
Returns the last knot.
Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.
| void imaging::Bspline< DATA_t >::set_knot | ( | size_t | i, | |
| float_t | value | |||
| ) | [inline] |
Sets the i-th knot to value.
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 > >::regular_knots().
| const DATA_t& imaging::Bspline< DATA_t >::coefficient | ( | size_t | i | ) | const [inline] |
Returns the i-th coefficient.
Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.
| void imaging::Bspline< DATA_t >::set_coefficient | ( | size_t | i, | |
| const DATA_t & | value | |||
| ) | [inline] |
Sets the i-th coefficient to value.
Reimplemented in imaging::PeriodicBspline< DATA_t >, and imaging::PeriodicBspline< boost::numeric::ublas::fixed_vector< double, 2 > >.
| 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 > >.
| size_t imaging::Bspline< DATA_t >::n_knots | ( | ) | const [inline] |
Returns the number of knots of the B-Spline. This is the number of coefficients plus the spline order.
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 > >::last_knot(), imaging::Bspline< boost::numeric::ublas::fixed_vector< double, 2 > >::regular_knots(), and imaging::Bspline< boost::numeric::ublas::fixed_vector< double, 2 > >::set_knot().
| size_t imaging::Bspline< DATA_t >::n_coefficients | ( | ) | const [inline] |
Returns the number of coefficients of the B-Spline.
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 > >::regular_knots(), and imaging::Bspline< boost::numeric::ublas::fixed_vector< double, 2 > >::set_coefficient().
| 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()().
| 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 > >.
| 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 > >.
| 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 > >.
| 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 > >.
1.5.5