OTB  9.0.0
Orfeo Toolbox
otbPointSetFunction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbPointSetFunction_h
22 #define otbPointSetFunction_h
23 
24 #include "itkSpatialFunction.h"
25 #include "itkProcessObject.h"
26 
27 namespace otb
28 {
29 
38 template <class TPointSet, class TOutput>
39 class ITK_EXPORT PointSetFunction : public itk::SpatialFunction<TOutput, 2 /* TODO : change 2 by PointType::PointDimension*/, typename TPointSet::PointType>
40 {
41 public:
42 
45  typedef itk::SpatialFunction<TOutput, 2, typename TPointSet::PointType> Superclass;
46 
48  itkTypeMacro(PointSetFunction, itk::SpatialFunction);
49 
51  typedef TPointSet PointSetType;
52  typedef typename PointSetType::ConstPointer PointSetPointerType;
53 
55  typedef TOutput OutputType;
56 
58  itkGetConstObjectMacro(PointSet, PointSetType);
59 
60  void SetPointSet(PointSetType* PointSet)
61  {
62  m_PointSet = PointSet;
63  }
64 
67  {
68  m_PointSet = PointSet;
69  }
70 
71 protected:
73  ~PointSetFunction() override
74  {
75  }
76 
77  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
78 
79 private:
80  PointSetFunction(const Self&) = delete;
81  void operator=(const Self&) = delete;
82 
84 };
85 
86 } // end namespace otb
87 
88 #ifndef OTB_MANUAL_INSTANTIATION
89 #include "otbPointSetFunction.hxx"
90 #endif
91 
92 #endif
otb::PointSetFunction::SetPointSet
void SetPointSet(PointSetPointerType PointSet)
Definition: otbPointSetFunction.h:66
otb::PointSetFunction::PointSetType
TPointSet PointSetType
Definition: otbPointSetFunction.h:48
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::PointSetFunction::~PointSetFunction
~PointSetFunction() override
Definition: otbPointSetFunction.h:73
otb::PointSetFunction::m_PointSet
PointSetPointerType m_PointSet
Definition: otbPointSetFunction.h:83
otb::PointSetFunction::OutputType
TOutput OutputType
Definition: otbPointSetFunction.h:55
otbPointSetFunction.hxx
otb::PointSetFunction::Superclass
itk::SpatialFunction< TOutput, 2, typename TPointSet::PointType > Superclass
Definition: otbPointSetFunction.h:45
otb::PointSetFunction::Self
PointSetFunction Self
Definition: otbPointSetFunction.h:44
otb::PointSetFunction::PointSetPointerType
PointSetType::ConstPointer PointSetPointerType
Definition: otbPointSetFunction.h:52
otb::PointSetFunction
Calculate the density in the neighborhood of a pixel.
Definition: otbPointSetFunction.h:39
otb::PointSetFunction::SetPointSet
void SetPointSet(PointSetType *PointSet)
Definition: otbPointSetFunction.h:60