OTB  9.0.0
Orfeo Toolbox
otbComplexMomentPathFunction.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 otbComplexMomentPathFunction_h
22 #define otbComplexMomentPathFunction_h
23 
25 #include "itkVectorContainer.h"
26 
27 namespace otb
28 {
29 
53 template <class TInputPath, class TOutput = std::complex<double>, class TPrecision = double>
54 class ITK_EXPORT ComplexMomentPathFunction : public GeometricMomentPathFunction<TInputPath, TOutput, TPrecision>
55 {
56 public:
57 
61  typedef itk::SmartPointer<Self> Pointer;
62  typedef itk::SmartPointer<const Self> ConstPointer;
63 
66 
68  itkNewMacro(Self);
69 
71  typedef typename Superclass::PathType PathType;
73  typedef typename PathType::ContinuousIndexType VertexType;
74  typedef itk::VectorContainer<unsigned, VertexType> VertexListType;
75  typedef typename VertexListType::ConstPointer VertexListPointer;
76 
79 
81 
82  typedef double RealType;
83 
86 
88  typedef std::complex<PrecisionType> ComplexPrecisionType;
89 
91  OutputType Evaluate(const PathType& path) const override;
92  virtual OutputType Evaluate() const;
94 
95  itkSetMacro(P, unsigned int);
96  itkGetConstReferenceMacro(P, unsigned int);
97  itkSetMacro(Q, unsigned int);
98  itkGetConstReferenceMacro(Q, unsigned int);
99 
100 protected:
103  {
104  }
105  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
106 
107 private:
108  ComplexMomentPathFunction(const Self&) = delete;
109  void operator=(const Self&) = delete;
110  ComplexPrecisionType EvaluateComplexMomentAtIndex(VertexType index) const;
111 
112  unsigned int m_P;
113  unsigned int m_Q;
114 };
115 
116 } // namespace otb
117 
118 #ifndef OTB_MANUAL_INSTANTIATION
120 #endif
121 
122 #endif
otb::ComplexMomentPathFunction::PrecisionType
Superclass::PrecisionType PrecisionType
Definition: otbComplexMomentPathFunction.h:85
otb::ComplexMomentPathFunction::m_P
unsigned int m_P
Definition: otbComplexMomentPathFunction.h:112
otb::GeometricMomentPathFunction::OutputType
Superclass::OutputType OutputType
Definition: otbGeometricMomentPathFunction.h:56
otb::ComplexMomentPathFunction::VertexListPointer
VertexListType::ConstPointer VertexListPointer
Definition: otbComplexMomentPathFunction.h:75
otb::ComplexMomentPathFunction::ComplexType
Superclass::OutputType ComplexType
Definition: otbComplexMomentPathFunction.h:78
otb::ComplexMomentPathFunction::PathConstPointer
Superclass::PathConstPointer PathConstPointer
Definition: otbComplexMomentPathFunction.h:72
otb::ComplexMomentPathFunction::Self
ComplexMomentPathFunction Self
Definition: otbComplexMomentPathFunction.h:59
otb::ComplexMomentPathFunction::OutputType
Superclass::OutputType OutputType
Definition: otbComplexMomentPathFunction.h:80
otb::ComplexMomentPathFunction::ComplexPrecisionType
std::complex< PrecisionType > ComplexPrecisionType
Definition: otbComplexMomentPathFunction.h:88
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::GeometricMomentPathFunction::PathType
Superclass::InputPathType PathType
Definition: otbGeometricMomentPathFunction.h:49
otb::ComplexMomentPathFunction::Superclass
GeometricMomentPathFunction< TInputPath, TOutput, TPrecision > Superclass
Definition: otbComplexMomentPathFunction.h:60
otbComplexMomentPathFunction.hxx
otb::ComplexMomentPathFunction::VertexListType
itk::VectorContainer< unsigned, VertexType > VertexListType
Definition: otbComplexMomentPathFunction.h:74
otb::GeometricMomentPathFunction::PrecisionType
TPrecision PrecisionType
Definition: otbGeometricMomentPathFunction.h:59
otb::ComplexMomentPathFunction
Calculate the complex moment value over a path.
Definition: otbComplexMomentPathFunction.h:54
otb::ComplexMomentPathFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbComplexMomentPathFunction.h:61
otb::GeometricMomentPathFunction
Virtual class for the Geometric moments for an path function.
Definition: otbGeometricMomentPathFunction.h:39
otb::ComplexMomentPathFunction::VertexType
PathType::ContinuousIndexType VertexType
Definition: otbComplexMomentPathFunction.h:73
otbGeometricMomentPathFunction.h
otb::GeometricMomentPathFunction::PathConstPointer
Superclass::InputPathConstPointer PathConstPointer
Definition: otbGeometricMomentPathFunction.h:53
otb::ComplexMomentPathFunction::RealType
double RealType
Definition: otbComplexMomentPathFunction.h:82
otb::ComplexMomentPathFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbComplexMomentPathFunction.h:62
otb::ComplexMomentPathFunction::m_Q
unsigned int m_Q
Definition: otbComplexMomentPathFunction.h:113
otb::ComplexMomentPathFunction::PathType
Superclass::PathType PathType
Definition: otbComplexMomentPathFunction.h:68
otb::ComplexMomentPathFunction::~ComplexMomentPathFunction
~ComplexMomentPathFunction() override
Definition: otbComplexMomentPathFunction.h:102