OTB  9.0.0
Orfeo Toolbox
otbVectorDataAdapter.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 otbVectorDataAdapter_h
22 #define otbVectorDataAdapter_h
23 
25 
26 namespace otb
27 {
28 
36 template <class TInputVectorData, class TOutputVectorData>
37 class ITK_EXPORT VectorDataAdapter : public otb::VectorDataToVectorDataFilter<TInputVectorData, TOutputVectorData>
38 {
39 
40 public:
44  typedef itk::SmartPointer<Self> Pointer;
45  typedef itk::SmartPointer<const Self> ConstPointer;
46 
48  itkNewMacro(Self);
49 
52 
53  typedef TInputVectorData InputVectorDataType;
54  typedef TOutputVectorData OutputVectorDataType;
55 
56  typedef typename OutputVectorDataType::DataNodeType OutputDataNodeType;
57  typedef typename InputVectorDataType::DataNodeType InputDataNodeType;
58 
59  typedef typename InputDataNodeType::PointType InputPointType;
60  typedef typename InputDataNodeType::LineType InputLineType;
61  typedef typename InputDataNodeType::PolygonType InputPolygonType;
62  typedef typename InputDataNodeType::PolygonListType InputPolygonListType;
63 
64  typedef typename InputLineType::Pointer InputLinePointerType;
65  typedef typename InputPolygonType::Pointer InputPolygonPointerType;
66  typedef typename InputPolygonListType::Pointer InputPolygonListPointerType;
67 
68  typedef typename OutputDataNodeType::PointType OutputPointType;
69  typedef typename OutputDataNodeType::LineType OutputLineType;
70  typedef typename OutputDataNodeType::PolygonType OutputPolygonType;
71  typedef typename OutputDataNodeType::PolygonListType OutputPolygonListType;
72 
73  typedef typename OutputLineType::Pointer OutputLinePointerType;
74  typedef typename OutputPolygonType::Pointer OutputPolygonPointerType;
75  typedef typename OutputPolygonListType::Pointer OutputPolygonListPointerType;
76 
77 
78 protected:
80  ~VectorDataAdapter() override
81  {
82  }
83 
84  OutputPointType ProcessPoint(InputPointType point) const override;
85  OutputLinePointerType ProcessLine(InputLinePointerType line) const override;
86  OutputPolygonPointerType ProcessPolygon(InputPolygonPointerType polygon) const override;
87  OutputPolygonListPointerType ProcessPolygonList(InputPolygonListPointerType polygonList) const override;
88 
89 private:
90  VectorDataAdapter(const Self&) = delete;
91  void operator=(const Self&) = delete;
92 };
93 
94 } // end namespace otb
95 
96 #ifndef OTB_MANUAL_INSTANTIATION
97 #include "otbVectorDataAdapter.hxx"
98 #endif
99 
100 #endif
otb::VectorDataAdapter::OutputPolygonPointerType
OutputPolygonType::Pointer OutputPolygonPointerType
Definition: otbVectorDataAdapter.h:74
otb::VectorDataAdapter::InputLineType
InputDataNodeType::LineType InputLineType
Definition: otbVectorDataAdapter.h:60
otb::VectorDataAdapter::OutputPolygonListType
OutputDataNodeType::PolygonListType OutputPolygonListType
Definition: otbVectorDataAdapter.h:71
otb::VectorDataAdapter::InputPolygonType
InputDataNodeType::PolygonType InputPolygonType
Definition: otbVectorDataAdapter.h:61
otb::VectorDataAdapter::InputPointType
InputDataNodeType::PointType InputPointType
Definition: otbVectorDataAdapter.h:59
otb::VectorDataAdapter::InputDataNodeType
InputVectorDataType::DataNodeType InputDataNodeType
Definition: otbVectorDataAdapter.h:57
otbVectorDataAdapter.hxx
otbVectorDataToVectorDataFilter.h
otb::VectorDataAdapter::OutputDataNodeType
OutputVectorDataType::DataNodeType OutputDataNodeType
Definition: otbVectorDataAdapter.h:56
otb::VectorDataAdapter::Superclass
otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData > Superclass
Definition: otbVectorDataAdapter.h:43
otb::VectorDataAdapter::InputPolygonListType
InputDataNodeType::PolygonListType InputPolygonListType
Definition: otbVectorDataAdapter.h:62
otb::VectorDataAdapter::OutputLinePointerType
OutputLineType::Pointer OutputLinePointerType
Definition: otbVectorDataAdapter.h:73
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::VectorDataAdapter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataAdapter.h:44
otb::VectorDataAdapter::~VectorDataAdapter
~VectorDataAdapter() override
Definition: otbVectorDataAdapter.h:80
otb::VectorDataToVectorDataFilter
Base class for filters that take an VectorData as input and produce an VectorData as output.
Definition: otbVectorDataToVectorDataFilter.h:43
otb::VectorDataAdapter::InputLinePointerType
InputLineType::Pointer InputLinePointerType
Definition: otbVectorDataAdapter.h:64
otb::VectorDataAdapter::OutputVectorDataType
TOutputVectorData OutputVectorDataType
Definition: otbVectorDataAdapter.h:54
otb::VectorDataAdapter::OutputPointType
OutputDataNodeType::PointType OutputPointType
Definition: otbVectorDataAdapter.h:68
otb::VectorDataAdapter::OutputLineType
OutputDataNodeType::LineType OutputLineType
Definition: otbVectorDataAdapter.h:69
otb::VectorDataAdapter::InputPolygonListPointerType
InputPolygonListType::Pointer InputPolygonListPointerType
Definition: otbVectorDataAdapter.h:66
otb::VectorDataAdapter::InputPolygonPointerType
InputPolygonType::Pointer InputPolygonPointerType
Definition: otbVectorDataAdapter.h:65
otb::VectorDataAdapter
Helper class to convert the vector data to generic type.
Definition: otbVectorDataAdapter.h:37
otb::VectorDataAdapter::InputVectorDataType
TInputVectorData InputVectorDataType
Definition: otbVectorDataAdapter.h:51
otb::VectorDataSource
Filter hierarchy for generating VectorData.
Definition: otbVectorDataSource.h:42
otb::VectorDataAdapter::Self
VectorDataAdapter Self
Definition: otbVectorDataAdapter.h:42
otb::VectorDataAdapter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbVectorDataAdapter.h:45
otb::VectorDataAdapter::OutputPolygonListPointerType
OutputPolygonListType::Pointer OutputPolygonListPointerType
Definition: otbVectorDataAdapter.h:75
otb::VectorDataAdapter::VectorDataAdapter
VectorDataAdapter()
Definition: otbVectorDataAdapter.h:79
otb::VectorDataAdapter::OutputPolygonType
OutputDataNodeType::PolygonType OutputPolygonType
Definition: otbVectorDataAdapter.h:70