#include <nlapsfrmt.h>
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 BandInf & | getBandInf (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 |
ImageInf & | getImageInf () |
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< BandInf > | mBandSet |
ImageInf | mImageInf |
Classes | |
struct | Header |
Structure to hold header information from the image. More... |
enum ImageFormat::ScaleType [inherited] |
enum ImageFormat::DataType [inherited] |
Definition at line 45 of file imageformat.h.
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().
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] |
std::string NlapsFrmt::trimStr | ( | std::string | str | ) | [protected] |
void NlapsFrmt::fillHeader | ( | ) | [protected] |
Definition at line 217 of file nlapsfrmt.cpp.
References NlapsFrmt::Header::bsq, NlapsFrmt::Header::datum, NlapsFrmt::Header::gctpID, getValue(), mHead, parseDeg(), NlapsFrmt::Header::ul_lat, NlapsFrmt::Header::ul_lon, and NlapsFrmt::Header::utmz.
Referenced by open().
void NlapsFrmt::fillBandInf | ( | ) | [protected] |
Definition at line 240 of file nlapsfrmt.cpp.
References ImageFormat::FLOAT32, NlapsFrmt::Header::gctpID, GCTPProjMap, getProjParms(), ImageFormat::getULCorners(), getValue(), ImageFormat::BandInf::height, ImageFormat::INT16, ImageFormat::INT32, ImageFormat::mBandSet, mBFNameSet, mHead, ImageFormat::BandInf::name, ImageFormat::BandInf::ndims, ImageFormat::NOT_DEFINED, ImageFormat::BandInf::parms, ImageFormat::BandInf::proj, ImageFormat::BandInf::res, ImageFormat::BandInf::rot, ImageFormat::BandInf::type, ImageFormat::UINT8, NlapsFrmt::Header::ul_lat, NlapsFrmt::Header::ul_lon, ImageFormat::BandInf::ulx, ImageFormat::BandInf::uly, NlapsFrmt::Header::utmz, ImageFormat::BandInf::UTMZ, and ImageFormat::BandInf::width.
Referenced by open().
void NlapsFrmt::fillImageInf | ( | ) | [protected] |
Pull out associated image metadata of an image and store in ImageInf.
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().
std::string NlapsFrmt::formatDateTime | ( | std::string | str | ) | [protected] |
double NlapsFrmt::parseDeg | ( | std::string | deg | ) | [protected] |
std::vector< std::string > NlapsFrmt::getProjParms | ( | std::vector< std::string > & | raw, | |
int | gctpid | |||
) | [protected] |
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().
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().
void NlapsFrmt::getLL | ( | int | iband, | |
double & | i, | |||
double & | j | |||
) | [virtual] |
Implements ImageFormat.
Definition at line 150 of file nlapsfrmt.cpp.
References ImageFormat::xyToLL().
void NlapsFrmt::getXY | ( | int | iband, | |
double & | i, | |||
double & | j | |||
) | [virtual] |
Implements ImageFormat.
Definition at line 156 of file nlapsfrmt.cpp.
References ImageFormat::llToXY().
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().
void ImageFormat::xyToMeter | ( | int | iband, | |
double & | x, | |||
double & | y | |||
) | [protected, inherited] |
Definition at line 493 of file imageformat.cpp.
References M_PI, ImageFormat::mBandSet, ImageFormat::BandInf::proj, ImageFormat::BandInf::res, ImageFormat::BandInf::rot, ImageFormat::BandInf::ulx, and ImageFormat::BandInf::uly.
Referenced by ImageFormat::xyToLL().
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().
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().
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().
projPJ ImageFormat::createProj | ( | int | iband | ) | [protected, inherited] |
Definition at line 629 of file imageformat.cpp.
References ImageFormat::mBandSet, ImageFormat::mParms, ImageFormat::BandInf::parms, ImageFormat::BandInf::proj, and ImageFormat::BandInf::UTMZ.
Referenced by ImageFormat::llToMeter(), and ImageFormat::meterToLL().
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().
std::vector< ImageFormat::BandInf > & ImageFormat::getBandInfSet | ( | ) | [inherited] |
Definition at line 20 of file imageformat.cpp.
References ImageFormat::mBandSet.
Referenced by Image::getBandInfSet(), Image::getRect(), Image::height(), Image::Image(), InMemFormat::InMemFormat(), L7A_Nlaps::open(), L7A_Fast::open(), InMemFormat::stateToMem(), and Image::width().
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] |
Definition at line 32 of file imageformat.cpp.
References ImageFormat::FLOAT16, ImageFormat::FLOAT32, ImageFormat::FLOAT64, ImageFormat::INT16, ImageFormat::INT32, ImageFormat::INT64, ImageFormat::INT8, ImageFormat::NOT_DEFINED, ImageFormat::UINT16, ImageFormat::UINT32, ImageFormat::UINT64, and ImageFormat::UINT8.
Referenced by BandChooserDlg::reloadList().
int ImageFormat::dtypeSize | ( | ImageFormat::DataType | dt | ) | [static, inherited] |
Definition at line 92 of file imageformat.cpp.
References ImageFormat::FLOAT16, ImageFormat::FLOAT32, ImageFormat::FLOAT64, ImageFormat::INT16, ImageFormat::INT32, ImageFormat::INT64, ImageFormat::INT8, ImageFormat::NOT_DEFINED, ImageFormat::UINT16, ImageFormat::UINT32, ImageFormat::UINT64, and ImageFormat::UINT8.
Referenced by getBand(), HdfEosFrmt::getBand(), and InMemFormat::stateToMem().
bool ImageFormat::isFloat | ( | ImageFormat::DataType | dt | ) | [static, inherited] |
Definition at line 152 of file imageformat.cpp.
References ImageFormat::INT16, ImageFormat::INT32, ImageFormat::INT64, ImageFormat::INT8, ImageFormat::NOT_DEFINED, ImageFormat::UINT16, ImageFormat::UINT32, ImageFormat::UINT64, and ImageFormat::UINT8.
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] |
Definition at line 209 of file imageformat.cpp.
References ImageFormat::FLOAT32, ImageFormat::FLOAT64, ImageFormat::INT16, ImageFormat::INT8, ImageFormat::SCALE_BI, ImageFormat::SCALE_NN, ImageFormat::scl_bilinear(), ImageFormat::scl_nearestneighbor(), ImageFormat::UINT16, and ImageFormat::UINT8.
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] |
Definition at line 322 of file imageformat.cpp.
References ImageFormat::SCALE_BC, ImageFormat::SCALE_BI, and ImageFormat::SCALE_NN.
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] |
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] |
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.
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] |
Header NlapsFrmt::mHead [protected] |
std::vector<std::string> NlapsFrmt::mBFNameSet [protected] |
std::string ImageFormat::mFName [protected, inherited] |
Definition at line 86 of file imageformat.h.
Referenced by getBand(), HdfEosFrmt::getBandMetaData(), ImageFormat::getName(), open(), HdfEosFrmt::open(), GDALFrmt::open(), and readFile().
std::vector<BandInf> ImageFormat::mBandSet [protected, inherited] |
Definition at line 87 of file imageformat.h.
Referenced by ImageFormat::createProj(), fillBandInf(), fillImageInf(), getBand(), L7A_Nlaps::getBand(), L7A_Geotiff::getBand(), L7A_Fast::getBand(), HdfEosFrmt::getBand(), GDALFrmt::getBand(), ImageFormat::getBandInf(), ImageFormat::getBandInfSet(), HdfEosFrmt::getBandMetaData(), L7A_Nlaps::getFrmt(), L7A_Fast::getFrmt(), L7A_Nlaps::getLL(), L7A_Geotiff::getLL(), L7A_Fast::getLL(), HdfEosFrmt::getLL(), ImageFormat::getULCorners(), L7A_Nlaps::getXY(), L7A_Geotiff::getXY(), L7A_Fast::getXY(), HdfEosFrmt::getXY(), ImageFormat::llToMeter(), ImageFormat::llToXY(), ImageFormat::meterToLL(), L7A_Nlaps::open(), L7A_Geotiff::open(), L7A_Fast::open(), HdfEosFrmt::open(), GDALFrmt::open(), ImageFormat::setCornerPnts(), ImageFormat::xyToLL(), and ImageFormat::xyToMeter().
ImageInf ImageFormat::mImageInf [protected, inherited] |
Definition at line 88 of file imageformat.h.
Referenced by fillImageInf(), L7A_Nlaps::open(), L7A_Geotiff::open(), L7A_Fast::open(), HdfEosFrmt::open(), and GDALFrmt::open().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |