OTB  10.0.0
Orfeo Toolbox
otbVectorDataToRightAngleVectorDataFilter.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 otbVectorDataToRightAngleVectorDataFilter_h
22 #define otbVectorDataToRightAngleVectorDataFilter_h
23 
24 
26 #include "otbMath.h"
27 
28 namespace otb
29 {
30 
46 template <class TVectorData>
47 class ITK_EXPORT VectorDataToRightAngleVectorDataFilter : public otb::VectorDataToVectorDataFilter<TVectorData, TVectorData>
48 {
49 public:
53  typedef itk::SmartPointer<Self> Pointer;
54  typedef itk::SmartPointer<const Self> ConstPointer;
55 
57  itkNewMacro(Self);
58 
61 
63  typedef itk::ProcessObject ProcessObjectType;
64 
66  typedef TVectorData VectorDataType;
67  typedef typename VectorDataType::DataNodeType DataNodeType;
68  typedef typename VectorDataType::LineType LineType;
69  typedef typename VectorDataType::PointType PointType;
70  typedef typename LineType::VertexType VertexType;
71  typedef typename LineType::VertexListType VertexListType;
72 
74  itkGetMacro(DistanceThreshold, double);
75  itkSetMacro(DistanceThreshold, double);
77 
78  itkGetMacro(AngleThreshold, double);
79  itkSetMacro(AngleThreshold, double);
80 
81 protected:
84 
87  {
88  }
89 
91  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
92 
94  void GenerateData() override;
95 
97  virtual double ComputeAngleFormedBySegments(LineType* lineDst, LineType* lineSrc);
98 
100  virtual PointType ComputeRightAngleCoordinate(LineType* lineDst, LineType* lineSrc);
101 
103  virtual double ComputeOrientation(LineType* line);
104 
106  virtual double ComputeDistanceFromPointToSegment(PointType rAngle, LineType* line);
107 
108 private:
110  void operator=(const Self&) = delete;
111 
114 };
115 }
116 #ifndef OTB_MANUAL_INSTANTIATION
118 #endif
119 
120 #endif
VectorDataToVectorDataFilter< TVectorData, TVectorData > Superclass
VectorDataToRightAngleVectorDataFilter(const Self &)=delete
Base class for filters that take an VectorData as input and produce an VectorData as output.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.