STIR
6.2.0
|
A class for n-dimensional BSpline interpolation when the input samples are on a regular grid. More...
#include "stir/numerics/BSplinesRegularGrid.h"
Public Member Functions | |
Array< num_dimensions, out_elemT > | get_coefficients () const |
BSplinesRegularGrid (const Array< num_dimensions, in_elemT > &input, const BSplineType &this_type=cubic) | |
constructor given an array of samples and the spline type | |
BSplinesRegularGrid (const Array< num_dimensions, in_elemT > &input, const BasicCoordinate< num_dimensions, BSplineType > &this_type) | |
constructor given an array of samples and a different spline type for every dimension | |
BSplinesRegularGrid (const BSplineType &this_type=cubic) | |
constructor that only sets the spline type More... | |
BSplinesRegularGrid (const BasicCoordinate< num_dimensions, BSplineType > &this_type) | |
constructor that only sets a different spline type for every dimension More... | |
~BSplinesRegularGrid () | |
destructor | |
void | set_coef (const Array< num_dimensions, in_elemT > &input) |
Compute the coefficients for the B-splines from an array of samples. More... | |
const out_elemT | operator() (const BasicCoordinate< num_dimensions, pos_type > &relative_positions) const |
Compute value of the interpolator. More... | |
const BasicCoordinate< num_dimensions, out_elemT > | gradient (const BasicCoordinate< num_dimensions, pos_type > &relative_positions) const |
Compute gradient of the interpolator. More... | |
A class for n-dimensional BSpline interpolation when the input samples are on a regular grid.
This class provides essentially an n-dimensional function, so can be used as a function object.
\warning The implementation currently uses mirror boundary conditions. This means you can ask for values of the interpolator outside the original grid, but the results might not be what you expect.
|
inlineexplicit |
constructor that only sets the spline type
You need to call set_coef() first before you will get a sensible result.
|
inlineexplicit |
constructor that only sets a different spline type for every dimension
You need to call set_coef() first before you will get a sensible result.
|
inline |
Compute the coefficients for the B-splines from an array of samples.
When the order of the spline is larger than 1, the coefficients multiplying the basic splines are not equal to the samples. This variable stores them for further use.
|
inline |
Compute value of the interpolator.
relative_positions | A coordinate with respect to the original grid coordinates as used by the input array. In particular, if the input array was not 0-based, your relative_positions should not be either. |
|
inline |
Compute gradient of the interpolator.
relative_positions | A coordinate with respect to the original grid coordinates as used by the input array. In particular, if the input array was not 0-based, your relative_positions should not be either. |