OTB  6.7.0
Orfeo Toolbox
otbVectorDataTransformFilter.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 otbVectorDataTransformFilter_h
22 #define otbVectorDataTransformFilter_h
23 
25 #include "itkTransform.h"
26 #include "otbImageKeywordlist.h"
27 #include "otbVectorData.h"
28 
29 namespace otb
30 {
31 
44 template <class TInputVectorData, class TOutputVectorData>
45 class ITK_EXPORT VectorDataTransformFilter :
46  public otb::VectorDataToVectorDataFilter<TInputVectorData, TOutputVectorData>
47 {
48 
49 public:
53  <TInputVectorData, TOutputVectorData> Superclass;
56 
57  typedef TInputVectorData InputVectorDataType;
58  typedef TOutputVectorData OutputVectorDataType;
59  typedef typename TInputVectorData::ConstPointer InputVectorDataPointer;
60  typedef typename TOutputVectorData::Pointer OutputVectorDataPointer;
61 
65 
68 
69  typedef typename InputVectorDataType::DataNodePointerType InputDataNodePointerType;
70  typedef typename OutputVectorDataType::DataNodeType OutputDataNodeType;
71  typedef typename OutputVectorDataType::DataNodePointerType OutputDataNodePointerType;
72  typedef typename OutputVectorDataType::DataTreePointerType OutputDataTreePointerType;
73 
74  typedef typename InputVectorDataType::DataTreeType::TreeNodeType InputInternalTreeNodeType;
75  typedef typename OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType;
76  typedef typename InputInternalTreeNodeType::ChildrenListType InputChildrenListType;
77 
78 
80  typedef typename OutputDataNodeType::LineType LineType;
81  typedef typename OutputDataNodeType::LineConstPointerType LineConstPointerType;
82  typedef typename OutputDataNodeType::LinePointerType LinePointerType;
83 
84  typedef typename OutputDataNodeType::PolygonType PolygonType;
85  typedef typename OutputDataNodeType::PolygonConstPointerType PolygonConstPointerType;
86  typedef typename OutputDataNodeType::PolygonPointerType PolygonPointerType;
87 
88  typedef typename OutputDataNodeType::PolygonListType PolygonListType;
89  typedef typename OutputDataNodeType::PolygonListConstPointerType PolygonListConstPointerType;
90  typedef typename OutputDataNodeType::PolygonListPointerType PolygonListPointerType;
91 
92 
94  itkNewMacro(Self);
95 
98 
100  itkSetObjectMacro(Transform, GenericTransformType);
101  itkGetObjectMacro(Transform, GenericTransformType);
103 
104 protected:
107 
108  PointType ProcessPoint(PointType point) const override;
109  LinePointerType ProcessLine(LinePointerType line) const override;
110  PolygonPointerType ProcessPolygon(PolygonPointerType polygon) const override;
111  PolygonListPointerType ProcessPolygonList(PolygonListPointerType polygonList) const override;
112 
113  void GenerateData(void) override;
114 
115 private:
116  VectorDataTransformFilter(const Self&) = delete;
117  void operator=(const Self&) = delete;
118 
120 };
121 
122 } // end namespace otb
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
126 #endif
127 
128 #endif
GenericTransformType::Pointer GenericTransformPointerType
OutputDataNodeType::PointType PointType
OutputDataNodeType::PolygonListType PolygonListType
TInputVectorData::ConstPointer InputVectorDataPointer
OutputDataNodeType::LineType LineType
Apply a Transform To a VectorData.
InputInternalTreeNodeType::ChildrenListType InputChildrenListType
TOutputVectorData::Pointer OutputVectorDataPointer
InputVectorDataType::DataTreeType::TreeNodeType InputInternalTreeNodeType
otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData > Superclass
OutputDataNodeType::PolygonType PolygonType
OutputDataNodeType::LinePointerType LinePointerType
OutputDataNodeType::PolygonConstPointerType PolygonConstPointerType
Base class for filters that take an VectorData as input and produce an VectorData as output...
OutputDataNodeType::PolygonPointerType PolygonPointerType
OutputDataNodeType::PolygonListPointerType PolygonListPointerType
OutputVectorDataType::DataNodePointerType OutputDataNodePointerType
OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType
InputVectorDataType::DataNodePointerType InputDataNodePointerType
OutputDataNodeType::PolygonListConstPointerType PolygonListConstPointerType
OutputDataNodeType::LineConstPointerType LineConstPointerType
VectorImageType::PointType PointType
Definition: mvdTypes.h:189
itk::Transform< double, 2, 2 > GenericTransformType
OutputVectorDataType::DataTreePointerType OutputDataTreePointerType
OutputVectorDataType::DataNodeType OutputDataNodeType
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:40
itk::SmartPointer< const Self > ConstPointer