OTB  9.0.0
Orfeo Toolbox
otbConcatenateVectorDataFilter.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 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;
66  typedef typename DataNodeType::PointType PointType;
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 
100 };
101 
102 } // end namespace otb
103 
104 #ifndef OTB_MANUAL_INSTANTIATION
106 #endif
107 
108 #endif
otb::ConcatenateVectorDataFilter::Superclass
VectorDataSource< TVectorData > Superclass
Definition: otbConcatenateVectorDataFilter.h:51
otb::ConcatenateVectorDataFilter::DataNodeType
VectorDataType::DataNodeType DataNodeType
Definition: otbConcatenateVectorDataFilter.h:63
otb::ConcatenateVectorDataFilter::PointVectorType
std::vector< PointType > PointVectorType
Definition: otbConcatenateVectorDataFilter.h:73
otb::ConcatenateVectorDataFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbConcatenateVectorDataFilter.h:52
otb::ConcatenateVectorDataFilter::Self
ConcatenateVectorDataFilter Self
Definition: otbConcatenateVectorDataFilter.h:50
otbVectorDataToVectorDataFilter.h
otb::ConcatenateVectorDataFilter::LineType
DataNodeType::LineType LineType
Definition: otbConcatenateVectorDataFilter.h:68
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ConcatenateVectorDataFilter
Produces a VectorData from the concatenation of several input vectordatas.
Definition: otbConcatenateVectorDataFilter.h:46
otb::ConcatenateVectorDataFilter::PointType
DataNodeType::PointType PointType
Definition: otbConcatenateVectorDataFilter.h:66
otb::ConcatenateVectorDataFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbConcatenateVectorDataFilter.h:53
otb::ConcatenateVectorDataFilter::m_Folder
DataNodePointerType m_Folder
Definition: otbConcatenateVectorDataFilter.h:98
otb::ConcatenateVectorDataFilter::VectorDataPointerType
VectorDataType::Pointer VectorDataPointerType
Definition: otbConcatenateVectorDataFilter.h:62
otb::ConcatenateVectorDataFilter::TreeNodeType
DataTreeType::TreeNodeType TreeNodeType
Definition: otbConcatenateVectorDataFilter.h:70
otbVectorData.h
otb::ConcatenateVectorDataFilter::VertexType
DataNodeType::PolygonType::VertexType VertexType
Definition: otbConcatenateVectorDataFilter.h:67
otb::ConcatenateVectorDataFilter::ChildrenListType
TreeNodeType::ChildrenListType ChildrenListType
Definition: otbConcatenateVectorDataFilter.h:71
otbConcatenateVectorDataFilter.hxx
otb::ConcatenateVectorDataFilter::VectorDataType
TVectorData VectorDataType
Definition: otbConcatenateVectorDataFilter.h:59
otb::VectorDataSource
Filter hierarchy for generating VectorData.
Definition: otbVectorDataSource.h:42
otb::ConcatenateVectorDataFilter::RegionType
DataNodeType::PolygonType::RegionType RegionType
Definition: otbConcatenateVectorDataFilter.h:65
otb::ConcatenateVectorDataFilter::DataTreeType
VectorDataType::DataTreeType DataTreeType
Definition: otbConcatenateVectorDataFilter.h:69
otb::ConcatenateVectorDataFilter::m_Document
DataNodePointerType m_Document
Definition: otbConcatenateVectorDataFilter.h:99
otb::ConcatenateVectorDataFilter::~ConcatenateVectorDataFilter
~ConcatenateVectorDataFilter() override
Definition: otbConcatenateVectorDataFilter.h:83
otb::ConcatenateVectorDataFilter::DataNodePointerType
DataNodeType::Pointer DataNodePointerType
Definition: otbConcatenateVectorDataFilter.h:64