OTB  10.0.0
Orfeo Toolbox
otbPersistentImageToOGRLayerFilter.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 otbPersistentImageToOGRLayerFilter_h
23 #define otbPersistentImageToOGRLayerFilter_h
24 
26 
28 #include "otbOGRLayerWrapper.h"
29 
30 #include "itkMacro.h"
31 #include <string>
32 
33 namespace otb
34 {
35 
50 template <class TImage>
51 class ITK_EXPORT PersistentImageToOGRLayerFilter : public PersistentImageFilter<TImage, TImage>
52 {
53 public:
57  typedef itk::SmartPointer<Self> Pointer;
58  typedef itk::SmartPointer<const Self> ConstPointer;
59 
62 
63  typedef TImage InputImageType;
64  typedef typename InputImageType::Pointer InputImagePointer;
65  typedef typename InputImageType::RegionType RegionType;
66  typedef typename InputImageType::SizeType SizeType;
67  typedef typename InputImageType::IndexType IndexType;
68  typedef typename InputImageType::PixelType PixelType;
69  typedef typename InputImageType::InternalPixelType InternalPixelType;
70 
75 
76  void AllocateOutputs() override;
77  void Reset(void) override;
78  void Synthetize(void) override;
79 
83  virtual void Initialize(void);
84 
89  itkGetMacro(StreamSize, SizeType);
90 
92  void SetOGRLayer(const OGRLayerType& ogrLayer);
93 
95  const OGRLayerType& GetOGRLayer(void) const;
96 
97 protected:
100 
101  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
102 
103  void GenerateData() override;
104 
105 
106 private:
108  void operator=(const Self&) = delete;
109 
111 
112  // The layer where to dump geometries
114 
116 }; // end of class
117 } // end namespace otb
118 
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
This filter is the base class for all filter persisting data through multiple update....
Perform vectorization in a persistent way.
InputImageType::InternalPixelType InternalPixelType
PersistentImageFilter< TImage, TImage > Superclass
PersistentImageToOGRLayerFilter(const Self &)=delete
void operator=(const Self &)=delete
virtual OGRDataSourcePointerType ProcessTile()=0
Collection of geometric objects.
itk::SmartPointer< Self > Pointer
Geometric object with descriptive fields.
Layer of geometric objects.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.