go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkRecursiveBSplineInterpolationWeightFunction.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 __itkRecursiveBSplineInterpolationWeightFunction_h
19#define __itkRecursiveBSplineInterpolationWeightFunction_h
20
21#include "itkBSplineInterpolationWeightFunction.h"
22
26
27namespace itk
28{
30template< unsigned int SplineOrder, unsigned int Dimension >
32{
33public:
34
35 typedef GetConstNumberOfIndicesHack< SplineOrder, Dimension - 1 > OneDimensionLess;
36 itkStaticConstMacro( Value, unsigned int, ( SplineOrder + 1 ) * OneDimensionLess::Value );
37};
38
39template< unsigned int SplineOrder >
40class GetConstNumberOfIndicesHack< SplineOrder, 0 >
41{
42public:
43
44 itkStaticConstMacro( Value, unsigned int, 1 );
45};
46
48template< unsigned int SplineOrder, unsigned int Dimension >
49class GetConstNumberOfWeightsHackRecursiveBSpline
50{
51public:
52
53 itkStaticConstMacro( Value, unsigned int, ( SplineOrder + 1 ) * Dimension );
54};
55
73template<
74 typename TCoordRep = float,
75 unsigned int VSpaceDimension = 2,
76 unsigned int VSplineOrder = 3 >
78 public BSplineInterpolationWeightFunction< TCoordRep, VSpaceDimension, VSplineOrder >
79{
80public:
81
85 TCoordRep, VSpaceDimension, VSplineOrder > Superclass;
87 typedef SmartPointer< const Self > ConstPointer;
88
90 itkNewMacro( Self );
91
93 itkTypeMacro( RecursiveBSplineInterpolationWeightFunction, FunctionBase );
94
96 itkStaticConstMacro( SpaceDimension, unsigned int, VSpaceDimension );
97
99 itkStaticConstMacro( SplineOrder, unsigned int, VSplineOrder );
100
102 typedef typename Superclass::WeightsType WeightsType;
103 typedef typename Superclass::IndexType IndexType;
104 typedef typename Superclass::SizeType SizeType;
105 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
106 //typedef typename Superclass::
107
109 typedef GetConstNumberOfWeightsHackRecursiveBSpline<
110 itkGetStaticConstMacro( SplineOrder ),
111 itkGetStaticConstMacro( SpaceDimension ) > GetConstNumberOfWeightsHackRecursiveBSplineType;
112 itkStaticConstMacro( NumberOfWeights, unsigned int, GetConstNumberOfWeightsHackRecursiveBSplineType::Value );
114 itkGetStaticConstMacro( SplineOrder ),
115 itkGetStaticConstMacro( SpaceDimension ) > GetConstNumberOfIndicesHackType;
116 itkStaticConstMacro( NumberOfIndices, unsigned int, GetConstNumberOfIndicesHackType::Value );
117
119 itkGetConstMacro( NumberOfIndices, unsigned int );
120
123 WeightsType Evaluate( const ContinuousIndexType & index ) const override;
124
133 void Evaluate( const ContinuousIndexType & index,
134 WeightsType & weights, IndexType & startIndex ) const override;
135
137 WeightsType & weights, const IndexType & startIndex ) const;
138
140 WeightsType & weights, const IndexType & startIndex ) const;
141
142protected:
143
146 void PrintSelf( std::ostream & os, Indent indent ) const override;
147
148private:
149
150 RecursiveBSplineInterpolationWeightFunction( const Self & ); // purposely not implemented
151 void operator=( const Self & ); // purposely not implemented
152
154 unsigned int m_NumberOfWeights;
155 unsigned int m_NumberOfIndices;
157
159 typedef BSplineKernelFunction2< itkGetStaticConstMacro( SplineOrder ) > KernelType;
160 typedef BSplineDerivativeKernelFunction2< itkGetStaticConstMacro( SplineOrder ) > DerivativeKernelType;
161 typedef BSplineSecondOrderDerivativeKernelFunction2< itkGetStaticConstMacro( SplineOrder ) > SecondOrderDerivativeKernelType;
162
167
168};
169
170} // end namespace itk
171
172#ifndef ITK_MANUAL_INSTANTIATION
173#include "itkRecursiveBSplineInterpolationWeightFunction.hxx"
174#endif
175
176#endif
Derivative of a B-spline kernel used for density estimation and nonparametric regression.
B-spline kernel used for density estimation and nonparameteric regression.
Derivative of a B-spline kernel used for density estimation and nonparametric regression.
GetConstNumberOfIndicesHack< SplineOrder, Dimension - 1 > OneDimensionLess
itkStaticConstMacro(Value, unsigned int,(SplineOrder+1) *OneDimensionLess::Value)
Returns the weights over the support region used for B-spline interpolation/reconstruction.
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
BSplineSecondOrderDerivativeKernelFunction2< itkGetStaticConstMacro(SplineOrder) > SecondOrderDerivativeKernelType
void EvaluateSecondOrderDerivative(const ContinuousIndexType &index, WeightsType &weights, const IndexType &startIndex) const
BSplineKernelFunction2< itkGetStaticConstMacro(SplineOrder) > KernelType
GetConstNumberOfIndicesHack< itkGetStaticConstMacro(SplineOrder), itkGetStaticConstMacro(SpaceDimension) > GetConstNumberOfIndicesHackType
itkStaticConstMacro(NumberOfIndices, unsigned int, GetConstNumberOfIndicesHackType::Value)
void EvaluateDerivative(const ContinuousIndexType &index, WeightsType &weights, const IndexType &startIndex) const
WeightsType Evaluate(const ContinuousIndexType &index) const override
itkStaticConstMacro(NumberOfWeights, unsigned int, GetConstNumberOfWeightsHackRecursiveBSplineType::Value)
void PrintSelf(std::ostream &os, Indent indent) const override
itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension)
void Evaluate(const ContinuousIndexType &index, WeightsType &weights, IndexType &startIndex) const override
BSplineDerivativeKernelFunction2< itkGetStaticConstMacro(SplineOrder) > DerivativeKernelType
BSplineInterpolationWeightFunction< TCoordRep, VSpaceDimension, VSplineOrder > Superclass


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo