VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VAPoR::GeoImage Class Referenceabstract

An abstract class for managing geo-referenced images. More...

#include <GeoImage.h>

Inheritance diagram for VAPoR::GeoImage:
Wasp::MyBase VAPoR::GeoImageGeoTiff VAPoR::GeoImageTMS

Public Member Functions

 GeoImage ()
 
 GeoImage (int pixelsize, int nbands)
 
virtual ~GeoImage ()
 
virtual int Initialize (string path, std::vector< double > times)=0
 
virtual unsigned char * GetImage (size_t ts, size_t &width, size_t &height)=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
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

int TiffOpen (string path)
 
void TiffClose ()
 
int TiffGetImageDimensions (int dirnum, size_t &width, size_t &height) const
 
int TiffReadImage (int dirnum, unsigned char *texture) const
 
TIFF * TiffGetHandle () const
 
int CornerExtents (const double srccoords[4], double dstcoords[4], string proj4src) const
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Protected Attributes

int _pixelsize
 
int _nbands
 

Additional Inherited Members

- Public Types inherited from Wasp::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Member Functions inherited from Wasp::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message.
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code.
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code.
 
static int GetErrCode ()
 Retrieve the current error code.
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message.
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
static bool GetEnableErrMsg ()
 
- Static Public Attributes inherited from Wasp::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 

Detailed Description

An abstract class for managing geo-referenced images.

Author
John Clyne

Definition at line 20 of file GeoImage.h.

Constructor & Destructor Documentation

◆ GeoImage() [1/2]

VAPoR::GeoImage::GeoImage ( )

◆ GeoImage() [2/2]

VAPoR::GeoImage::GeoImage ( int  pixelsize,
int  nbands 
)
Parameters
[in]pixelsizeSize, in bits, of returned pixel channel
[i]nbands Number of channel in a returned image

◆ ~GeoImage()

virtual VAPoR::GeoImage::~GeoImage ( )
virtual

Member Function Documentation

◆ CornerExtents()

int VAPoR::GeoImage::CornerExtents ( const double  srccoords[4],
double  dstcoords[4],
string  proj4src 
) const
protected

◆ GetImage() [1/2]

virtual unsigned char * VAPoR::GeoImage::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 
)
pure virtual

Fetch a georeferenced image

Parameters
[in]tstime step
[in]pcsExtentsReqA four-element array containing the extents (llx, lly, urx, ury) of the requested region in Projected Coordinates.
[in]proj4StringReqThe Proj4 string that maps lat-long coordinates into the PCS coordinates used in pcsExtentsReq.
[in]maxWidthReqThe requested maximum width in pixels of the returned image
[in]maxHeightReqThe requested maximum height in pixels of the returned image
[out]pcsExtentsImgA four-element array containing the extents (llx, lly, urx, ury) of the returned image map in Projected Coordinates of the image.
[out]geoCornersImgAn eight-element array containing the corner points (llx, lly, ulx, uly, urx, ury, lrx, lry) of the returned image map in Geographic coordinates
[out]widthThe actual width in pixels of the returned image
[out]heightThe actual height in pixels of the returned image
Return values
imageUpon success at 2D texture with n channels (See GeoImage::GeoImage()) is returned. Memory for the returned image is managed by the class, and should not be freed.

Implemented in VAPoR::GeoImageGeoTiff, and VAPoR::GeoImageTMS.

◆ GetImage() [2/2]

virtual unsigned char * VAPoR::GeoImage::GetImage ( size_t  ts,
size_t &  width,
size_t &  height 
)
pure virtual

Fetch a non-georeferenced image

Return an image without any geo-referencing information.

Parameters
[in]tstime step of image
[out]widthWidth in pixels of returned image
[out]heightHeight in pixels of returned image
Return values
imageUpon success at 2D texture with n channels (See GeoImage::GeoImage()) is returned. Memory for the returned image is managed by the class, and should not be freed.

Implemented in VAPoR::GeoImageGeoTiff, and VAPoR::GeoImageTMS.

◆ Initialize()

virtual int VAPoR::GeoImage::Initialize ( string  path,
std::vector< double >  times 
)
pure virtual

Initialize the class

Parameters
[in]pathPath to file or directory containing image database
[in]timesTimes coordinate variable. If image database contains time-varying images the time stamps of the images will be compared against times and the best match will be returned
Return values
statusreturn -1 on failure

◆ TiffClose()

void VAPoR::GeoImage::TiffClose ( )
protected

◆ TiffGetHandle()

TIFF * VAPoR::GeoImage::TiffGetHandle ( ) const
inlineprotected

Definition at line 106 of file GeoImage.h.

◆ TiffGetImageDimensions()

int VAPoR::GeoImage::TiffGetImageDimensions ( int  dirnum,
size_t &  width,
size_t &  height 
) const
protected

◆ TiffOpen()

int VAPoR::GeoImage::TiffOpen ( string  path)
protected

◆ TiffReadImage()

int VAPoR::GeoImage::TiffReadImage ( int  dirnum,
unsigned char *  texture 
) const
protected

Member Data Documentation

◆ _nbands

int VAPoR::GeoImage::_nbands
protected

Definition at line 95 of file GeoImage.h.

◆ _pixelsize

int VAPoR::GeoImage::_pixelsize
protected

Definition at line 94 of file GeoImage.h.


The documentation for this class was generated from the following file: