OTB  9.0.0
Orfeo Toolbox
otbVectorDataIntoImageProjectionFilter.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 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 
67  // use to display vectordata
68  typedef itk::PreOrderTreeIterator<typename InputVectorDataType::DataTreeType> TreeIteratorType;
69 
71  itkNewMacro(Self);
72 
75 
77  {
78  this->SetInput(input);
79  }
80 
82  {
83  m_InputImage = input;
84  }
85 
88  itkSetMacro(OutputOrigin, OriginType);
89  virtual void SetOutputOrigin(const double origin[2]);
90  virtual void SetOutputOrigin(const float origin[2]);
92 
93  itkGetConstReferenceMacro(OutputOrigin, OriginType);
94 
97  virtual void SetOutputSpacing(const SpacingType& spacing);
98  virtual void SetOutputSpacing(const double spacing[2]);
99  virtual void SetOutputSpacing(const float spacing[2]);
101 
102  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
103 
104  virtual void SetUseOutputSpacingAndOriginFromImage(bool flag);
105 
106 protected:
108 
110  {
111  }
112 
113  void GenerateData(void) override;
114 
115  // Projection filter
119 
120 private:
121  VectorDataIntoImageProjectionFilter(const Self&) = delete;
122  void operator=(const Self&) = delete;
123 
125 
128 
131 
133 };
134 
135 } // end namespace otb
136 
137 #ifndef OTB_MANUAL_INSTANTIATION
139 #endif
140 
141 #endif
otb::VectorDataIntoImageProjectionFilter
Reproject vector data into the coordinate system of an image.
Definition: otbVectorDataIntoImageProjectionFilter.h:46
otb::VectorDataIntoImageProjectionFilter::SpacingType
itk::Vector< double, 2 > SpacingType
Definition: otbVectorDataIntoImageProjectionFilter.h:64
otb::VectorDataIntoImageProjectionFilter::VectorDataProjectionFilterType
VectorDataProjectionFilter< InputVectorDataType, InputVectorDataType > VectorDataProjectionFilterType
Definition: otbVectorDataIntoImageProjectionFilter.h:116
otb::VectorDataIntoImageProjectionFilter::OriginType
itk::Point< double, 2 > OriginType
Definition: otbVectorDataIntoImageProjectionFilter.h:65
otb::VectorDataIntoImageProjectionFilter::m_VdProjFilter
VectorDataProjectionFilterType::Pointer m_VdProjFilter
Definition: otbVectorDataIntoImageProjectionFilter.h:126
otb::VectorDataProjectionFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataProjectionFilter.h:74
otb::VectorDataProjectionFilter
Reproject vector data in a different coordinate system.
Definition: otbVectorDataProjectionFilter.h:67
otbImage.h
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::VectorDataIntoImageProjectionFilter::m_UseOutputSpacingAndOriginFromImage
bool m_UseOutputSpacingAndOriginFromImage
Definition: otbVectorDataIntoImageProjectionFilter.h:132
otb::VectorDataIntoImageProjectionFilter::m_InputImage
ImagePointerType m_InputImage
Definition: otbVectorDataIntoImageProjectionFilter.h:124
otb::VectorDataIntoImageProjectionFilter::TreeIteratorType
itk::PreOrderTreeIterator< typename InputVectorDataType::DataTreeType > TreeIteratorType
Definition: otbVectorDataIntoImageProjectionFilter.h:68
otb::VectorDataToVectorDataFilter
Base class for filters that take an VectorData as input and produce an VectorData as output.
Definition: otbVectorDataToVectorDataFilter.h:43
otb::VectorDataIntoImageProjectionFilter::SetInputImage
void SetInputImage(ImagePointerType input)
Definition: otbVectorDataIntoImageProjectionFilter.h:81
otb::VectorDataIntoImageProjectionFilter::~VectorDataIntoImageProjectionFilter
~VectorDataIntoImageProjectionFilter() override
Definition: otbVectorDataIntoImageProjectionFilter.h:109
otb::VectorDataIntoImageProjectionFilter::m_OutputSpacing
SpacingType m_OutputSpacing
Definition: otbVectorDataIntoImageProjectionFilter.h:129
otb::VectorDataIntoImageProjectionFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbVectorDataIntoImageProjectionFilter.h:54
otb::VectorDataIntoImageProjectionFilter::m_OutputOrigin
OriginType m_OutputOrigin
Definition: otbVectorDataIntoImageProjectionFilter.h:130
otb::VectorDataExtractROI
Extract a subset of a Vector Data based on location.
Definition: otbVectorDataExtractROI.h:54
otb::VectorDataIntoImageProjectionFilter::ImagePointerType
TInputImage::Pointer ImagePointerType
Definition: otbVectorDataIntoImageProjectionFilter.h:62
otb::VectorDataIntoImageProjectionFilter::Superclass
otb::VectorDataToVectorDataFilter< TInputVectorData, TInputVectorData > Superclass
Definition: otbVectorDataIntoImageProjectionFilter.h:52
otb::RemoteSensingRegion< typename VertexType::CoordRepType >
otb::VectorDataIntoImageProjectionFilter::InputVectorDataPointer
TInputVectorData::ConstPointer InputVectorDataPointer
Definition: otbVectorDataIntoImageProjectionFilter.h:58
otbVectorDataIntoImageProjectionFilter.hxx
otb::VectorDataIntoImageProjectionFilter::VectorDataExtractROIType
VectorDataExtractROI< InputVectorDataType > VectorDataExtractROIType
Definition: otbVectorDataIntoImageProjectionFilter.h:117
otb::VectorDataIntoImageProjectionFilter::InputVectorDataType
TInputVectorData InputVectorDataType
Definition: otbVectorDataIntoImageProjectionFilter.h:57
otb::VectorDataIntoImageProjectionFilter::ImageType
TInputImage ImageType
Definition: otbVectorDataIntoImageProjectionFilter.h:61
otb::VectorDataIntoImageProjectionFilter::Self
VectorDataIntoImageProjectionFilter Self
Definition: otbVectorDataIntoImageProjectionFilter.h:51
otbVectorDataProjectionFilter.h
otb::VectorDataIntoImageProjectionFilter::RemoteSensingRegionType
VectorDataExtractROIType::RegionType RemoteSensingRegionType
Definition: otbVectorDataIntoImageProjectionFilter.h:118
otb::VectorDataExtractROI::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataExtractROI.h:60
otb::VectorDataIntoImageProjectionFilter::m_VdExtractFilter
VectorDataExtractROIType::Pointer m_VdExtractFilter
Definition: otbVectorDataIntoImageProjectionFilter.h:127
otbVectorDataExtractROI.h
otb::VectorDataIntoImageProjectionFilter::SetInputVectorData
void SetInputVectorData(InputVectorDataPointer input)
Definition: otbVectorDataIntoImageProjectionFilter.h:76
otb::VectorDataIntoImageProjectionFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataIntoImageProjectionFilter.h:53