|
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...
|
|
template<int num_dimensions, typename out_elemT, typename in_elemT = out_elemT, typename constantsT = in_elemT>
class stir::BSpline::BSplinesRegularGrid< num_dimensions, out_elemT, in_elemT, constantsT >
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.
- Example
Array<3,float> some_data = ....;
BSplinesRegularGrid<3, float> interpolator(cubic);
interpolator.set_coef(some_data);
Coordinate3D<double> position(1.2, 3.4, 5.6);
float value = interpolator(position);
\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.
template<int num_dimensions, typename out_elemT , typename in_elemT, typename constantsT >
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.
- Todo:
- rename