GLIMSView Source Code Documentation

InMemFormat Class Reference

#include <inmemformat.h>

Inheritance diagram for InMemFormat:

Inheritance graph
[legend]

List of all members.


Detailed Description

This is a special image format in that it does not implement a file based format.

Instead it holds a file based ImageFormat and masks its I/O routines with its own. At all times, the selected bands of an image will be held in memory instead of the usual file buffering that is done. This allows for faster access and display. The Image class uses this a little different then normal ImageFormat's.

Definition at line 24 of file inmemformat.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

 InMemFormat (ImageFormat *frmt, ImageState *imgstate)
 ~InMemFormat ()
void stateToMem ()
virtual bool open (std::string)
virtual void * getBand (int iband, int x1, int y1, int w1, int h1, int w2, int h2, ScaleType st=SCALE_BI) const
virtual void getLL (int iband, double &i, double &j)
virtual void getXY (int iband, double &i, double &j)
ImageFormatgetFormat ()
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

bool inMemSet (int iband)
char * getMemRect (int iband, int x, int y, int w, int h, int ow, int oh, ScaleType st) const
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

ImageFormatmEmulateFormat
ImageStatemImgState
std::vector< MemBandInfmMemBandSet
std::string mFName
std::vector< BandInfmBandSet
ImageInf mImageInf

Classes

struct  MemBandInf
 Structure to metadata about the bands in an image. More...

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

InMemFormat::InMemFormat ( ImageFormat frmt,
ImageState imgstate 
) [inline]

Definition at line 56 of file inmemformat.h.

References ImageFormat::getBandInfSet().

Here is the call graph for this function:

InMemFormat::~InMemFormat (  )  [inline]

Definition at line 63 of file inmemformat.h.


Member Function Documentation

bool InMemFormat::inMemSet ( int  iband  )  [inline, protected]

Definition at line 44 of file inmemformat.h.

Referenced by stateToMem().

char * InMemFormat::getMemRect ( int  iband,
int  x,
int  y,
int  w,
int  h,
int  ow,
int  oh,
ScaleType  st 
) const [protected]

Definition at line 4 of file inmemformat.cpp.

References mMemBandSet, and ImageFormat::scaleData().

Referenced by getBand().

Here is the call graph for this function:

void InMemFormat::stateToMem (  ) 

virtual bool InMemFormat::open ( std::string   )  [inline, virtual]

Implements ImageFormat.

Definition at line 71 of file inmemformat.h.

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

Implements ImageFormat.

Definition at line 89 of file inmemformat.cpp.

References ImageFormat::getBand(), getMemRect(), mEmulateFormat, and mMemBandSet.

Here is the call graph for this function:

virtual void InMemFormat::getLL ( int  iband,
double &  i,
double &  j 
) [inline, virtual]

Implements ImageFormat.

Definition at line 84 of file inmemformat.h.

virtual void InMemFormat::getXY ( int  iband,
double &  i,
double &  j 
) [inline, virtual]

Implements ImageFormat.

Definition at line 88 of file inmemformat.h.

ImageFormat* InMemFormat::getFormat (  )  [inline]

Definition at line 92 of file inmemformat.h.

Referenced by Image::setMemBuf().

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]

Definition at line 198 of file imageformat.cpp.

Referenced by NlapsFrmt::getBand(), HdfEosFrmt::getBand(), and getMemRect().

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

Definition at line 39 of file inmemformat.h.

Referenced by getBand(), and stateToMem().

Definition at line 40 of file inmemformat.h.

Referenced by stateToMem().

std::vector<MemBandInf> InMemFormat::mMemBandSet [protected]

Definition at line 42 of file inmemformat.h.

Referenced by getBand(), getMemRect(), and stateToMem().

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