OTB  10.0.0
Orfeo Toolbox
otbImageToEnvelopeVectorDataFilter.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 otbImageToEnvelopeVectorDataFilter_h
22 #define otbImageToEnvelopeVectorDataFilter_h
23 
24 #include "otbVectorDataSource.h"
25 #include "otbGenericRSTransform.h"
26 #include <string>
27 
28 namespace otb
29 {
30 
48 template <class TInputImage, class TOutputVectorData>
49 class ITK_EXPORT ImageToEnvelopeVectorDataFilter : public otb::VectorDataSource<TOutputVectorData>
50 {
51 
52 public:
56  typedef itk::SmartPointer<Self> Pointer;
57  typedef itk::SmartPointer<const Self> ConstPointer;
58 
59  typedef TInputImage InputImageType;
60  typedef TOutputVectorData OutputVectorDataType;
61  typedef typename TInputImage::ConstPointer InputImagePointer;
62  typedef typename TOutputVectorData::Pointer OutputVectorDataPointer;
63 
67  typedef typename OutputVectorDataType::DataNodeType OutputDataNodeType;
68  typedef typename OutputVectorDataType::DataNodePointerType OutputDataNodePointerType;
69  typedef typename OutputVectorDataType::TreeNodeType OutputInternalTreeNodeType;
70  typedef typename OutputDataNodeType::PolygonType PolygonType;
71 
73  using Superclass::SetInput;
74  void SetInput(const InputImageType* input);
75 
77  const InputImageType* GetInput();
78 
80  itkNewMacro(Self);
81 
84 
86  itkSetStringMacro(OutputProjectionRef);
87  itkGetStringMacro(OutputProjectionRef);
89 
90  itkSetMacro(SamplingRate, unsigned int);
91  itkGetMacro(SamplingRate, unsigned int);
92 
93 protected:
96  {
97  }
98 
99  void GenerateOutputInformation(void) override;
100 
101  void GenerateInputRequestedRegion() override;
102 
103  void GenerateData(void) override;
104 
105  void InstantiateTransform();
106 
107 private:
109  void operator=(const Self&) = delete;
110 
113  unsigned int m_SamplingRate; // Sampling rate for edges (in pixels)
114 };
115 
116 } // end namespace otb
117 
118 #ifndef OTB_MANUAL_INSTANTIATION
120 #endif
121 
122 #endif
This is the class to handle generic remote sensing transform.
itk::SmartPointer< Self > Pointer
Build a vector data containing the polygon of the image envelope.
otb::VectorDataSource< TOutputVectorData > Superclass
otb::GenericRSTransform< double, 2, 2 > InternalTransformType
InternalTransformType::Pointer InternalTransformPointerType
OutputVectorDataType::DataNodePointerType OutputDataNodePointerType
OutputVectorDataType::DataNodeType OutputDataNodeType
void operator=(const Self &)=delete
OutputVectorDataType::TreeNodeType OutputInternalTreeNodeType
ImageToEnvelopeVectorDataFilter(const Self &)=delete
Filter hierarchy for generating VectorData.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.