ITK  4.8.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  >
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  BSplineInterpolationWeightFunction(const Self &); //purposely not implemented
114  void operator=(const Self &); //purposely not implemented
115 
117  unsigned int m_NumberOfWeights;
118 
121 
124 
127 
130 
133 };
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkBSplineInterpolationWeightFunction.hxx"
138 #endif
139 
140 #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.
virtual WeightsType Evaluate(const ContinuousIndexType &index) const override
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:71
void PrintSelf(std::ostream &os, Indent indent) const override