OTB  9.0.0
Orfeo Toolbox
otbImageToEnvelopeVectorDataFilter.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 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::DataTreePointerType OutputDataTreePointerType;
70  typedef typename OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType;
71  typedef typename OutputDataNodeType::PolygonType PolygonType;
72 
74  using Superclass::SetInput;
75  void SetInput(const InputImageType* input);
76 
78  const InputImageType* GetInput();
79 
81  itkNewMacro(Self);
82 
85 
87  itkSetStringMacro(OutputProjectionRef);
88  itkGetStringMacro(OutputProjectionRef);
90 
91  itkSetMacro(SamplingRate, unsigned int);
92  itkGetMacro(SamplingRate, unsigned int);
93 
94 protected:
97  {
98  }
99 
100  void GenerateOutputInformation(void) override;
101 
102  void GenerateInputRequestedRegion() override;
103 
104  void GenerateData(void) override;
105 
106  void InstantiateTransform();
107 
108 private:
109  ImageToEnvelopeVectorDataFilter(const Self&) = delete;
110  void operator=(const Self&) = delete;
111 
114  unsigned int m_SamplingRate; // Sampling rate for edges (in pixels)
115 };
116 
117 } // end namespace otb
118 
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
otb::ImageToEnvelopeVectorDataFilter::Superclass
otb::VectorDataSource< TOutputVectorData > Superclass
Definition: otbImageToEnvelopeVectorDataFilter.h:55
otb::ImageToEnvelopeVectorDataFilter::OutputDataNodePointerType
OutputVectorDataType::DataNodePointerType OutputDataNodePointerType
Definition: otbImageToEnvelopeVectorDataFilter.h:68
otb::GenericRSTransform::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbGenericRSTransform.h:66
otbImageToEnvelopeVectorDataFilter.hxx
otb::ImageToEnvelopeVectorDataFilter::~ImageToEnvelopeVectorDataFilter
~ImageToEnvelopeVectorDataFilter() override
Definition: otbImageToEnvelopeVectorDataFilter.h:96
otb::ImageToEnvelopeVectorDataFilter::OutputVectorDataType
TOutputVectorData OutputVectorDataType
Definition: otbImageToEnvelopeVectorDataFilter.h:60
otb::ImageToEnvelopeVectorDataFilter::OutputInternalTreeNodeType
OutputVectorDataType::DataTreeType::TreeNodeType OutputInternalTreeNodeType
Definition: otbImageToEnvelopeVectorDataFilter.h:70
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageToEnvelopeVectorDataFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageToEnvelopeVectorDataFilter.h:57
otb::ImageToEnvelopeVectorDataFilter::InputImageType
TInputImage InputImageType
Definition: otbImageToEnvelopeVectorDataFilter.h:59
otb::ImageToEnvelopeVectorDataFilter::InputImagePointer
TInputImage::ConstPointer InputImagePointer
Definition: otbImageToEnvelopeVectorDataFilter.h:61
otb::ImageToEnvelopeVectorDataFilter::OutputVectorDataPointer
TOutputVectorData::Pointer OutputVectorDataPointer
Definition: otbImageToEnvelopeVectorDataFilter.h:62
otb::ImageToEnvelopeVectorDataFilter::InternalTransformPointerType
InternalTransformType::Pointer InternalTransformPointerType
Definition: otbImageToEnvelopeVectorDataFilter.h:66
otb::ImageToEnvelopeVectorDataFilter::m_SamplingRate
unsigned int m_SamplingRate
Definition: otbImageToEnvelopeVectorDataFilter.h:114
otb::ImageToEnvelopeVectorDataFilter
Build a vector data containing the polygon of the image envelope.
Definition: otbImageToEnvelopeVectorDataFilter.h:49
otb::ImageToEnvelopeVectorDataFilter::InternalTransformType
otb::GenericRSTransform< double, 2, 2 > InternalTransformType
Definition: otbImageToEnvelopeVectorDataFilter.h:65
otb::ImageToEnvelopeVectorDataFilter::m_OutputProjectionRef
std::string m_OutputProjectionRef
Definition: otbImageToEnvelopeVectorDataFilter.h:113
otb::GenericRSTransform
This is the class to handle generic remote sensing transform.
Definition: otbGenericRSTransform.h:57
otbVectorDataSource.h
otb::ImageToEnvelopeVectorDataFilter::OutputDataNodeType
OutputVectorDataType::DataNodeType OutputDataNodeType
Definition: otbImageToEnvelopeVectorDataFilter.h:67
otb::ImageToEnvelopeVectorDataFilter::OutputDataTreePointerType
OutputVectorDataType::DataTreePointerType OutputDataTreePointerType
Definition: otbImageToEnvelopeVectorDataFilter.h:69
otb::ImageToEnvelopeVectorDataFilter::m_Transform
InternalTransformPointerType m_Transform
Definition: otbImageToEnvelopeVectorDataFilter.h:112
otb::ImageToEnvelopeVectorDataFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageToEnvelopeVectorDataFilter.h:56
otb::ImageToEnvelopeVectorDataFilter::Self
ImageToEnvelopeVectorDataFilter Self
Definition: otbImageToEnvelopeVectorDataFilter.h:54
otb::ImageToEnvelopeVectorDataFilter::PolygonType
OutputDataNodeType::PolygonType PolygonType
Definition: otbImageToEnvelopeVectorDataFilter.h:71
otbGenericRSTransform.h
otb::VectorDataSource
Filter hierarchy for generating VectorData.
Definition: otbVectorDataSource.h:42