ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkCoxDeBoorBSplineKernelFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 
21 #include "itkKernelFunctionBase.h"
22 #include "vnl/vnl_real_polynomial.h"
23 #include "vnl/vnl_matrix.h"
24 
25 namespace itk
26 {
56 template<unsigned int VSplineOrder = 3, typename TRealValueType = double>
58  public KernelFunctionBase<TRealValueType>
59 {
60 public:
66 
67  typedef typename Superclass::RealType RealType;
68 
70  itkNewMacro( Self );
71 
74 
75  typedef vnl_vector<TRealValueType> VectorType;
76  typedef vnl_real_polynomial PolynomialType;
77  typedef vnl_matrix<TRealValueType> MatrixType;
78 
80  void SetSplineOrder( const unsigned int );
81 
83  itkGetConstMacro( SplineOrder, unsigned int );
84 
86  TRealValueType Evaluate( const TRealValueType & ) const ITK_OVERRIDE;
87 
89  TRealValueType EvaluateDerivative( const TRealValueType & ) const;
90 
92  TRealValueType EvaluateNthDerivative( const TRealValueType &, const unsigned int ) const;
93 
100 
106 
107 protected:
109  virtual ~CoxDeBoorBSplineKernelFunction();
110  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
111 
112 private:
113  CoxDeBoorBSplineKernelFunction( const Self & ); //purposely not implemented
114  void operator=( const Self & ); //purposely not implemented
115 
120  void GenerateBSplineShapeFunctions( const unsigned int );
121 
128  PolynomialType CoxDeBoor( const unsigned short, const VectorType,
129  const unsigned int, const unsigned int );
130 
132  unsigned int m_SplineOrder;
133 };
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkCoxDeBoorBSplineKernelFunction.hxx"
138 #endif
139 
140 #endif
TRealValueType EvaluateDerivative(const TRealValueType &) const
KernelFunctionBase< TRealValueType > Superclass
TRealValueType EvaluateNthDerivative(const TRealValueType &, const unsigned int) const
void PrintSelf(std::ostream &os, Indent indent) const override
PolynomialType CoxDeBoor(const unsigned short, const VectorType, const unsigned int, const unsigned int)
Kernel used for density estimation and nonparameteric regression.
void GenerateBSplineShapeFunctions(const unsigned int)
void SetSplineOrder(const unsigned int)
BSpline kernel used for density estimation and nonparameteric regression.
TRealValueType Evaluate(const TRealValueType &) const override
MatrixType GetShapeFunctionsInZeroToOneInterval()
Control indentation during Print() invocation.
Definition: itkIndent.h:49