VAPOR3 3.9.4
GeoImageGeoTiff.h
Go to the documentation of this file.
1
2#ifndef _GeoImageGeoTiff_h_
3#define _GeoImageGeoTiff_h_
4
5#ifdef WIN32
6 #include <geotiff/xtiffio.h>
7 #include <geotiff/geotiff.h>
8#else
9 #include <xtiffio.h>
10 #include <geotiff.h>
11#endif
12#include <vapor/MyBase.h>
13#include <vapor/UDUnitsClass.h>
14#include "GeoImage.h"
15
16namespace VAPoR {
17
22//
24public:
27
28 int Initialize(string path, vector<double> times);
29
30 unsigned char *GetImage(size_t ts, size_t &width, size_t &height);
31
32 unsigned char *GetImage(size_t ts, const double pcsExtentsReq[4], string proj4StringReq, size_t maxWidthReq, size_t maxHeightReq, double pcsExtentsImg[4], double geoCornersImg[8],
33 string &proj4StringImg, size_t &width, size_t &height);
34
35private:
36 string _proj4String;
37 std::vector<double> _tiffTimes;
38 std::vector<double> _times;
39 unsigned char * _texture; // storage for texture image
40 size_t _textureSize; // Texture size. No smart buffers :-(
41
42 string _getProjectionFromGTIF(GTIF *gtifHandle) const;
43
44 void _initTimeVector(TIFF *tif, const vector<double> &times);
45
46 bool _getTiffTime(TIFF *tif, UDUnits *udunits, double &tifftime) const;
47
48 int _getBestDirNum(size_t ts) const;
49
50 int _getGTIFInfo(TIFF *tif, size_t width, size_t height, double pcsExtents[4], double geoCorners[8], string &proj4String) const;
51
52 bool _extractSubtexture(unsigned char *texture, size_t width, size_t height, const double pcsExtentsReq[4], string proj4StringReq, const double pcsExtentsImg[4], const double geoCornersImg[8],
53 string proj4StringImg, string &subProj4StringImg, size_t &subWidth, size_t &subHeight, double subPCSExtentsImg[4], double subGeoCornersImg[8]) const;
54};
55
56}; // namespace VAPoR
57#endif
A class for managing GeoTiff images.
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)
unsigned char * GetImage(size_t ts, size_t &width, size_t &height)
int Initialize(string path, vector< double > times)
An abstract class for managing geo-referenced images.
Definition: GeoImage.h:20
#define RENDER_API
Definition: common.h:78