VAPOR3 3.9.4
GeoImage.h
Go to the documentation of this file.
1
2#ifndef _GeoImage_h_
3#define _GeoImage_h_
4
5#ifdef WIN32
6 #include <geotiff/xtiffio.h>
7#else
8 #include <xtiffio.h>
9#endif
10
11#include <vapor/MyBase.h>
12
13namespace VAPoR {
14
19//
21public:
23
26 //
27 GeoImage(int pixelsize, int nbands);
28
29 virtual ~GeoImage();
30
41 //
42 virtual int Initialize(string path, std::vector<double> times) = 0;
43
56 virtual unsigned char *GetImage(size_t ts, size_t &width, size_t &height) = 0;
57
89 //
90 virtual unsigned char *GetImage(size_t ts, const double pcsExtentsReq[4], string proj4StringReq, size_t maxWidthReq, size_t maxHeightReq, double pcsExtentsImg[4], double geoCornersImg[8],
91 string &proj4StringImg, size_t &width, size_t &height) = 0;
92
93protected:
96
97 // Support routines for reading tiff images
98 //
99 int TiffOpen(string path);
100 void TiffClose();
101
102 int TiffGetImageDimensions(int dirnum, size_t &width, size_t &height) const;
103
104 int TiffReadImage(int dirnum, unsigned char *texture) const;
105
106 TIFF *TiffGetHandle() const { return (_tif); }
107
108 int CornerExtents(const double srccoords[4], double dstcoords[4], string proj4src) const;
109
110private:
111 TIFF * _tif;
112 string _path;
113};
114}; // namespace VAPoR
115
116#endif
An abstract class for managing geo-referenced images.
Definition: GeoImage.h:20
virtual int Initialize(string path, std::vector< double > times)=0
virtual unsigned char * GetImage(size_t ts, const double pcsExtentsReq[4], string proj4StringReq, size_t maxWidthReq, size_t maxHeightReq, double pcsExtentsImg[4], double geoCornersImg[8], string &proj4StringImg, size_t &width, size_t &height)=0
GeoImage(int pixelsize, int nbands)
int TiffOpen(string path)
virtual ~GeoImage()
virtual unsigned char * GetImage(size_t ts, size_t &width, size_t &height)=0
int TiffReadImage(int dirnum, unsigned char *texture) const
int TiffGetImageDimensions(int dirnum, size_t &width, size_t &height) const
TIFF * TiffGetHandle() const
Definition: GeoImage.h:106
int CornerExtents(const double srccoords[4], double dstcoords[4], string proj4src) const
Wasp base class.
Definition: MyBase.h:67
#define RENDER_API
Definition: common.h:78