OTB  6.7.0
Orfeo Toolbox
otbConcatenateVectorDataFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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"
27 
28 namespace otb
29 {
45 template <class TVectorData>
46 class ITK_EXPORT ConcatenateVectorDataFilter :
47  public VectorDataSource<TVectorData>
48 {
49 public:
55 
57  itkTypeMacro(ConcatenateVectorDataFilter,
59 
61  itkNewMacro(Self);
62 
63  typedef TVectorData VectorDataType;
64  typedef typename VectorDataType::Pointer VectorDataPointerType;
65  typedef typename VectorDataType::DataNodeType DataNodeType;
66  typedef typename DataNodeType::Pointer DataNodePointerType;
67  typedef typename DataNodeType::PolygonType::RegionType RegionType;
69  typedef typename DataNodeType::PolygonType::VertexType VertexType;
70  typedef typename DataNodeType::LineType LineType;
71  typedef typename VectorDataType::DataTreeType DataTreeType;
72  typedef typename DataTreeType::TreeNodeType TreeNodeType;
73  typedef typename TreeNodeType::ChildrenListType ChildrenListType;
74 
75  typedef typename std::vector<PointType> PointVectorType;
76 
78  void AddInput(const VectorDataType *);
79  using Superclass::AddInput;
80 
81  const VectorDataType * GetInput(unsigned int idx) const;
82 
83 protected:
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 
100 
101 };
102 
103 } // end namespace otb
104 
105 #ifndef OTB_MANUAL_INSTANTIATION
107 #endif
108 
109 #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
itk::SmartPointer< const Self > ConstPointer
VectorImageType::PointType PointType
Definition: mvdTypes.h:189