OTB  6.7.0
Orfeo Toolbox
otbImageToEnvelopeVectorDataFilter.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 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>
50  public otb::VectorDataSource<TOutputVectorData>
51 {
52 
53 public:
59 
60  typedef TInputImage InputImageType;
61  typedef TOutputVectorData OutputVectorDataType;
62  typedef typename TInputImage::ConstPointer InputImagePointer;
63  typedef typename TOutputVectorData::Pointer OutputVectorDataPointer;
64 
68  typedef typename OutputVectorDataType
69  ::DataNodeType OutputDataNodeType;
70  typedef typename OutputVectorDataType
71  ::DataNodePointerType OutputDataNodePointerType;
72  typedef typename OutputVectorDataType
73  ::DataTreePointerType OutputDataTreePointerType;
74  typedef typename OutputVectorDataType
75  ::DataTreeType::TreeNodeType OutputInternalTreeNodeType;
76  typedef typename OutputDataNodeType::PolygonType PolygonType;
77 
79  using Superclass::SetInput;
80  void SetInput(const InputImageType *input);
81 
83  const InputImageType * GetInput();
84 
86  itkNewMacro(Self);
87 
90 
92  itkSetStringMacro(OutputProjectionRef);
93  itkGetStringMacro(OutputProjectionRef);
95 
96  itkSetMacro(SamplingRate, unsigned int);
97  itkGetMacro(SamplingRate, unsigned int);
98 
99 protected:
102 
103  void GenerateOutputInformation(void) override;
104 
105  void GenerateInputRequestedRegion() override;
106 
107  void GenerateData(void) override;
108 
109  void InstantiateTransform();
110 
111 private:
112  ImageToEnvelopeVectorDataFilter(const Self &) = delete;
113  void operator =(const Self&) = delete;
114 
117  unsigned int m_SamplingRate; // Sampling rate for edges (in pixels)
118 };
119 
120 } // end namespace otb
121 
122 #ifndef OTB_MANUAL_INSTANTIATION
124 #endif
125 
126 #endif
InternalTransformType::Pointer InternalTransformPointerType
Build a vector data containing the polygon of the image envelope.
OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType
OutputVectorDataType::DataTreePointerType OutputDataTreePointerType
Filter hierarchy for generating VectorData.
otb::VectorDataSource< TOutputVectorData > Superclass
OutputVectorDataType::DataNodeType OutputDataNodeType
This is the class to handle generic remote sensing transform.
OutputVectorDataType::DataNodePointerType OutputDataNodePointerType
otb::GenericRSTransform< double, 2, 2 > InternalTransformType