OTB  10.0.0
Orfeo Toolbox
otbVectorDataIntoImageProjectionFilter.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 otbVectorDataIntoImageProjectionFilter_h
22 #define otbVectorDataIntoImageProjectionFilter_h
23 
24 
25 #include "otbImage.h"
26 
29 
30 namespace otb
31 {
32 
45 template <class TInputVectorData, class TInputImage>
46 class ITK_EXPORT VectorDataIntoImageProjectionFilter : public otb::VectorDataToVectorDataFilter<TInputVectorData, TInputVectorData>
47 {
48 
49 public:
53  typedef itk::SmartPointer<Self> Pointer;
54  typedef itk::SmartPointer<const Self> ConstPointer;
55 
57  typedef TInputVectorData InputVectorDataType;
58  typedef typename TInputVectorData::ConstPointer InputVectorDataPointer;
59 
61  typedef TInputImage ImageType;
62  typedef typename TInputImage::Pointer ImagePointerType;
63 
64  typedef itk::Vector<double, 2> SpacingType;
65  typedef itk::Point<double, 2> OriginType;
66 
68  itkNewMacro(Self);
69 
72 
74  {
75  this->SetInput(input);
76  }
77 
79  {
80  m_InputImage = input;
81  }
82 
85  itkSetMacro(OutputOrigin, OriginType);
86  virtual void SetOutputOrigin(const double origin[2]);
87  virtual void SetOutputOrigin(const float origin[2]);
89 
90  itkGetConstReferenceMacro(OutputOrigin, OriginType);
91 
94  virtual void SetOutputSpacing(const SpacingType& spacing);
95  virtual void SetOutputSpacing(const double spacing[2]);
96  virtual void SetOutputSpacing(const float spacing[2]);
98 
99  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
100 
101  virtual void SetUseOutputSpacingAndOriginFromImage(bool flag);
102 
103 protected:
105 
107  {
108  }
109 
110  void GenerateData(void) override;
111 
112  // Projection filter
116 
117 private:
119  void operator=(const Self&) = delete;
120 
122 
125 
128 
130 };
131 
132 } // end namespace otb
133 
134 #ifndef OTB_MANUAL_INSTANTIATION
136 #endif
137 
138 #endif
Extract a subset of a Vector Data based on location.
itk::SmartPointer< Self > Pointer
Reproject vector data into the coordinate system of an image.
VectorDataIntoImageProjectionFilter(const Self &)=delete
void operator=(const Self &)=delete
otb::VectorDataToVectorDataFilter< TInputVectorData, TInputVectorData > Superclass
VectorDataProjectionFilter< InputVectorDataType, InputVectorDataType > VectorDataProjectionFilterType
VectorDataExtractROI< InputVectorDataType > VectorDataExtractROIType
Reproject vector data in a different coordinate system.
Filter hierarchy for generating VectorData.
Base class for filters that take an VectorData as input and produce an VectorData as output.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.