GLIMSView Source Code Documentation

GDALFrmt Class Reference

#include <gdalfrmt.h>

Inheritance diagram for GDALFrmt:

Inheritance graph
[legend]

List of all members.


Detailed Description

ImageFormat implementation providing an interface to the GDAL library.

Information about the GDAL library can be found at http://www.remotesensing.org/gdal/.

History:
2006-01-09 dls - Altered open function to pull fill in more metadata from image in ImageInf structure

Definition at line 24 of file gdalfrmt.h.


Public Types

enum  ScaleType { SCALE_NN = 1, SCALE_BI, SCALE_BC }
enum  DataType {
  NOT_DEFINED, INT8, UINT8, INT16,
  UINT16, INT32, UINT32, INT64,
  UINT64, FLOAT16, FLOAT32, FLOAT64
}

Public Member Functions

 GDALFrmt ()
virtual ~GDALFrmt ()
virtual void * getBand (int iband, int x1, int y1, int w1, int h1, int w2, int h2, ScaleType st=SCALE_NN) const
virtual void getLL (int iBand, double &i, double &j)
virtual void getXY (int iBand, double &i, double &j)
virtual bool open (std::string fname)
std::vector< BandInf > & getBandInfSet ()
unsigned int getNumBands ()
const BandInfgetBandInf (int iband)
std::string getName () const
char * scaleData (char **orig, int ow, int oh, int nw, int nh, DataType dt, ScaleType st, bool del=true) const
char * scaleData (char **orig, int ox, int oy, int ow, int oh, int fw, int fh, int nw, int nh, DataType dt, ScaleType st, bool del=true) const
template<class DType>
DType * scaleDT (DType *orig, int ox, int oy, int ow, int oh, int fw, int fh, int nw, int nh, ScaleType st) const
template<typename DType>
DType * scl_nearestneighbor (DType *orig, int ox, int oy, int ow, int oh, int fw, int fh, int nw, int nh) const
template<class DType>
DType * scl_bilinear (DType *orig, int ox, int oy, int ow, int oh, int fw, int fh, int nw, int nh) const
unsigned char * scl_bicubic (unsigned char *orig, int ow, int oh, int nw, int nh, int szd) const
ImageInfgetImageInf ()
void setCornerPnts (int iband, ImageInf &inf)

Static Public Member Functions

static std::string dtypeToString (DataType dt)
static int dtypeSize (DataType dt)
static bool isFloat (DataType dt)

Protected Member Functions

void xyToLL (int iband, double &x, double &y)
void xyToMeter (int iband, double &x, double &y)
void meterToLL (int iband, double &x, double &y)
void llToMeter (int iband, double &lon, double &lat)
void llToXY (int iband, double &lon, double &lat)
projPJ createProj (int iband)
void getULCorners ()

Protected Attributes

GDALDataset * mDataSet
std::string mFName
std::vector< BandInfmBandSet
ImageInf mImageInf

Member Enumeration Documentation

enum ImageFormat::ScaleType [inherited]

Enumerator:
SCALE_NN 
SCALE_BI 
SCALE_BC 

Definition at line 39 of file imageformat.h.

enum ImageFormat::DataType [inherited]

Enumerator:
NOT_DEFINED 
INT8 
UINT8 
INT16 
UINT16 
INT32 
UINT32 
INT64 
UINT64 
FLOAT16 
FLOAT32 
FLOAT64 

Definition at line 45 of file imageformat.h.


Constructor & Destructor Documentation

GDALFrmt::GDALFrmt (  ) 

Definition at line 5 of file gdalfrmt.cpp.

References mDataSet.

GDALFrmt::~GDALFrmt (  )  [virtual]

Definition at line 10 of file gdalfrmt.cpp.

References mDataSet.


Member Function Documentation

void * GDALFrmt::getBand ( int  iband,
int  x1,
int  y1,
int  w1,
int  h1,
int  w2,
int  h2,
ScaleType  st = SCALE_NN 
) const [virtual]

void GDALFrmt::getLL ( int  iBand,
double &  i,
double &  j 
) [virtual]

Implements ImageFormat.

Definition at line 59 of file gdalfrmt.cpp.

References mDataSet.

Referenced by open().

void GDALFrmt::getXY ( int  iBand,
double &  i,
double &  j 
) [virtual]

Implements ImageFormat.

Definition at line 94 of file gdalfrmt.cpp.

References mDataSet.

bool GDALFrmt::open ( std::string  fname  )  [virtual]

void ImageFormat::xyToLL ( int  iband,
double &  x,
double &  y 
) [protected, inherited]

Definition at line 618 of file imageformat.cpp.

References ImageFormat::mBandSet, ImageFormat::meterToLL(), and ImageFormat::xyToMeter().

Referenced by NlapsFrmt::fillImageInf(), NlapsFrmt::getLL(), and HdfEosFrmt::getLL().

Here is the call graph for this function:

void ImageFormat::xyToMeter ( int  iband,
double &  x,
double &  y 
) [protected, inherited]

void ImageFormat::meterToLL ( int  iband,
double &  x,
double &  y 
) [protected, inherited]

Definition at line 533 of file imageformat.cpp.

References ImageFormat::createProj(), and ImageFormat::mBandSet.

Referenced by ImageFormat::xyToLL().

Here is the call graph for this function:

void ImageFormat::llToMeter ( int  iband,
double &  lon,
double &  lat 
) [protected, inherited]

Definition at line 550 of file imageformat.cpp.

References ImageFormat::createProj(), and ImageFormat::mBandSet.

Referenced by ImageFormat::getULCorners(), and ImageFormat::llToXY().

Here is the call graph for this function:

void ImageFormat::llToXY ( int  iband,
double &  lon,
double &  lat 
) [protected, inherited]

Definition at line 568 of file imageformat.cpp.

References ImageFormat::llToMeter(), M_PI, and ImageFormat::mBandSet.

Referenced by NlapsFrmt::getXY(), and HdfEosFrmt::getXY().

Here is the call graph for this function:

projPJ ImageFormat::createProj ( int  iband  )  [protected, inherited]

void ImageFormat::getULCorners (  )  [protected, inherited]

std::vector< ImageFormat::BandInf > & ImageFormat::getBandInfSet (  )  [inherited]

unsigned int ImageFormat::getNumBands (  )  [inline, inherited]

Definition at line 123 of file imageformat.h.

Referenced by ImageInterface::getBands(), L7A_Nlaps::getFrmt(), and L7A_Fast::getFrmt().

const ImageFormat::BandInf & ImageFormat::getBandInf ( int  iband  )  [inherited]

Definition at line 24 of file imageformat.cpp.

References ImageFormat::mBandSet.

Referenced by L7A_Geotiff::open().

std::string ImageFormat::getName (  )  const [inherited]

Definition at line 28 of file imageformat.cpp.

References ImageFormat::mFName.

Referenced by HdfEosFrmt::getBandMetaData(), and Image::getName().

std::string ImageFormat::dtypeToString ( ImageFormat::DataType  dt  )  [static, inherited]

int ImageFormat::dtypeSize ( ImageFormat::DataType  dt  )  [static, inherited]

bool ImageFormat::isFloat ( ImageFormat::DataType  dt  )  [static, inherited]

char * ImageFormat::scaleData ( char **  orig,
int  ow,
int  oh,
int  nw,
int  nh,
DataType  dt,
ScaleType  st,
bool  del = true 
) const [inherited]

char * ImageFormat::scaleData ( char **  orig,
int  ox,
int  oy,
int  ow,
int  oh,
int  fw,
int  fh,
int  nw,
int  nh,
DataType  dt,
ScaleType  st,
bool  del = true 
) const [inherited]

template<class DType>
DType * ImageFormat::scaleDT ( DType *  orig,
int  ox,
int  oy,
int  ow,
int  oh,
int  fw,
int  fh,
int  nw,
int  nh,
ScaleType  st 
) const [inline, inherited]

template<typename DType>
DType * ImageFormat::scl_nearestneighbor ( DType *  orig,
int  ox,
int  oy,
int  ow,
int  oh,
int  fw,
int  fh,
int  nw,
int  nh 
) const [inline, inherited]

Definition at line 354 of file imageformat.cpp.

Referenced by ImageFormat::scaleData().

template<class DType>
DType * ImageFormat::scl_bilinear ( DType *  orig,
int  ox,
int  oy,
int  ow,
int  oh,
int  fw,
int  fh,
int  nw,
int  nh 
) const [inline, inherited]

Definition at line 399 of file imageformat.cpp.

Referenced by ImageFormat::scaleData().

unsigned char * ImageFormat::scl_bicubic ( unsigned char *  orig,
int  ow,
int  oh,
int  nw,
int  nh,
int  szd 
) const [inherited]

Definition at line 454 of file imageformat.cpp.

ImageInf& ImageFormat::getImageInf (  )  [inline, inherited]

Definition at line 197 of file imageformat.h.

void ImageFormat::setCornerPnts ( int  iband,
ImageInf inf 
) [inherited]

Definition at line 463 of file imageformat.cpp.

References ImageFormat::getLL(), ImageFormat::mBandSet, ImageInf::mP1, ImageInf::mP2, ImageInf::mP3, ImageInf::mP4, Node::x, Node::y, and Node::z.

Here is the call graph for this function:


Member Data Documentation

GDALDataset* GDALFrmt::mDataSet [protected]

Definition at line 26 of file gdalfrmt.h.

Referenced by GDALFrmt(), getBand(), getLL(), getXY(), open(), and ~GDALFrmt().

std::string ImageFormat::mFName [protected, inherited]

std::vector<BandInf> ImageFormat::mBandSet [protected, inherited]

ImageInf ImageFormat::mImageInf [protected, inherited]


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

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov