GLIMSView Source Code Documentation

NlapsFrmt Class Reference

#include <nlapsfrmt.h>

Inheritance diagram for NlapsFrmt:

Inheritance graph
[legend]

List of all members.


Detailed Description

NLAPS image format.

Definition at line 14 of file nlapsfrmt.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

virtual bool open (std::string fname)
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)
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)

Static Public Attributes

static const std::string GCTPProjMap []
 Map of projection information.
static const char * GCTPParmMap [][15]
 Map of image parameter information.

Protected Member Functions

std::vector< std::string > getValue (std::string id)
bool readFile ()
bool getToken (std::string str, const std::string delim, int n, std::string &tok)
std::string trimStr (std::string str)
void fillHeader ()
void fillBandInf ()
void fillImageInf ()
 Pull out associated image metadata of an image and store in ImageInf.
std::string formatDateTime (std::string)
double parseDeg (std::string deg)
std::vector< std::string > getProjParms (std::vector< std::string > &, int)
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

std::string mText
Header mHead
std::vector< std::string > mBFNameSet
std::string mFName
std::vector< BandInfmBandSet
ImageInf mImageInf

Classes

struct  Header
 Structure to hold header information from the 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.


Member Function Documentation

std::vector< std::string > NlapsFrmt::getValue ( std::string  id  )  [protected]

Definition at line 186 of file nlapsfrmt.cpp.

References getToken(), mText, and trimStr().

Referenced by fillBandInf(), fillHeader(), and fillImageInf().

Here is the call graph for this function:

bool NlapsFrmt::readFile (  )  [protected]

Definition at line 162 of file nlapsfrmt.cpp.

References ImageFormat::mFName, and mText.

Referenced by open().

bool NlapsFrmt::getToken ( std::string  str,
const std::string  delim,
int  n,
std::string &  tok 
) [protected]

Definition at line 352 of file nlapsfrmt.cpp.

Referenced by getValue().

std::string NlapsFrmt::trimStr ( std::string  str  )  [protected]

Definition at line 374 of file nlapsfrmt.cpp.

Referenced by getValue().

void NlapsFrmt::fillHeader (  )  [protected]

void NlapsFrmt::fillBandInf (  )  [protected]

void NlapsFrmt::fillImageInf (  )  [protected]

Pull out associated image metadata of an image and store in ImageInf.

History:
2005-08-20 dls modified to not overwrite image acquisition date read in from project file

Definition at line 300 of file nlapsfrmt.cpp.

References formatDateTime(), getValue(), ImageInf::mAquiDateTime, ImageFormat::mBandSet, ImageInf::mCenterLat, ImageInf::mCenterLon, ImageFormat::mImageInf, ImageInf::mProjection, and ImageFormat::xyToLL().

Referenced by open().

Here is the call graph for this function:

std::string NlapsFrmt::formatDateTime ( std::string  str  )  [protected]

Definition at line 320 of file nlapsfrmt.cpp.

Referenced by fillImageInf().

double NlapsFrmt::parseDeg ( std::string  deg  )  [protected]

Definition at line 333 of file nlapsfrmt.cpp.

Referenced by fillHeader().

std::vector< std::string > NlapsFrmt::getProjParms ( std::vector< std::string > &  raw,
int  gctpid 
) [protected]

Definition at line 402 of file nlapsfrmt.cpp.

References GCTPParmMap.

Referenced by fillBandInf().

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

Implements ImageFormat.

Definition at line 76 of file nlapsfrmt.cpp.

References fillBandInf(), fillHeader(), fillImageInf(), ImageFormat::mFName, and readFile().

Referenced by L7A_Nlaps::open(), and Image::openImage().

Here is the call graph for this function:

void * NlapsFrmt::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 87 of file nlapsfrmt.cpp.

References ImageFormat::dtypeSize(), ImageFormat::mBandSet, mBFNameSet, ImageFormat::mFName, and ImageFormat::scaleData().

Here is the call graph for this function:

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

Implements ImageFormat.

Definition at line 150 of file nlapsfrmt.cpp.

References ImageFormat::xyToLL().

Here is the call graph for this function:

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

Implements ImageFormat.

Definition at line 156 of file nlapsfrmt.cpp.

References ImageFormat::llToXY().

Here is the call graph for this function:

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 fillImageInf(), 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 getXY(), and HdfEosFrmt::getXY().

Here is the call graph for this function:

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

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

Definition at line 663 of file imageformat.cpp.

References ImageFormat::llToMeter(), ImageFormat::mBandSet, ImageFormat::BandInf::proj, ImageFormat::BandInf::ulx, and ImageFormat::BandInf::uly.

Referenced by fillBandInf(), and HdfEosFrmt::open().

Here is the call graph for this function:

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 getBand(), HdfEosFrmt::getBand(), and InMemFormat::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

const std::string NlapsFrmt::GCTPProjMap [static]

Map of projection information.

Definition at line 19 of file nlapsfrmt.h.

Referenced by fillBandInf().

const char * NlapsFrmt::GCTPParmMap [static]

Map of image parameter information.

Definition at line 23 of file nlapsfrmt.h.

Referenced by getProjParms().

std::string NlapsFrmt::mText [protected]

Definition at line 38 of file nlapsfrmt.h.

Referenced by getValue(), and readFile().

Header NlapsFrmt::mHead [protected]

Definition at line 39 of file nlapsfrmt.h.

Referenced by fillBandInf(), and fillHeader().

std::vector<std::string> NlapsFrmt::mBFNameSet [protected]

Definition at line 40 of file nlapsfrmt.h.

Referenced by fillBandInf(), and getBand().

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