OTB  9.0.0
Orfeo Toolbox
otbOrientationPathFunction.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 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 
57  typedef typename Superclass::InputPathType PathType;
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
otb::OrientationPathFunction::PathConstPointer
Superclass::InputPathConstPointer PathConstPointer
Definition: otbOrientationPathFunction.h:58
otb::OrientationPathFunction::Superclass
PathFunction< TInputPath, TOutput > Superclass
Definition: otbOrientationPathFunction.h:46
otb::OrientationPathFunction
Calculate the orientation angle of a path defined by 2 points. The result value is in radian.
Definition: otbOrientationPathFunction.h:41
otb::OrientationPathFunction::OrientationPathFunction
OrientationPathFunction()
Definition: otbOrientationPathFunction.h:72
otb::PathFunction
Evaluates a function of an image over a specific path.
Definition: otbPathFunction.h:48
otbOrientationPathFunction.hxx
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::OrientationPathFunction::PathType
Superclass::InputPathType PathType
Definition: otbOrientationPathFunction.h:54
otb::OrientationPathFunction::VertexListType
itk::VectorContainer< unsigned, VertexType > VertexListType
Definition: otbOrientationPathFunction.h:60
otb::OrientationPathFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbOrientationPathFunction.h:47
otb::PathFunction::InputPathConstPointer
InputPathType::ConstPointer InputPathConstPointer
Definition: otbPathFunction.h:64
otb::OrientationPathFunction::~OrientationPathFunction
~OrientationPathFunction() override
Definition: otbOrientationPathFunction.h:73
otb::PathFunction::InputPathType
Superclass::InputType InputPathType
Definition: otbPathFunction.h:58
otb::OrientationPathFunction::OutputType
TOutput OutputType
Definition: otbOrientationPathFunction.h:62
otb::OrientationPathFunction::VertexType
PathType::ContinuousIndexType VertexType
Definition: otbOrientationPathFunction.h:59
otb::OrientationPathFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbOrientationPathFunction.h:48
otb::OrientationPathFunction::Self
OrientationPathFunction Self
Definition: otbOrientationPathFunction.h:45
otb::OrientationPathFunction::VertexListPointer
VertexListType::ConstPointer VertexListPointer
Definition: otbOrientationPathFunction.h:61
otbPathFunction.h
otb::OrientationPathFunction::RealType
double RealType
Definition: otbOrientationPathFunction.h:64