ITK  4.6.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 >
61  public FunctionBase<typename TInputPointSet::PointType, TOutput>
62 {
63 public:
65  itkStaticConstMacro(Dimension, unsigned int,
66  TInputPointSet::PointDimension);
67 
70  typedef FunctionBase
71  <typename TInputPointSet::PointType, TOutput> Superclass;
74 
76  itkTypeMacro( PointSetFunction, FunctionBase );
77 
79  typedef TInputPointSet InputPointSetType;
80 
82  typedef typename InputPointSetType::PointType InputPointType;
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 = 0;
107 
108 protected:
110  virtual ~PointSetFunction();
111  void PrintSelf(std::ostream& os, Indent indent) const;
112 
115 
116 private:
117  PointSetFunction(const Self&); //purposely not implemented
118  void operator=(const Self&); //purposely not implemented
119 
120 };
121 
122 } // end namespace itk
123 
124 // Define instantiation macro for this template.
125 #define ITK_TEMPLATE_PointSetFunction(_, EXPORT, x, y) namespace itk { \
126  _(3(class EXPORT PointSetFunction< ITK_TEMPLATE_3 x >)) \
127  namespace Templates { typedef PointSetFunction< ITK_TEMPLATE_3 x > PointSetFunction##y; } \
128  }
129 
130 
131 #ifndef ITK_MANUAL_INSTANTIATION
132 # include "itkPointSetFunction.hxx"
133 #endif
134 
135 
136 #endif
Light weight base class for most itk classes.
InputPointSetType::ConstPointer InputPointSetConstPointer
const InputPointSetType * GetInputPointSet() const
InputPointSetType::PixelType InputPixelType
static const unsigned int Dimension
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.
virtual ~PointSetFunction()
SmartPointer< const Self > ConstPointer
InputPointSetConstPointer m_PointSet
virtual void SetInputPointSet(const InputPointSetType *ptr)
InputPointSetType::PointType InputPointType
virtual TOutput Evaluate(const InputPointType &point) const =0
void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void operator=(const Self &)