ITK  6.0.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 TCoordinate = 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 
71  itkOverrideGetNameOfClassMacro(PointSetFunction);
72 
74  using InputPointSetType = TInputPointSet;
75 
78  using InputPixelType = typename InputPointSetType::PixelType;
79 
82 
84  using OutputType = TOutput;
85 
87  using CoordinateType = TCoordinate;
88 #ifndef ITK_FUTURE_LEGACY_REMOVE
89  using CoordRepType ITK_FUTURE_DEPRECATED(
90  "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") = CoordinateType;
91 #endif
92 
97  virtual void
98  SetInputPointSet(const InputPointSetType * ptr);
99 
101  const InputPointSetType *
103  {
104  return m_PointSet.GetPointer();
105  }
106 
109  TOutput
110  Evaluate(const InputPointType & point) const override = 0;
111 
112 protected:
114  ~PointSetFunction() override = default;
115  void
116  PrintSelf(std::ostream & os, Indent indent) const override;
117 
120 };
121 
122 } // end namespace itk
123 
124 // Define instantiation macro for this template.
125 #define ITK_TEMPLATE_PointSetFunction(_, EXPORT, x, y) \
126  namespace itk \
127  { \
128  _(3(class EXPORT PointSetFunction<ITK_TEMPLATE_3 x>)) \
129  namespace Templates \
130  { \
131  using PointSetFunction##y = PointSetFunction<ITK_TEMPLATE_3 x>; \
132  } \
133  }
134 
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 # include "itkPointSetFunction.hxx"
138 #endif
139 
140 
141 #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, TCoordinate >::InputPixelType
typename InputPointSetType::PixelType InputPixelType
Definition: itkPointSetFunction.h:78
itk::PointSetFunction::GetInputPointSet
const InputPointSetType * GetInputPointSet() const
Definition: itkPointSetFunction.h:102
itkFunctionBase.h
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
itk::PointSetFunction< TPointSet, TOutput, TCoordinate >::InputPointType
typename InputPointSetType::PointType InputPointType
Definition: itkPointSetFunction.h:77
itk::FunctionBase
Base class for all ITK function objects.
Definition: itkFunctionBase.h:44
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::PointSetFunction< TPointSet, TOutput, TCoordinate >::InputPointSetConstPointer
typename InputPointSetType::ConstPointer InputPointSetConstPointer
Definition: itkPointSetFunction.h:81
itk::PointSetFunction< TPointSet, TOutput, TCoordinate >::CoordinateType
TCoordinate CoordinateType
Definition: itkPointSetFunction.h:87
itk::PointSetFunction< TPointSet, TOutput, TCoordinate >::InputPointSetType
TPointSet InputPointSetType
Definition: itkPointSetFunction.h:74
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44