ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkPointSetFunction.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 itkPointSetFunction_h
19 #define itkPointSetFunction_h
20 
21 #include "itkFunctionBase.h"
22 #include "itkPoint.h"
23 
24 namespace itk
25 {
26 
27 
55 template <
56 typename TInputPointSet,
57 typename TOutput,
58 typename TCoordRep = float
59 >
60 class ITK_TEMPLATE_EXPORT PointSetFunction :
61  public FunctionBase<typename TInputPointSet::PointType, TOutput>
62 {
63 public:
65  itkStaticConstMacro(Dimension, unsigned int,
66  TInputPointSet::PointDimension);
67 
70  typedef FunctionBase
74 
76  itkTypeMacro( PointSetFunction, FunctionBase );
77 
79  typedef TInputPointSet InputPointSetType;
80 
83  typedef typename InputPointSetType::PixelType InputPixelType;
84 
86  typedef typename InputPointSetType::ConstPointer InputPointSetConstPointer;
87 
89  typedef TOutput OutputType;
90 
92  typedef TCoordRep CoordRepType;
93 
98  virtual void SetInputPointSet( const InputPointSetType * ptr );
99 
102  { return m_PointSet.GetPointer(); }
103 
106  virtual TOutput Evaluate( const InputPointType& point ) const ITK_OVERRIDE = 0;
107 
108 protected:
110  virtual ~PointSetFunction() ITK_OVERRIDE;
111  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
112 
115 
116 private:
117  ITK_DISALLOW_COPY_AND_ASSIGN(PointSetFunction);
118 
119 };
120 
121 } // end namespace itk
122 
123 // Define instantiation macro for this template.
124 #define ITK_TEMPLATE_PointSetFunction(_, EXPORT, x, y) namespace itk { \
125  _(3(class EXPORT PointSetFunction< ITK_TEMPLATE_3 x >)) \
126  namespace Templates { typedef PointSetFunction< ITK_TEMPLATE_3 x > PointSetFunction##y; } \
127  }
128 
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 # include "itkPointSetFunction.hxx"
132 #endif
133 
134 
135 #endif
InputPointSetType::ConstPointer InputPointSetConstPointer
const InputPointSetType * GetInputPointSet() const
InputPointSetType::PixelType InputPixelType
SmartPointer< Self > Pointer
TInputPointSet InputPointSetType
FunctionBase< typename TInputPointSet::PointType, TOutput > Superclass
Base class for all ITK function objects.
Evaluates a function of an image at specified position.
SmartPointer< const Self > ConstPointer
InputPointSetType::PointType InputPointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49