![]() |
aimsalgo 6.0.0
Neuroimaging image processing
|
Centered and scaled B-Spline function, evaluated at run time. More...
#include <aims/math/bspline.h>


Public Member Functions | |
| BSpline (unsigned order=3, float scale=1., bool shifted=false) | |
| BSpline (const BSpline &other) | |
| virtual | ~BSpline () |
| BSpline & | operator= (const BSpline &other) |
| virtual void | reset (unsigned order=3, float scale=1., bool shifted=false) |
| Set parameters @ { (Re)set all parameters. | |
| virtual void | setOrder (unsigned order) |
| order | |
| virtual void | setScale (float scale) |
| scale | |
| virtual void | setShifted (bool shifted) |
| shifted | |
| virtual void | setCentered (bool centered) |
| centered | |
| unsigned | order () const |
| Get parameters @ { spline order. | |
| float | scale () const |
| spline scale | |
| bool | shifted () const |
| is shifted ? | |
| bool | centered () const |
| is centered ? | |
| virtual double | operator() (double x) const |
| Compute value. | |
| virtual double | at (double x) const |
| spline value at point x | |
| virtual double | derivative (double x, unsigned n=1) const |
| n-th derivative of the spline at point x | |
| virtual const Point2dd & | support () const |
| Get the inferior and superior boundaries of the function support (i.e. | |
Protected Member Functions | |
| double | dO () const |
| virtual void | setSupport () |
Protected Attributes | |
| unsigned | _order |
| float | _scale |
| bool | _shift |
| Point2dd | _support |
Centered and scaled B-Spline function, evaluated at run time.
Centered B-splines of order n are recursively evaluated following the formula:
![\[ \beta^n(x) = \frac{
(\frac{n+1}{2} + x) \beta^{n-1}( x + \frac{1}{2} ) +
(\frac{n+1}{2} - x) \beta^{n-1}( x - \frac{1}{2} )
}{n}
\]](form_0.png)
Let m be the scaling factor, the scaled B-Spline is then equal to 
A shifted scaled B-Spline is equal to: 
See Unser, Aldroubi & Eden: "B-Spline Signal Processing: Part I - Theory" in IEEE Transactions on Signal Processing (February 1993).
In this implementation, unshifted centered B-Spline are recursively evaluated at value x/m (+ .5).
| aims::BSpline::BSpline | ( | unsigned | order = 3, |
| float | scale = 1., | ||
| bool | shifted = false ) |
References order(), scale(), and shifted().
Referenced by BSpline(), and operator=().
|
virtual |
|
virtual |
spline value at point x
Reimplemented in aims::FastBSpline, and aims::TabulBSpline.
|
inline |
is centered ?
Definition at line 192 of file bspline.h.
References _shift.
Referenced by setCentered(), and aims::DiscreteBSpline::setCentered().
|
virtual |
n-th derivative of the spline at point x
Reimplemented in aims::FastBSpline, and aims::TabulBSpline.
|
inlineprotected |
|
virtual |
Compute value.
|
inline |
Get parameters @ { spline order.
Definition at line 186 of file bspline.h.
References _order.
Referenced by BSpline(), aims::DiscreteBSpline::DiscreteBSpline(), aims::FastBSpline::FastBSpline(), reset(), aims::DiscreteBSpline::reset(), aims::TabulBSpline::reset(), setOrder(), aims::DiscreteBSpline::setOrder(), aims::TabulBSpline::setOrder(), and aims::TabulBSpline::TabulBSpline().
|
virtual |
Set parameters @ { (Re)set all parameters.
Reimplemented in aims::DiscreteBSpline.
|
inline |
spline scale
Definition at line 188 of file bspline.h.
References _scale.
Referenced by BSpline(), aims::DiscreteBSpline::DiscreteBSpline(), aims::FastBSpline::FastBSpline(), reset(), aims::DiscreteBSpline::reset(), aims::TabulBSpline::reset(), setScale(), aims::DiscreteBSpline::setScale(), and aims::TabulBSpline::TabulBSpline().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Reimplemented in aims::DiscreteBSpline.
|
inline |
is shifted ?
Definition at line 190 of file bspline.h.
References _shift.
Referenced by BSpline(), aims::DiscreteBSpline::DiscreteBSpline(), aims::FastBSpline::FastBSpline(), reset(), aims::DiscreteBSpline::reset(), aims::TabulBSpline::reset(), setShifted(), aims::DiscreteBSpline::setShifted(), and aims::TabulBSpline::TabulBSpline().
|
virtual |
Get the inferior and superior boundaries of the function support (i.e.
the interval on which it is not null). If the order is not zero, boundaries are not included in the support. Else, they are.
|
protected |
|
protected |
|
protected |
Definition at line 200 of file bspline.h.
Referenced by centered(), and shifted().