10 #ifndef __stir_numerics_BSplines1DRegularGrid__H__ 11 #define __stir_numerics_BSplines1DRegularGrid__H__ 37 template <
typename out_elemT,
typename in_elemT = out_elemT,
typename constantsT = in_elemT>
41 typedef typename std::vector<out_elemT>::iterator RandIterOut;
47 inline out_elemT BSplines_product(
const int index,
const pos_type relative_position,
const bool if_deriv)
const;
51 inline out_elemT compute_BSplines_value(
const pos_type relative_position,
const bool if_deriv)
const;
54 template <
class IterT>
55 inline void set_coef(IterT input_begin_iterator, IterT input_end_iterator)
57 BSplines1DRegularGrid::input_size =
static_cast<int>(input_end_iterator - input_begin_iterator);
58 BSplines_coef_vector.resize(input_size);
60 BSplines_coef_vector.begin(), BSplines_coef_vector.end(), input_begin_iterator, input_end_iterator, z1, z2, lambda);
64 std::vector<out_elemT> BSplines_coef_vector;
74 template <
class IterT>
77 set_private_values(cubic);
78 set_coef(input_begin_iterator, input_end_iterator);
81 template <
class IterT>
84 set_private_values(this_type);
85 set_coef(input_begin_iterator, input_end_iterator);
93 inline out_elemT BSplines(
const pos_type relative_position)
const;
95 inline out_elemT BSplines_1st_der(
const pos_type relative_position)
const;
98 inline const out_elemT operator()(
const pos_type relative_position)
const;
100 inline const std::vector<out_elemT>
101 BSplines_output_sequence(RandIterOut output_relative_position_begin_iterator,
102 RandIterOut output_relative_position_end_iterator);
103 inline const std::vector<out_elemT> BSplines_output_sequence(std::vector<pos_type> output_relative_position);
void BSplines_coef(RandIterOut c_begin_iterator, RandIterOut c_end_iterator, IterT input_begin_iterator, IterT input_end_iterator, const constantsT z1, const constantsT z2, const constantsT lambda)
compute BSpline coefficients that gives the BSpline that interpolates the given data ...
Definition: BSplines_coef.inl:56
BSplineType
enum providing constants to define the type of B-Spline used for interpolation
Definition: BSplines.h:37
double pos_type
The type used for relative positions between the grid points.
Definition: BSplines.h:32
Temporary class for 1D B-splines.
Definition: BSplines1DRegularGrid.h:38
Implementation of the B-Splines Interpolation.
Implementation of the basic components and declarations for B-Splines Interpolation.
BSplines1DRegularGrid(const IterT input_begin_iterator, const IterT input_end_iterator, const BSplineType this_type)
constructor given a begin_ and end_ iterator as input, estimates the Coefficients ...
Definition: BSplines1DRegularGrid.h:82
BSplines1DRegularGrid(const IterT input_begin_iterator, const IterT input_end_iterator)
constructor given a begin_ and end_ iterator as input, estimates the Coefficients ...
Definition: BSplines1DRegularGrid.h:75