OTB  10.0.0
Orfeo Toolbox
otbHuPathFunction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 otbHuPathFunction_h
22 #define otbHuPathFunction_h
23 
25 
26 namespace otb
27 {
28 
60 
61 template <class TInputPath, class TOutput = double, class TPrecision = double>
62 class ITK_EXPORT HuPathFunction : public RealMomentPathFunction<TInputPath, TOutput, TPrecision>
63 {
64 public:
68  typedef itk::SmartPointer<Self> Pointer;
69  typedef itk::SmartPointer<const Self> ConstPointer;
70 
73 
75  itkNewMacro(Self);
76 
78  typedef typename Superclass::PathType PathType;
80  typedef typename PathType::ContinuousIndexType VertexType;
81  typedef itk::VectorContainer<unsigned, VertexType> VertexListType;
82  typedef typename VertexListType::ConstPointer VertexListPointer;
83 
85  typedef typename Superclass::RealType RealType;
86 
89 
91  RealType Evaluate(const PathType& path) const override;
92  virtual RealType Evaluate() const;
93 
96  itkSetMacro(MomentNumber, short);
97  itkGetConstReferenceMacro(MomentNumber, short);
99 
100 protected:
101  HuPathFunction();
102  ~HuPathFunction() override
103  {
104  }
105  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
106 
107 private:
108  HuPathFunction(const Self&) = delete;
109  void operator=(const Self&) = delete;
110 
112 };
113 
114 } // namespace otb
115 
116 #ifndef OTB_MANUAL_INSTANTIATION
117 #include "otbHuPathFunction.hxx"
118 #endif
119 
120 #endif
Calculate the Hu's invariant parameter.
Superclass::PrecisionType PrecisionType
HuPathFunction(const Self &)=delete
Superclass::PathConstPointer PathConstPointer
void operator=(const Self &)=delete
RealMomentPathFunction< TInputPath, TOutput, TPrecision > Superclass
PathType::ContinuousIndexType VertexType
itk::SmartPointer< Self > Pointer
VertexListType::ConstPointer VertexListPointer
itk::VectorContainer< unsigned, VertexType > VertexListType
itk::SmartPointer< const Self > ConstPointer
Superclass::RealType RealType
Superclass::PathType PathType
Virtual class for the Real moments for a path.
Superclass::PathConstPointer PathConstPointer
Superclass::PrecisionType PrecisionType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.