OTB  9.0.0
Orfeo Toolbox
otbVectorDataToRightAngleVectorDataFilter.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 otbVectorDataToRightAngleVectorDataFilter_h
22 #define otbVectorDataToRightAngleVectorDataFilter_h
23 
24 
26 #include "itkPreOrderTreeIterator.h"
27 #include "otbMath.h"
28 
29 namespace otb
30 {
31 
47 template <class TVectorData>
48 class ITK_EXPORT VectorDataToRightAngleVectorDataFilter : public otb::VectorDataToVectorDataFilter<TVectorData, TVectorData>
49 {
50 public:
54  typedef itk::SmartPointer<Self> Pointer;
55  typedef itk::SmartPointer<const Self> ConstPointer;
56 
58  itkNewMacro(Self);
59 
62 
64  typedef itk::ProcessObject ProcessObjectType;
65 
67  typedef TVectorData VectorDataType;
68  typedef typename VectorDataType::DataNodeType DataNodeType;
69  typedef typename VectorDataType::LineType LineType;
70  typedef typename VectorDataType::PointType PointType;
71  typedef typename LineType::VertexType VertexType;
72  typedef typename LineType::VertexListType VertexListType;
73 
74  typedef itk::PreOrderTreeIterator<typename VectorDataType::DataTreeType> TreeIteratorType;
75 
77  itkGetMacro(DistanceThreshold, double);
78  itkSetMacro(DistanceThreshold, double);
80 
81  itkGetMacro(AngleThreshold, double);
82  itkSetMacro(AngleThreshold, double);
83 
84 protected:
87 
90  {
91  }
92 
94  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
95 
97  void GenerateData() override;
98 
100  virtual double ComputeAngleFormedBySegments(LineType* lineDst, LineType* lineSrc);
101 
103  virtual PointType ComputeRightAngleCoordinate(LineType* lineDst, LineType* lineSrc);
104 
106  virtual double ComputeOrientation(LineType* line);
107 
109  virtual double ComputeDistanceFromPointToSegment(PointType rAngle, LineType* line);
110 
111 private:
112  VectorDataToRightAngleVectorDataFilter(const Self&) = delete;
113  void operator=(const Self&) = delete;
114 
117 };
118 }
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
otb::VectorDataToRightAngleVectorDataFilter::VectorDataType
TVectorData VectorDataType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:67
otb::VectorDataToRightAngleVectorDataFilter::VertexType
LineType::VertexType VertexType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:71
otb::VectorDataToRightAngleVectorDataFilter::LineType
VectorDataType::LineType LineType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:69
otbVectorDataToVectorDataFilter.h
otb::VectorDataToRightAngleVectorDataFilter
Right angle detector.
Definition: otbVectorDataToRightAngleVectorDataFilter.h:48
otb::VectorDataToRightAngleVectorDataFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataToRightAngleVectorDataFilter.h:54
otbMath.h
otb::VectorDataToRightAngleVectorDataFilter::~VectorDataToRightAngleVectorDataFilter
~VectorDataToRightAngleVectorDataFilter() override
Definition: otbVectorDataToRightAngleVectorDataFilter.h:89
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbVectorDataToRightAngleVectorDataFilter.hxx
otb::VectorDataToRightAngleVectorDataFilter::PointType
VectorDataType::PointType PointType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:70
otb::VectorDataToRightAngleVectorDataFilter::m_DistanceThreshold
double m_DistanceThreshold
Definition: otbVectorDataToRightAngleVectorDataFilter.h:115
otb::VectorDataToVectorDataFilter
Base class for filters that take an VectorData as input and produce an VectorData as output.
Definition: otbVectorDataToVectorDataFilter.h:43
otb::VectorDataToRightAngleVectorDataFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbVectorDataToRightAngleVectorDataFilter.h:55
otb::VectorDataToRightAngleVectorDataFilter::Self
VectorDataToRightAngleVectorDataFilter Self
Definition: otbVectorDataToRightAngleVectorDataFilter.h:52
otb::VectorDataToRightAngleVectorDataFilter::VertexListType
LineType::VertexListType VertexListType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:72
otb::VectorDataToRightAngleVectorDataFilter::Superclass
VectorDataToVectorDataFilter< TVectorData, TVectorData > Superclass
Definition: otbVectorDataToRightAngleVectorDataFilter.h:53
otb::VectorDataToRightAngleVectorDataFilter::DataNodeType
VectorDataType::DataNodeType DataNodeType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:68
otb::VectorDataToRightAngleVectorDataFilter::ProcessObjectType
itk::ProcessObject ProcessObjectType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:61
otb::VectorDataToRightAngleVectorDataFilter::TreeIteratorType
itk::PreOrderTreeIterator< typename VectorDataType::DataTreeType > TreeIteratorType
Definition: otbVectorDataToRightAngleVectorDataFilter.h:74
otb::VectorDataToRightAngleVectorDataFilter::m_AngleThreshold
double m_AngleThreshold
Definition: otbVectorDataToRightAngleVectorDataFilter.h:116