OTB  6.7.0
Orfeo Toolbox
otbGDALDatasetWrapper.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 otbGDALDatasetWrapper_h
22 #define otbGDALDatasetWrapper_h
23 
24 #include "itkLightObject.h"
25 #include "itkObjectFactory.h"
26 
27 #include "otbConfigure.h"
28 
29 
30 class GDALDataset;
31 
32 
33 namespace otb
34 {
35 
36 // only two states : the Pointer is Null or GetDataSet() returns a
37 // valid dataset
39 {
41 
42 public:
46 
48  itkNewMacro(Self);
49 
51  itkTypeMacro(GDALImageIO, itk::LightObject);
52 
55  const GDALDataset * GetDataSet() const;
56  GDALDataset * GetDataSet();
58 
62  bool IsJPEG2000() const;
63 
66  int GetOverviewsCount() const;
67 
70  unsigned int GetWidth() const;
71 
74  unsigned int GetHeight() const;
75 
78  size_t GetPixelBytes() const;
79 
80 protected :
82 
83  ~GDALDatasetWrapper() override;
84 
85 
86 private:
87  GDALDataset * m_Dataset;
88 }; // end of GDALDatasetWrapper
89 
90 
91 } // end namespace otb
92 
93 
94 #endif // otbGDALDatasetWrapper_h
vcl_size_t GetPixelBytes() const
const GDALDataset * GetDataSet() const
int GetOverviewsCount() const
unsigned int GetHeight() const
bool IsJPEG2000() const
itk::SmartPointer< Self > Pointer
unsigned int GetWidth() const
Provide an unique instance of a GDALDataSet.
ImageIO object for reading and writing images with GDAL.
~GDALDatasetWrapper() override