ITK  4.2.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  class 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;
89 
98  virtual void Evaluate(const ContinuousIndexType & index,
99  WeightsType & weights, IndexType & startIndex) const;
100 
102  itkGetConstMacro(SupportSize, SizeType);
103 
105  itkGetConstMacro(NumberOfWeights, unsigned long);
106 protected:
109  void PrintSelf(std::ostream & os, Indent indent) const;
111 
112 private:
113  BSplineInterpolationWeightFunction(const Self &); //purposely not implemented
114  void operator=(const Self &); //purposely not implemented
115 
117  unsigned long m_NumberOfWeights;
118 
121 
124 
127 
130 
133 };
134 } // end namespace itk
135 
136 // Define instantiation macro for this template.
137 #define ITK_TEMPLATE_BSplineInterpolationWeightFunction(_, EXPORT, TypeX, TypeY) \
138  namespace itk \
139  { \
140  _( 3 ( class EXPORT BSplineInterpolationWeightFunction< ITK_TEMPLATE_3 TypeX > ) ) \
141  namespace Templates \
142  { \
143  typedef BSplineInterpolationWeightFunction< ITK_TEMPLATE_3 TypeX > BSplineInterpolationWeightFunction##TypeY; \
144  } \
145  }
146 
147 #if ITK_TEMPLATE_EXPLICIT
148 //template < class TCoordRep, unsigned int VSpaceDimension, unsigned int
149 // VSplineOrder>
150 // const unsigned int itk::BSplineInterpolationWeightFunction< TCoordRep,
151 // VSpaceDimension, VSplineOrder >::SplineOrder;
152 #include "Templates/itkBSplineInterpolationWeightFunction+-.h"
153 #endif
154 
155 #if ITK_TEMPLATE_TXX
156 #include "itkBSplineInterpolationWeightFunction.hxx"
157 #endif
158 
159 #endif
160