OTB  7.2.0
Orfeo Toolbox
otbVectorDataAdapter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 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 
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 
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
TOutputVectorData OutputVectorDataType
InputVectorDataType::DataNodeType InputDataNodeType
InputPolygonListType::Pointer InputPolygonListPointerType
InputDataNodeType::LineType InputLineType
InputPolygonType::Pointer InputPolygonPointerType
Helper class to convert the vector data to generic type.
OutputVectorDataType::DataNodeType OutputDataNodeType
OutputDataNodeType::PolygonType OutputPolygonType
InputDataNodeType::PointType InputPointType
OutputDataNodeType::PointType OutputPointType
OutputPolygonType::Pointer OutputPolygonPointerType
OutputLineType::Pointer OutputLinePointerType
InputDataNodeType::PolygonListType InputPolygonListType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
OutputPolygonListType::Pointer OutputPolygonListPointerType
OutputDataNodeType::LineType OutputLineType
itk::SmartPointer< Self > Pointer
Base class for filters that take an VectorData as input and produce an VectorData as output...
OutputDataNodeType::PolygonListType OutputPolygonListType
InputDataNodeType::PolygonType InputPolygonType
VectorImageType::PointType PointType
Definition: mvdTypes.h:183
itk::SmartPointer< const Self > ConstPointer
TInputVectorData InputVectorDataType
InputLineType::Pointer InputLinePointerType
otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData > Superclass