aimsalgo  5.1.2
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. More...
 
virtual double derivative (double x, unsigned n=1) const
 n-th derivative of the spline at point x More...
 
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. More...
 
virtual void setOrder (unsigned order)
 order More...
 
virtual void setNbDer (unsigned nder)
 number of derivative stored More...
 
virtual void setLength (size_t length)
 array length More...
 
virtual unsigned nder () const
 Get parametersnumber of derivative stored. More...
 
virtual size_t length () const
 array length More...
 
- 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 &nbsp;{ (Re)set all parameters. More...
 
virtual void setScale (float scale)
 scale More...
 
virtual void setShifted (bool shifted)
 shifted More...
 
virtual void setCentered (bool centered)
 centered More...
 
unsigned order () const
 Get parameters &nbsp;{ spline order. More...
 
float scale () const
 spline scale More...
 
bool shifted () const
 is shifted ? More...
 
bool centered () const
 is centered ? More...
 
virtual double operator() (double x) const
 Compute value. More...
 
virtual const Point2ddsupport () const
 Get the inferior and superior boundaries of the function support (i.e. More...
 

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)

◆ ~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

◆ is_valid()

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

◆ length()

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

array length

◆ nder()

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

Get parametersnumber of derivative stored.

◆ operator=()

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

◆ 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

◆ setArray()

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

◆ setLength()

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

array length

◆ setNbDer()

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

number of derivative stored

◆ setOrder()

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

order

Reimplemented from aims::BSpline.

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: