ITK  4.3.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 
76  typedef vnl_real_polynomial PolynomialType;
78 
80  void SetSplineOrder( const unsigned int );
81 
83  itkGetConstMacro( SplineOrder, unsigned int );
84 
86  TRealValueType Evaluate( const TRealValueType & ) const;
87 
89  TRealValueType EvaluateDerivative( const TRealValueType & ) const;
90 
92  TRealValueType EvaluateNthDerivative( const TRealValueType &, const unsigned int ) const;
93 
99  MatrixType GetShapeFunctions();
100 
105  MatrixType GetShapeFunctionsInZeroToOneInterval();
106 
107 protected:
110  void PrintSelf( std::ostream & os, Indent indent ) const;
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
141