|
static MIRTKCU_API TReal | B (TReal) |
| Returns the value of the B-spline function.
|
|
static MIRTKCU_API TReal | B (int, TReal) |
| Returns the value of the i-th B-spline basis function.
|
|
static MIRTKCU_API TReal | B0 (TReal) |
| Returns the value of the first B-spline basis function.
|
|
static MIRTKCU_API TReal | B0_I (TReal) |
| Returns the 1st derivative value of the first B-spline basis function.
|
|
static MIRTKCU_API TReal | B0_II (TReal) |
| Returns the 2nd derivative value of the first B-spline basis function.
|
|
static MIRTKCU_API TReal | B0_III (TReal) |
| Returns the 3rd derivative value of the first B-spline basis function.
|
|
static MIRTKCU_API TReal | B0_nI (int, TReal) |
| Returns the n-th derivative value of the first B-spline basis function.
|
|
static MIRTKCU_API TReal | B1 (TReal) |
| Returns the value of the second B-spline basis function.
|
|
static MIRTKCU_API TReal | B1_I (TReal) |
| Returns the 1st derivative value of the second B-spline basis function.
|
|
static MIRTKCU_API TReal | B1_II (TReal) |
| Returns the 2nd derivative value of the second B-spline basis function.
|
|
static MIRTKCU_API TReal | B1_III (TReal) |
| Returns the 3rd derivative value of the second B-spline basis function.
|
|
static MIRTKCU_API TReal | B1_nI (int, TReal) |
| Returns the n-th derivative value of the second B-spline basis function.
|
|
static MIRTKCU_API TReal | B2 (TReal) |
| Returns the value of the third B-spline basis function.
|
|
static MIRTKCU_API TReal | B2_I (TReal) |
| Returns the 1st derivative value of the third B-spline basis function.
|
|
static MIRTKCU_API TReal | B2_II (TReal) |
| Returns the 2nd derivative value of the third B-spline basis function.
|
|
static MIRTKCU_API TReal | B2_III (TReal) |
| Returns the 3rd derivative value of the third B-spline basis function.
|
|
static MIRTKCU_API TReal | B2_nI (int, TReal) |
| Returns the n-th derivative value of the third B-spline basis function.
|
|
static MIRTKCU_API TReal | B3 (TReal) |
| Returns the value of the fourth B-spline basis function.
|
|
static MIRTKCU_API TReal | B3_I (TReal) |
| Returns the 1st derivative value of the fourth B-spline basis function.
|
|
static MIRTKCU_API TReal | B3_II (TReal) |
| Returns the 2nd derivative value of the fourth B-spline basis function.
|
|
static MIRTKCU_API TReal | B3_III (TReal) |
| Returns the 3rd derivative value of the fourth B-spline basis function.
|
|
static MIRTKCU_API TReal | B3_nI (int, TReal) |
| Returns the n-th derivative value of the fourth B-spline basis function.
|
|
static MIRTKCU_API TReal | B_I (TReal) |
| Returns the 1st derivative value of the B-spline function.
|
|
static MIRTKCU_API TReal | B_I (int, TReal) |
| Returns the 1st derivative value of the i-th B-spline basis function.
|
|
static MIRTKCU_API TReal | B_II (TReal) |
| Returns the 2nd derivative value of the B-spline function.
|
|
static MIRTKCU_API TReal | B_II (int, TReal) |
| Returns the 2nd derivative value of the i-th B-spline basis function.
|
|
static MIRTKCU_API TReal | B_III (TReal) |
| Returns the 3rd derivative value of the B-spline function.
|
|
static MIRTKCU_API TReal | B_III (int, TReal) |
| Returns the 3rd derivative value of the i-th B-spline basis function.
|
|
static MIRTKCU_API TReal | B_nI (int, TReal) |
| Returns the n-th derivative value of the B-spline function.
|
|
static MIRTKCU_API TReal | B_nI (int, int, TReal) |
| Returns the n-th derivative value of the i-th B-spline basis function.
|
|
static void | Initialize (bool=false) |
| Initialize lookup tables.
|
|
static int | VariableToIndex (TReal) |
| Returns the lookup table index for a given value in [0,1].
|
|
static bool | VariableToIndex (TReal, int &i, int &j) |
|
static MIRTKCU_API TReal | Weight (TReal) |
| Returns the value of the B-spline function.
|
|
static MIRTKCU_API void | Weights (TReal, TReal[4]) |
|
template<class TReal>
class mirtk::BSpline< TReal >
Cubic B-spline, its basis functions, and their derivatives.
This static class provides methods to evaluate the cubic B-spline function, each of its four basis functions, and the corresponding first and second derivatives in the interval [0, 1]. It is in particular intended for use by classes implementing the irtkFreeFormTransformation interface using a cubic B-spline basis to represent the displacement or velocity field, respectively.
The cubic B-spline pieces are indexed here in reverse order! This is especially important when using the derivatives, because otherwise the sign may be incorrect when the intervals are exchanged. Spline function B(t) consists of pieces:
- B3(t + 2) for t in [-2, -1)
- B2(t + 1) for t in [-1, 0)
- B1(t - 0) for t in [ 0, 1)
- B0(t - 1) for t in [ 1, 2]
- Note
- Though not explicitly enforced by protecting these members, do not modify the lookup tables of precomputed function values as it will affect all code which makes use of them! Moreover, make sure to call the static Initialize() method at least once in your program before accessing any of these precomputed values.
Usage:
BSplineFunction kernel;
double exact = kernel.B1(0.2);
double approx = kernel.LookupTable[kernel.VariableToIndex(0.2)][1];
Definition at line 71 of file BSpline.h.