OTB  10.0.0
Orfeo Toolbox
otbOrientationPathFunction.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 otbOrientationPathFunction_h
22 #define otbOrientationPathFunction_h
23 
24 #include "otbPathFunction.h"
25 #include "itkVectorContainer.h"
26 
27 namespace otb
28 {
29 
40 template <class TInputPath, class TOutput = double>
41 class ITK_EXPORT OrientationPathFunction : public PathFunction<TInputPath, TOutput>
42 {
43 public:
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
49 
52 
54  itkNewMacro(Self);
55 
59  typedef typename PathType::ContinuousIndexType VertexType;
60  typedef itk::VectorContainer<unsigned, VertexType> VertexListType;
61  typedef typename VertexListType::ConstPointer VertexListPointer;
62  typedef TOutput OutputType;
63 
64  typedef double RealType;
65 
67  OutputType Evaluate(const PathType& path) const override;
68  virtual OutputType Evaluate() const;
70 
71 protected:
74  {
75  }
76  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
77 
78 private:
79  OrientationPathFunction(const Self&) = delete;
80  void operator=(const Self&) = delete;
81 };
82 
83 } // namespace otb
84 
85 #ifndef OTB_MANUAL_INSTANTIATION
87 #endif
88 
89 #endif
Calculate the orientation angle of a path defined by 2 points. The result value is in radian.
VertexListType::ConstPointer VertexListPointer
itk::VectorContainer< unsigned, VertexType > VertexListType
Superclass::InputPathConstPointer PathConstPointer
OrientationPathFunction(const Self &)=delete
PathFunction< TInputPath, TOutput > Superclass
PathType::ContinuousIndexType VertexType
itk::SmartPointer< const Self > ConstPointer
void operator=(const Self &)=delete
Superclass::InputPathType PathType
Evaluates a function of an image over a specific path.
Superclass::InputType InputPathType
InputPathType::ConstPointer InputPathConstPointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.