OTB  10.0.0
Orfeo Toolbox
otbComplexMomentPathFunction.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 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;
72  typedef typename Superclass::PathConstPointer PathConstPointer;
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
Calculate the complex moment value over a path.
itk::VectorContainer< unsigned, VertexType > VertexListType
itk::SmartPointer< const Self > ConstPointer
Superclass::PathConstPointer PathConstPointer
VertexListType::ConstPointer VertexListPointer
void operator=(const Self &)=delete
ComplexMomentPathFunction(const Self &)=delete
std::complex< PrecisionType > ComplexPrecisionType
GeometricMomentPathFunction< TInputPath, TOutput, TPrecision > Superclass
PathType::ContinuousIndexType VertexType
Virtual class for the Geometric moments for an path function.
Evaluates a function of an image over a specific path.
Superclass::OutputType OutputType
double PrecisionType
Definition: otbDateUtils.h:29
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.