OTB  9.0.0
Orfeo Toolbox
otbVectorDataTransformFilter.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 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  typedef typename OutputVectorDataType::DataTreePointerType OutputDataTreePointerType;
70 
71  typedef typename InputVectorDataType::DataTreeType::TreeNodeType InputInternalTreeNodeType;
72  typedef typename OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType;
73  typedef typename InputInternalTreeNodeType::ChildrenListType InputChildrenListType;
74 
75 
76  typedef typename OutputDataNodeType::PointType PointType;
77  typedef typename OutputDataNodeType::LineType LineType;
78  typedef typename OutputDataNodeType::LineConstPointerType LineConstPointerType;
79  typedef typename OutputDataNodeType::LinePointerType LinePointerType;
80 
81  typedef typename OutputDataNodeType::PolygonType PolygonType;
82  typedef typename OutputDataNodeType::PolygonConstPointerType PolygonConstPointerType;
83  typedef typename OutputDataNodeType::PolygonPointerType PolygonPointerType;
84 
85  typedef typename OutputDataNodeType::PolygonListType PolygonListType;
86  typedef typename OutputDataNodeType::PolygonListConstPointerType PolygonListConstPointerType;
87  typedef typename OutputDataNodeType::PolygonListPointerType PolygonListPointerType;
88 
89 
91  itkNewMacro(Self);
92 
95 
97  itkSetObjectMacro(Transform, GenericTransformType);
98  itkGetObjectMacro(Transform, GenericTransformType);
100 
101 protected:
104 
105  PointType ProcessPoint(PointType point) const override;
106  LinePointerType ProcessLine(LinePointerType line) const override;
107  PolygonPointerType ProcessPolygon(PolygonPointerType polygon) const override;
108  PolygonListPointerType ProcessPolygonList(PolygonListPointerType polygonList) const override;
109 
110  void GenerateData(void) override;
111 
112 private:
113  VectorDataTransformFilter(const Self&) = delete;
114  void operator=(const Self&) = delete;
115 
117 };
118 
119 } // end namespace otb
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
123 #endif
124 
125 #endif
otb::VectorDataTransformFilter
Apply a Transform To a VectorData.
Definition: otbVectorDataTransformFilter.h:44
otb::VectorDataTransformFilter::InputVectorDataType
TInputVectorData InputVectorDataType
Definition: otbVectorDataTransformFilter.h:54
otbVectorDataTransformFilter.hxx
otb::VectorDataTransformFilter::OutputDataTreePointerType
OutputVectorDataType::DataTreePointerType OutputDataTreePointerType
Definition: otbVectorDataTransformFilter.h:69
otb::VectorDataTransformFilter::PointType
OutputDataNodeType::PointType PointType
Definition: otbVectorDataTransformFilter.h:76
otbVectorDataToVectorDataFilter.h
otb::VectorDataTransformFilter::PolygonType
OutputDataNodeType::PolygonType PolygonType
Definition: otbVectorDataTransformFilter.h:81
otb::VectorDataTransformFilter::InputVectorDataPointer
TInputVectorData::ConstPointer InputVectorDataPointer
Definition: otbVectorDataTransformFilter.h:56
otb::VectorDataTransformFilter::Superclass
otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData > Superclass
Definition: otbVectorDataTransformFilter.h:50
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::VectorDataToVectorDataFilter
Base class for filters that take an VectorData as input and produce an VectorData as output.
Definition: otbVectorDataToVectorDataFilter.h:43
otb::VectorDataTransformFilter::PolygonListConstPointerType
OutputDataNodeType::PolygonListConstPointerType PolygonListConstPointerType
Definition: otbVectorDataTransformFilter.h:86
otb::VectorDataTransformFilter::m_Transform
GenericTransformPointerType m_Transform
Definition: otbVectorDataTransformFilter.h:116
otb::VectorDataTransformFilter::LinePointerType
OutputDataNodeType::LinePointerType LinePointerType
Definition: otbVectorDataTransformFilter.h:79
otb::VectorDataTransformFilter::InputInternalTreeNodeType
InputVectorDataType::DataTreeType::TreeNodeType InputInternalTreeNodeType
Definition: otbVectorDataTransformFilter.h:71
otb::VectorDataTransformFilter::OriginType
itk::Point< double, 2 > OriginType
Definition: otbVectorDataTransformFilter.h:64
otb::VectorDataTransformFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataTransformFilter.h:51
otb::Transform
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39
otb::VectorDataTransformFilter::PolygonListType
OutputDataNodeType::PolygonListType PolygonListType
Definition: otbVectorDataTransformFilter.h:85
otb::VectorDataTransformFilter::PolygonListPointerType
OutputDataNodeType::PolygonListPointerType PolygonListPointerType
Definition: otbVectorDataTransformFilter.h:87
otb::VectorDataTransformFilter::GenericTransformType
itk::Transform< double, 2, 2 > GenericTransformType
Definition: otbVectorDataTransformFilter.h:60
otb::VectorDataTransformFilter::LineConstPointerType
OutputDataNodeType::LineConstPointerType LineConstPointerType
Definition: otbVectorDataTransformFilter.h:78
otb::VectorDataTransformFilter::PolygonPointerType
OutputDataNodeType::PolygonPointerType PolygonPointerType
Definition: otbVectorDataTransformFilter.h:83
otb::VectorDataTransformFilter::OutputDataNodePointerType
OutputVectorDataType::DataNodePointerType OutputDataNodePointerType
Definition: otbVectorDataTransformFilter.h:68
otbVectorData.h
otb::VectorDataTransformFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbVectorDataTransformFilter.h:52
otb::VectorDataTransformFilter::~VectorDataTransformFilter
~VectorDataTransformFilter() override
Definition: otbVectorDataTransformFilter.h:103
otb::VectorDataTransformFilter::LineType
OutputDataNodeType::LineType LineType
Definition: otbVectorDataTransformFilter.h:77
otb::VectorDataTransformFilter::OutputVectorDataType
TOutputVectorData OutputVectorDataType
Definition: otbVectorDataTransformFilter.h:55
otb::VectorDataSource
Filter hierarchy for generating VectorData.
Definition: otbVectorDataSource.h:42
otb::VectorDataTransformFilter::PolygonConstPointerType
OutputDataNodeType::PolygonConstPointerType PolygonConstPointerType
Definition: otbVectorDataTransformFilter.h:82
otb::VectorDataTransformFilter::Self
VectorDataTransformFilter Self
Definition: otbVectorDataTransformFilter.h:49
otb::VectorDataTransformFilter::OutputInternalTreeNodeType
OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType
Definition: otbVectorDataTransformFilter.h:72
otb::VectorDataTransformFilter::InputDataNodePointerType
InputVectorDataType::DataNodePointerType InputDataNodePointerType
Definition: otbVectorDataTransformFilter.h:66
otb::VectorDataTransformFilter::GenericTransformPointerType
GenericTransformType::Pointer GenericTransformPointerType
Definition: otbVectorDataTransformFilter.h:61
otb::VectorDataTransformFilter::SpacingType
itk::Vector< double, 2 > SpacingType
Definition: otbVectorDataTransformFilter.h:63
otb::VectorDataTransformFilter::InputChildrenListType
InputInternalTreeNodeType::ChildrenListType InputChildrenListType
Definition: otbVectorDataTransformFilter.h:73
otb::VectorDataTransformFilter::OutputDataNodeType
OutputVectorDataType::DataNodeType OutputDataNodeType
Definition: otbVectorDataTransformFilter.h:67
otb::VectorDataTransformFilter::OutputVectorDataPointer
TOutputVectorData::Pointer OutputVectorDataPointer
Definition: otbVectorDataTransformFilter.h:57