isce3 0.25.0
Loading...
Searching...
No Matches
GDALImage.h
Go to the documentation of this file.
1
9
10// code guard
11#ifndef __GDALIMAGE_H
12#define __GDALIMAGE_H
13
14// dependencies
15#include <string>
16#include <gdal_priv.h>
17#include <cpl_conv.h>
18
19
20class GDALImage{
21public:
22 // specify the types
23 using size_t = std::size_t;
24
25private:
26 int _height;
27 int _width;
28
29 void * _memPtr = NULL;
30
31 int _pixelSize;
32
33 int _isComplex;
34
35 size_t _bufferSize;
36 int _useMmap;
37
38 // GDAL temporary objects
39 GDALDataType _dataType;
40 CPLVirtualMem * _poBandVirtualMem = NULL;
41 GDALDataset * _poDataset = NULL;
42 GDALRasterBand * _poBand = NULL;
43
44public:
45 //disable default constructor
46 GDALImage() = delete;
47 // constructor
48 GDALImage(std::string fn, int band=1, int cacheSizeInGB=0, int useMmap=1);
49 // destructor
50 ~GDALImage();
51
52 // get class properties
53 void * getmemPtr()
54 {
55 return(_memPtr);
56 }
57
58 int getHeight() {
59 return (_height);
60 }
61
62 int getWidth()
63 {
64 return (_width);
65 }
66
67 int getPixelSize()
68 {
69 return _pixelSize;
70 }
71
72 bool isComplex()
73 {
74 return _isComplex;
75 }
76
77 // load data from cpu buffer to gpu
78 void loadToDevice(void *dArray, size_t h_offset, size_t w_offset, size_t h_tile, size_t w_tile, cudaStream_t stream);
79
80};
81
82#endif //__GDALIMAGE_H
83// end of file
~GDALImage()
destructor
Definition GDALImage.cu:155
void loadToDevice(void *dArray, size_t h_offset, size_t w_offset, size_t h_tile, size_t w_tile, cudaStream_t stream)
Load a tile of data h_tile x w_tile from CPU to GPU.
Definition GDALImage.cu:106

Generated for ISCE3.0 by doxygen 1.13.2.