aimsalgo 6.0.0
Neuroimaging image processing
aims::TabulBSpline Class Reference

Pre-computed B-Spline values In the "order 0" case, the array is not used (the analytical expression is too simple) More...

#include <aims/math/bspline.h>

Inheritance diagram for aims::TabulBSpline:
Collaboration diagram for aims::TabulBSpline:

Public Member Functions

 TabulBSpline (unsigned order=3, unsigned nder=1, float scale=1., bool shifted=false, size_t length=std::numeric_limits< unsigned short >::max() - 1)
 
 TabulBSpline (const TabulBSpline &other)
 
virtual ~TabulBSpline ()
 
TabulBSplineoperator= (const TabulBSpline &other)
 
virtual double at (double x) const
 Get valuespline value at point x.
 
virtual double derivative (double x, unsigned n=1) const
 n-th derivative of the spline at point x
 
virtual void reset (unsigned order=3, unsigned nder=1, float scale=1., bool shifted=false, size_t length=std::numeric_limits< unsigned short >::max() - 1)
 Set parameters Be aware that a call to reset, setOrder, setNbDer and setLength will trigger a reallocation of the array and a recomputing of the values.
 
virtual void setOrder (unsigned order)
 order
 
virtual void setNbDer (unsigned nder)
 number of derivative stored
 
virtual void setLength (size_t length)
 array length
 
virtual unsigned nder () const
 Get parametersnumber of derivative stored.
 
virtual size_t length () const
 array length
 
- Public Member Functions inherited from aims::BSpline
 BSpline (unsigned order=3, float scale=1., bool shifted=false)
 
 BSpline (const BSpline &other)
 
virtual ~BSpline ()
 
BSplineoperator= (const BSpline &other)
 
virtual void reset (unsigned order=3, float scale=1., bool shifted=false)
 Set parameters @ { (Re)set all parameters.
 
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 const Point2ddsupport () const
 Get the inferior and superior boundaries of the function support (i.e.
 

Protected Member Functions

size_t index (double x) const
 
bool is_valid (size_t index) const
 
void setArray (unsigned nder, size_t length)
 
- Protected Member Functions inherited from aims::BSpline
double dO () const
 
virtual void setSupport ()
 

Protected Attributes

std::vector< std::vector< double > > _values
 
double _tablescale
 
double _tableoffset
 
- Protected Attributes inherited from aims::BSpline
unsigned _order
 
float _scale
 
bool _shift
 
Point2dd _support
 

Detailed Description

Pre-computed B-Spline values In the "order 0" case, the array is not used (the analytical expression is too simple)

See BSpline for information on values computation

Definition at line 251 of file bspline.h.

Constructor & Destructor Documentation

◆ TabulBSpline() [1/2]

aims::TabulBSpline::TabulBSpline ( unsigned order = 3,
unsigned nder = 1,
float scale = 1.,
bool shifted = false,
size_t length = std::numeric_limits< unsigned short >::max() - 1 )

◆ TabulBSpline() [2/2]

aims::TabulBSpline::TabulBSpline ( const TabulBSpline & other)

References TabulBSpline().

◆ ~TabulBSpline()

virtual aims::TabulBSpline::~TabulBSpline ( )
virtual

Member Function Documentation

◆ at()

virtual double aims::TabulBSpline::at ( double x) const
virtual

Get valuespline value at point x.

Reimplemented from aims::BSpline.

◆ derivative()

virtual double aims::TabulBSpline::derivative ( double x,
unsigned n = 1 ) const
virtual

n-th derivative of the spline at point x

Reimplemented from aims::BSpline.

◆ index()

size_t aims::TabulBSpline::index ( double x) const
protected

Referenced by is_valid().

◆ is_valid()

bool aims::TabulBSpline::is_valid ( size_t index) const
protected

References index().

◆ length()

virtual size_t aims::TabulBSpline::length ( ) const
virtual

array length

Referenced by reset(), setArray(), setLength(), and TabulBSpline().

◆ nder()

virtual unsigned aims::TabulBSpline::nder ( ) const
virtual

Get parametersnumber of derivative stored.

Referenced by reset(), setArray(), setNbDer(), and TabulBSpline().

◆ operator=()

TabulBSpline & aims::TabulBSpline::operator= ( const TabulBSpline & other)

References TabulBSpline().

◆ reset()

virtual void aims::TabulBSpline::reset ( unsigned order = 3,
unsigned nder = 1,
float scale = 1.,
bool shifted = false,
size_t length = std::numeric_limits< unsigned short >::max() - 1 )
virtual

Set parameters Be aware that a call to reset, setOrder, setNbDer and setLength will trigger a reallocation of the array and a recomputing of the values.

If several of these values need changing, it is thus avdised to use the reset() method.

(Re)set all parameters

References length(), std::numeric_limits< typename _Tp >::max(), nder(), aims::BSpline::order(), aims::BSpline::scale(), and aims::BSpline::shifted().

◆ setArray()

void aims::TabulBSpline::setArray ( unsigned nder,
size_t length )
protected

References length(), and nder().

◆ setLength()

virtual void aims::TabulBSpline::setLength ( size_t length)
virtual

array length

References length().

◆ setNbDer()

virtual void aims::TabulBSpline::setNbDer ( unsigned nder)
virtual

number of derivative stored

References nder().

◆ setOrder()

virtual void aims::TabulBSpline::setOrder ( unsigned order)
virtual

order

Reimplemented from aims::BSpline.

References aims::BSpline::order().

Member Data Documentation

◆ _tableoffset

double aims::TabulBSpline::_tableoffset
protected

Definition at line 314 of file bspline.h.

◆ _tablescale

double aims::TabulBSpline::_tablescale
protected

Definition at line 313 of file bspline.h.

◆ _values

std::vector<std::vector<double> > aims::TabulBSpline::_values
protected

Definition at line 312 of file bspline.h.


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