ITK  6.0.0
Insight Toolkit
itkCoxDeBoorBSplineKernelFunction.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkCoxDeBoorBSplineKernelFunction_h
19#define itkCoxDeBoorBSplineKernelFunction_h
20
22#include "vnl/vnl_real_polynomial.h"
23#include "vnl/vnl_matrix.h"
24
25namespace itk
26{
56template <unsigned int VSplineOrder = 3, typename TRealValueType = double>
57class ITK_TEMPLATE_EXPORT CoxDeBoorBSplineKernelFunction : public KernelFunctionBase<TRealValueType>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(CoxDeBoorBSplineKernelFunction);
61
67
68 using typename Superclass::RealType;
69
71 itkNewMacro(Self);
72
74 itkOverrideGetNameOfClassMacro(CoxDeBoorBSplineKernelFunction);
75
76 using VectorType = vnl_vector<TRealValueType>;
77 using PolynomialType = vnl_real_polynomial;
78 using MatrixType = vnl_matrix<TRealValueType>;
79
81 void
82 SetSplineOrder(const unsigned int);
83
85 itkGetConstMacro(SplineOrder, unsigned int);
86
88 TRealValueType
89 Evaluate(const TRealValueType &) const override;
90
92 TRealValueType
93 EvaluateDerivative(const TRealValueType &) const;
94
96 TRealValueType
97 EvaluateNthDerivative(const TRealValueType &, const unsigned int) const;
98
106
113
114protected:
117 void
118 PrintSelf(std::ostream & os, Indent indent) const override;
119
120private:
125 void
126 GenerateBSplineShapeFunctions(const unsigned int);
127
135 CoxDeBoor(const unsigned short, const VectorType, const unsigned int, const unsigned int);
136
137 MatrixType m_BSplineShapeFunctions{};
138 unsigned int m_SplineOrder{};
139};
140} // end namespace itk
141
142#ifndef ITK_MANUAL_INSTANTIATION
143# include "itkCoxDeBoorBSplineKernelFunction.hxx"
144#endif
145
146#endif
BSpline kernel used for density estimation and nonparametric regression.
void SetSplineOrder(const unsigned int)
TRealValueType EvaluateNthDerivative(const TRealValueType &, const unsigned int) const
TRealValueType EvaluateDerivative(const TRealValueType &) const
MatrixType GetShapeFunctionsInZeroToOneInterval()
~CoxDeBoorBSplineKernelFunction() override=default
PolynomialType CoxDeBoor(const unsigned short, const VectorType, const unsigned int, const unsigned int)
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateBSplineShapeFunctions(const unsigned int)
TRealValueType Evaluate(const TRealValueType &) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Kernel used for density estimation and nonparametric regression.
Light weight base class for most itk classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....