OTB  10.0.0
Orfeo Toolbox
otbPersistentImageToVectorDataFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbPersistentImageToVectorDataFilter_h
23 #define otbPersistentImageToVectorDataFilter_h
24 
26 #include "itkExtractImageFilter.h"
27 
29 #include "otbOGRVectorDataIO.h"
30 #include "itkMacro.h"
31 #include <string>
32 
33 namespace otb
34 {
35 
51 template <class TImage, class TOutputVectorData>
52 class ITK_EXPORT PersistentImageToVectorDataFilter : public PersistentImageFilter<TImage, TImage>
53 {
54 public:
58  typedef itk::SmartPointer<Self> Pointer;
59  typedef itk::SmartPointer<const Self> ConstPointer;
60 
63 
64  typedef TImage InputImageType;
65  typedef typename InputImageType::Pointer InputImagePointer;
66  typedef typename InputImageType::RegionType RegionType;
67  typedef typename InputImageType::SizeType SizeType;
68  typedef typename InputImageType::IndexType IndexType;
69  typedef typename InputImageType::PixelType PixelType;
70  typedef typename InputImageType::InternalPixelType InternalPixelType;
71 
72  typedef TOutputVectorData OutputVectorDataType;
73  typedef typename TOutputVectorData::Pointer OutputVectorDataPointerType;
74 
75  typedef itk::ExtractImageFilter<InputImageType, InputImageType> ExtractImageFilterType;
76  typedef typename ExtractImageFilterType::Pointer ExtractImageFilterPointerType;
77 
80 
83 
85  typedef itk::DataObject::Pointer DataObjectPointer;
86 
87  OutputVectorDataType* GetOutputVectorData() const;
88 
89  void AllocateOutputs() override;
90 
91  void Reset(void) override;
92 
93  void Synthetize(void) override;
94 
96  itkSetStringMacro(FileName);
97  itkGetStringMacro(FileName);
99 
100 protected:
103  {
104  }
105 
106  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
107 
108  void GenerateData() override;
109 
111 
113 
114 private:
116  void operator=(const Self&) = delete;
117 
119 
121  std::string m_FileName;
122 
123 }; // end of class
124 } // end namespace otb
125 
126 #ifndef OTB_MANUAL_INSTANTIATION
128 #endif
129 
130 #endif
Produces a VectorData from the concatenation of several input vectordatas.
ImageIO object for reading and writing OGR format vector data.
itk::SmartPointer< Self > Pointer
This filter is the base class for all filter persisting data through multiple update....
Perform vectorization in a persistent way.
void operator=(const Self &)=delete
PersistentImageToVectorDataFilter(const Self &)=delete
PersistentImageFilter< TImage, TImage > Superclass
ConcatenateVectorDataFilterType::Pointer ConcatenateVectorDataFilterPointerType
itk::ExtractImageFilter< InputImageType, InputImageType > ExtractImageFilterType
virtual OutputVectorDataPointerType ProcessTile()=0
otb::ConcatenateVectorDataFilter< OutputVectorDataType > ConcatenateVectorDataFilterType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.