OTB  9.0.0
Orfeo Toolbox
otbHuPathFunction.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 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
otb::RealMomentPathFunction::PathConstPointer
Superclass::PathConstPointer PathConstPointer
Definition: otbRealMomentPathFunction.h:54
otb::HuPathFunction::PathConstPointer
Superclass::PathConstPointer PathConstPointer
Definition: otbHuPathFunction.h:79
otbRealMomentPathFunction.h
otb::HuPathFunction::~HuPathFunction
~HuPathFunction() override
Definition: otbHuPathFunction.h:102
otb::HuPathFunction::Self
HuPathFunction Self
Definition: otbHuPathFunction.h:66
otb::HuPathFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbHuPathFunction.h:68
otb::HuPathFunction::PathType
Superclass::PathType PathType
Definition: otbHuPathFunction.h:75
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::HuPathFunction
Calculate the Hu's invariant parameter.
Definition: otbHuPathFunction.h:62
otb::HuPathFunction::VertexListType
itk::VectorContainer< unsigned, VertexType > VertexListType
Definition: otbHuPathFunction.h:81
otbHuPathFunction.hxx
otb::HuPathFunction::VertexListPointer
VertexListType::ConstPointer VertexListPointer
Definition: otbHuPathFunction.h:82
otb::HuPathFunction::m_MomentNumber
short m_MomentNumber
Definition: otbHuPathFunction.h:111
otb::RealMomentPathFunction::RealType
Superclass::OutputType RealType
Definition: otbRealMomentPathFunction.h:63
otb::RealMomentPathFunction
Virtual class for the Real moments for a path.
Definition: otbRealMomentPathFunction.h:40
otb::HuPathFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbHuPathFunction.h:69
otb::HuPathFunction::Superclass
RealMomentPathFunction< TInputPath, TOutput, TPrecision > Superclass
Definition: otbHuPathFunction.h:67
otb::RealMomentPathFunction::PathType
Superclass::PathType PathType
Definition: otbRealMomentPathFunction.h:50
otb::HuPathFunction::RealType
Superclass::RealType RealType
Definition: otbHuPathFunction.h:85
otb::HuPathFunction::VertexType
PathType::ContinuousIndexType VertexType
Definition: otbHuPathFunction.h:80
otb::RealMomentPathFunction::PrecisionType
Superclass::PrecisionType PrecisionType
Definition: otbRealMomentPathFunction.h:60
otb::HuPathFunction::PrecisionType
Superclass::PrecisionType PrecisionType
Definition: otbHuPathFunction.h:88