STIR  6.2.0
BSplines.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2005 - 2009-10-27, Hammersmith Imanet Ltd
3  Copyright (C) 2013, University College London
4  This file is part of STIR.
5 
6  SPDX-License-Identifier: Apache-2.0
7 
8  See STIR/LICENSE.txt for details
9 */
10 #ifndef __stir_numerics_BSplines__H__
11 #define __stir_numerics_BSplines__H__
12 
22 #include "stir/common.h"
23 
24 START_NAMESPACE_STIR
25 
26 namespace BSpline
27 {
28 
32 typedef double pos_type;
33 
38 {
39  near_n,
40  linear,
41  quadratic,
42  cubic,
43  quartic,
44  quintic,
45  oMoms
46 };
47 
53 template <class RandIterOut, class IterT, class constantsT>
54 inline void BSplines_coef(RandIterOut c_begin_iterator,
55  RandIterOut c_end_iterator,
56  IterT input_begin_iterator,
57  IterT input_end_iterator,
58  const constantsT z1,
59  const constantsT z2,
60  const constantsT lambda); // to be taken from the class
61 
65 template <typename pos_type>
66 inline pos_type BSplines_1st_der_weight(const pos_type relative_position, const BSplineType spline_type);
67 
71 template <typename pos_type>
72 inline pos_type BSplines_weights(const pos_type relative_position, const BSplineType spline_type);
73 
74 //*/
75 } // namespace BSpline
76 
77 END_NAMESPACE_STIR
78 
81 
82 #endif
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
Implementation of the (cubic) B-Splines Interpolation.
BSplineType
enum providing constants to define the type of B-Spline used for interpolation
Definition: BSplines.h:37
pos_type BSplines_weights(const pos_type relative_position, const BSplineType spline_type)
return spline value
double pos_type
The type used for relative positions between the grid points.
Definition: BSplines.h:32
pos_type BSplines_1st_der_weight(const pos_type relative_position, const BSplineType spline_type)
return value of the first derivative of the spline
Implementation of the B-Splines Interpolation.
basic configuration include file