OTB  6.7.0
Orfeo Toolbox
otbVectorDataIntoImageProjectionFilter.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 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>
47  public otb::VectorDataToVectorDataFilter<TInputVectorData, TInputVectorData>
48 {
49 
50 public:
56 
58  typedef TInputVectorData InputVectorDataType;
59  typedef typename TInputVectorData::ConstPointer InputVectorDataPointer;
60 
62  typedef TInputImage ImageType;
63  typedef typename TInputImage::Pointer ImagePointerType;
64 
67 
68  // use to display vectordata
70 
72  itkNewMacro(Self);
73 
76 
78  {
79  this->SetInput(input);
80  }
81 
83  {
84  m_InputImage = input;
85  }
86 
89  itkSetMacro(OutputOrigin, OriginType);
90  virtual void SetOutputOrigin(const double origin[2]);
91  virtual void SetOutputOrigin(const float origin[2]);
93 
94  itkGetConstReferenceMacro(OutputOrigin, OriginType);
95 
98  virtual void SetOutputSpacing(const SpacingType& spacing);
99  virtual void SetOutputSpacing(const double spacing[2]);
100  virtual void SetOutputSpacing(const float spacing[2]);
102 
103  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
104 
105  virtual void SetUseOutputSpacingAndOriginFromImage(bool flag);
106 
107 protected:
109 
111 
112  void GenerateData(void) override;
113 
114  // Projection filter
119 
120 private:
121  VectorDataIntoImageProjectionFilter(const Self &) = delete;
122  void operator =(const Self&) = delete;
123 
125 
128 
131 
133 
134 };
135 
136 } // end namespace otb
137 
138 #ifndef OTB_MANUAL_INSTANTIATION
140 #endif
141 
142 #endif
VectorDataProjectionFilter< InputVectorDataType, InputVectorDataType > VectorDataProjectionFilterType
itk::PreOrderTreeIterator< typename InputVectorDataType::DataTreeType > TreeIteratorType
Reproject vector data in a different coordinate system.
VectorDataExtractROI< InputVectorDataType > VectorDataExtractROIType
Extract a subset of a Vector Data based on location.
Reproject vector data into the coordinate system of an image.
Base class for filters that take an VectorData as input and produce an VectorData as output...
VectorImageType::SpacingType SpacingType
Definition: mvdTypes.h:181
otb::VectorDataToVectorDataFilter< TInputVectorData, TInputVectorData > Superclass