ITK  5.0.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:
56  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineInterpolationWeightFunction);
57 
62 
65 
67  itkNewMacro(Self);
68 
71 
73  static constexpr unsigned int SpaceDimension = VSpaceDimension;
74 
76  static constexpr unsigned int SplineOrder = VSplineOrder;
77 
80 
84 
87 
90  WeightsType Evaluate(const ContinuousIndexType & index) const override;
91 
100  virtual void Evaluate(const ContinuousIndexType & index,
101  WeightsType & weights, IndexType & startIndex) const;
102 
104  itkGetConstMacro(SupportSize, SizeType);
105 
107  itkGetConstMacro(NumberOfWeights, unsigned int);
108 
109 protected:
111  ~BSplineInterpolationWeightFunction() override = default;
112  void PrintSelf(std::ostream & os, Indent indent) const override;
113 
114 private:
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
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:66
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
Returns the weights over the support region used for B-spline interpolation/reconstruction.