ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkBSplineInterpolationWeightFunction.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 itkBSplineInterpolationWeightFunction_h
19 #define itkBSplineInterpolationWeightFunction_h
20 
21 #include "itkFunctionBase.h"
22 #include "itkContinuousIndex.h"
24 #include "itkArray.h"
25 #include "itkArray2D.h"
26 
27 namespace itk
28 {
46 template<
47  typename TCoordRep = float,
48  unsigned int VSpaceDimension = 2,
49  unsigned int VSplineOrder = 3
50  >
51 class ITK_TEMPLATE_EXPORT BSplineInterpolationWeightFunction:
52  public FunctionBase< ContinuousIndex< TCoordRep, VSpaceDimension >,
53  Array< double > >
54 {
55 public:
60 
63 
65  itkNewMacro(Self);
66 
69 
71  itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension);
72 
74  itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder);
75 
78 
82 
85 
88  virtual WeightsType Evaluate(const ContinuousIndexType & index) const ITK_OVERRIDE;
89 
98  virtual void Evaluate(const ContinuousIndexType & index,
99  WeightsType & weights, IndexType & startIndex) const;
100 
102  itkGetConstMacro(SupportSize, SizeType);
103 
105  itkGetConstMacro(NumberOfWeights, unsigned int);
106 
107 protected:
110  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
111 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineInterpolationWeightFunction);
114 
116  unsigned int m_NumberOfWeights;
117 
120 
123 
126 
129 
132 };
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkBSplineInterpolationWeightFunction.hxx"
137 #endif
138 
139 #endif
BSplineKernelFunction< itkGetStaticConstMacro(SplineOrder) > KernelType
ContinuousIndex< TCoordRep, VSpaceDimension > ContinuousIndexType
BSpline kernel used for density estimation and nonparameteric regression.
Base class for all ITK function objects.
A templated class holding a point in n-Dimensional image space.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
FunctionBase< ContinuousIndex< TCoordRep, VSpaceDimension >, Array< double > > Superclass
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:72