ITK  5.4.0
Insight Toolkit
itkPointSetFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 <typename TInputPointSet, typename TOutput, typename TCoordRep = float>
56 class ITK_TEMPLATE_EXPORT PointSetFunction : public FunctionBase<typename TInputPointSet::PointType, TOutput>
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_MOVE(PointSetFunction);
60 
62  static constexpr unsigned int Dimension = TInputPointSet::PointDimension;
63 
69 
72 
74  using InputPointSetType = TInputPointSet;
75 
78  using InputPixelType = typename InputPointSetType::PixelType;
79 
82 
84  using OutputType = TOutput;
85 
87  using CoordRepType = TCoordRep;
88 
93  virtual void
94  SetInputPointSet(const InputPointSetType * ptr);
95 
97  const InputPointSetType *
99  {
100  return m_PointSet.GetPointer();
101  }
102 
105  TOutput
106  Evaluate(const InputPointType & point) const override = 0;
107 
108 protected:
110  ~PointSetFunction() override = default;
111  void
112  PrintSelf(std::ostream & os, Indent indent) const override;
113 
116 };
117 
118 } // end namespace itk
119 
120 // Define instantiation macro for this template.
121 #define ITK_TEMPLATE_PointSetFunction(_, EXPORT, x, y) \
122  namespace itk \
123  { \
124  _(3(class EXPORT PointSetFunction<ITK_TEMPLATE_3 x>)) \
125  namespace Templates \
126  { \
127  using PointSetFunction##y = PointSetFunction<ITK_TEMPLATE_3 x>; \
128  } \
129  }
130 
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 # include "itkPointSetFunction.hxx"
134 #endif
135 
136 
137 #endif
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itkPoint.h
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FunctionBase< TPointSet ::PointType, TOutput >::OutputType
TOutput OutputType
Definition: itkFunctionBase.h:62
itk::PointSetFunction< TPointSet, TOutput, TCoordRep >::CoordRepType
TCoordRep CoordRepType
Definition: itkPointSetFunction.h:87
itkFunctionBase.h
itk::PointSetFunction< TPointSet, TOutput, TCoordRep >::InputPixelType
typename InputPointSetType::PixelType InputPixelType
Definition: itkPointSetFunction.h:78
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::point
*par Constraints *The filter requires an image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
itk::PointSetFunction
Evaluates a function of an image at specified position.
Definition: itkPointSetFunction.h:56
itkOverrideGetNameOfClassMacro
itkOverrideGetNameOfClassMacro(AddImageFilter)
itk::FunctionBase
Base class for all ITK function objects.
Definition: itkFunctionBase.h:44
itk::PointSetFunction< TPointSet, TOutput, TCoordRep >::InputPointSetType
TPointSet InputPointSetType
Definition: itkPointSetFunction.h:74
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::PointSetFunction< TPointSet, TOutput, TCoordRep >::InputPointSetConstPointer
typename InputPointSetType::ConstPointer InputPointSetConstPointer
Definition: itkPointSetFunction.h:81
itk::PointSetFunction< TPointSet, TOutput, TCoordRep >::InputPointType
typename InputPointSetType::PointType InputPointType
Definition: itkPointSetFunction.h:77
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::PointSetFunction::GetInputPointSet
const InputPointSetType * GetInputPointSet() const
Definition: itkPointSetFunction.h:98