OTB  7.2.0
Orfeo Toolbox
otbConcatenateVectorDataFilter.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 otbConcatenateVectorDataFilter_h
22 #define otbConcatenateVectorDataFilter_h
23 
25 #include "otbVectorData.h"
26 #include "itkPreOrderTreeIterator.h"
27 
28 namespace otb
29 {
45 template <class TVectorData>
46 class ITK_EXPORT ConcatenateVectorDataFilter : public VectorDataSource<TVectorData>
47 {
48 public:
52  typedef itk::SmartPointer<Self> Pointer;
53  typedef itk::SmartPointer<const Self> ConstPointer;
54 
57 
59  itkNewMacro(Self);
60 
61  typedef TVectorData VectorDataType;
62  typedef typename VectorDataType::Pointer VectorDataPointerType;
63  typedef typename VectorDataType::DataNodeType DataNodeType;
64  typedef typename DataNodeType::Pointer DataNodePointerType;
65  typedef typename DataNodeType::PolygonType::RegionType RegionType;
67  typedef typename DataNodeType::PolygonType::VertexType VertexType;
68  typedef typename DataNodeType::LineType LineType;
69  typedef typename VectorDataType::DataTreeType DataTreeType;
70  typedef typename DataTreeType::TreeNodeType TreeNodeType;
71  typedef typename TreeNodeType::ChildrenListType ChildrenListType;
72 
73  typedef typename std::vector<PointType> PointVectorType;
74 
76  void AddInput(const VectorDataType*);
77  using Superclass::AddInput;
78 
79  const VectorDataType* GetInput(unsigned int idx) const;
80 
81 protected:
84  {
85  }
86  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
87 
89  void GenerateData(void) override;
90 
92  void ProcessNode(TreeNodeType* source, DataNodeType* outputDocument);
93 
94 private:
95  ConcatenateVectorDataFilter(const Self&) = delete;
96  void operator=(const Self&) = delete;
97 
98  DataNodePointerType m_Folder;
99  DataNodePointerType m_Document;
100 };
101 
102 } // end namespace otb
103 
104 #ifndef OTB_MANUAL_INSTANTIATION
106 #endif
107 
108 #endif
TreeNodeType::ChildrenListType ChildrenListType
Produces a VectorData from the concatenation of several input vectordatas.
DataNodeType::PolygonType::VertexType VertexType
Filter hierarchy for generating VectorData.
DataNodeType::PolygonType::RegionType RegionType
VectorDataSource< TVectorData > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
itk::SmartPointer< const Self > ConstPointer
VectorImageType::PointType PointType
Definition: mvdTypes.h:183