OTB  10.0.0
Orfeo Toolbox
otbVectorDataTransformFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 "otbVectorData.h"
27 
28 namespace otb
29 {
30 
43 template <class TInputVectorData, class TOutputVectorData>
44 class ITK_EXPORT VectorDataTransformFilter : public otb::VectorDataToVectorDataFilter<TInputVectorData, TOutputVectorData>
45 {
46 
47 public:
51  typedef itk::SmartPointer<Self> Pointer;
52  typedef itk::SmartPointer<const Self> ConstPointer;
53 
54  typedef TInputVectorData InputVectorDataType;
55  typedef TOutputVectorData OutputVectorDataType;
56  typedef typename TInputVectorData::ConstPointer InputVectorDataPointer;
57  typedef typename TOutputVectorData::Pointer OutputVectorDataPointer;
58 
60  typedef itk::Transform<double, 2, 2> GenericTransformType;
61  typedef typename GenericTransformType::Pointer GenericTransformPointerType;
62 
63  typedef itk::Vector<double, 2> SpacingType;
64  typedef itk::Point<double, 2> OriginType;
65 
66  typedef typename InputVectorDataType::DataNodePointerType InputDataNodePointerType;
67  typedef typename OutputVectorDataType::DataNodeType OutputDataNodeType;
68  typedef typename OutputVectorDataType::DataNodePointerType OutputDataNodePointerType;
69 
70  typedef typename InputVectorDataType::TreeNodeType InputInternalTreeNodeType;
71  typedef typename OutputVectorDataType::TreeNodeType OutputInternalTreeNodeType;
72  typedef typename InputVectorDataType::ChildrenListType InputChildrenListType;
73 
74 
75  typedef typename OutputDataNodeType::PointType PointType;
76  typedef typename OutputDataNodeType::LineType LineType;
77  typedef typename OutputDataNodeType::LineConstPointerType LineConstPointerType;
78  typedef typename OutputDataNodeType::LinePointerType LinePointerType;
79 
80  typedef typename OutputDataNodeType::PolygonType PolygonType;
81  typedef typename OutputDataNodeType::PolygonConstPointerType PolygonConstPointerType;
82  typedef typename OutputDataNodeType::PolygonPointerType PolygonPointerType;
83 
84  typedef typename OutputDataNodeType::PolygonListType PolygonListType;
85  typedef typename OutputDataNodeType::PolygonListConstPointerType PolygonListConstPointerType;
86  typedef typename OutputDataNodeType::PolygonListPointerType PolygonListPointerType;
87 
88 
90  itkNewMacro(Self);
91 
94 
96  itkSetObjectMacro(Transform, GenericTransformType);
99 
100 protected:
103 
104  PointType ProcessPoint(PointType point) const override;
105  LinePointerType ProcessLine(LinePointerType line) const override;
106  PolygonPointerType ProcessPolygon(PolygonPointerType polygon) const override;
107  PolygonListPointerType ProcessPolygonList(PolygonListPointerType polygonList) const override;
108 
109  void GenerateData(void) override;
110 
111 private:
112  VectorDataTransformFilter(const Self&) = delete;
113  void operator=(const Self&) = delete;
114 
116 };
117 
118 } // end namespace otb
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
122 #endif
123 
124 #endif
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:42
Filter hierarchy for generating VectorData.
Base class for filters that take an VectorData as input and produce an VectorData as output.
Apply a Transform To a VectorData.
InputVectorDataType::TreeNodeType InputInternalTreeNodeType
OutputDataNodeType::LineType LineType
OutputVectorDataType::DataNodePointerType OutputDataNodePointerType
InputVectorDataType::ChildrenListType InputChildrenListType
itk::SmartPointer< const Self > ConstPointer
OutputDataNodeType::PolygonListPointerType PolygonListPointerType
OutputVectorDataType::DataNodeType OutputDataNodeType
otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData > Superclass
InputVectorDataType::DataNodePointerType InputDataNodePointerType
TInputVectorData::ConstPointer InputVectorDataPointer
OutputDataNodeType::PointType PointType
OutputDataNodeType::PolygonListType PolygonListType
OutputDataNodeType::PolygonType PolygonType
OutputDataNodeType::PolygonListConstPointerType PolygonListConstPointerType
TOutputVectorData::Pointer OutputVectorDataPointer
void operator=(const Self &)=delete
OutputDataNodeType::PolygonPointerType PolygonPointerType
itk::Transform< double, 2, 2 > GenericTransformType
OutputDataNodeType::PolygonConstPointerType PolygonConstPointerType
OutputDataNodeType::LinePointerType LinePointerType
itkGetObjectMacro(Transform, GenericTransformType)
OutputVectorDataType::TreeNodeType OutputInternalTreeNodeType
VectorDataTransformFilter(const Self &)=delete
OutputDataNodeType::LineConstPointerType LineConstPointerType
GenericTransformType::Pointer GenericTransformPointerType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.