STIR 6.4.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
21
22#include "stir/common.h"
23
24START_NAMESPACE_STIR
25
26namespace BSpline
27{
28
32typedef double pos_type;
33
38{
39 near_n,
40 linear,
41 quadratic,
42 cubic,
43 quartic,
44 quintic,
45 oMoms
46};
47
53template <class RandIterOut, class IterT, class constantsT>
54inline 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
65template <typename pos_type>
66inline pos_type BSplines_1st_der_weight(const pos_type relative_position, const BSplineType spline_type);
67
71template <typename pos_type>
72inline pos_type BSplines_weights(const pos_type relative_position, const BSplineType spline_type);
73
74//*/
75} // namespace BSpline
76
77END_NAMESPACE_STIR
78
81
82#endif
Implementation of the (cubic) B-Splines Interpolation.
Implementation of the B-Splines Interpolation.
basic configuration include file
pos_type BSplines_1st_der_weight(const pos_type relative_position, const BSplineType spline_type)
return value of the first derivative of the spline
double pos_type
The type used for relative positions between the grid points.
Definition BSplines.h:32
pos_type BSplines_weights(const pos_type relative_position, const BSplineType spline_type)
return spline value
BSplineType
enum providing constants to define the type of B-Spline used for interpolation
Definition BSplines.h:38