WXP C++ Library Version 6.74.9
|
This class decodes McIDAS AREA files. More...
#include "../include/AreaFile.h"
Public Member Functions | |
AreaFile () | |
int | init () |
int | open (const char *filename) |
bool | isOpen () |
int | rewind () |
int | close () |
int | setCalibration (const char *str) |
unsigned int | readWord () |
unsigned char | readByte () |
int | getSync () |
int | calcDomain (DomainVal &dom) |
int | getImageDate (Date &date) |
int | getImageDate () |
int | getComment (String &str) |
int | getSatId () |
int | getLineCor () |
int | getElemCor () |
int | getLineRes () |
int | getElemRes () |
int | getLineSize () |
int | getElemSize () |
int | getBands () |
int | getFilterMap () |
int | getImageId () |
const char * | getNavType () |
int | read (Image &image) |
int | readHeader () |
int | readHeader (Image &image) |
int | readData (Image &image) |
int | print () |
int | printNav () |
int | printGvar () |
This class decodes McIDAS AREA files.
This class reads in a decodes parameters in a McIDAS AREA file. Parameters are stored internally and used to output an Image object that can be manipulated or displayed.
AreaFile::AreaFile | ( | ) |
Constructor. Initializes data.
References init().
int AreaFile::calcDomain | ( | DomainVal & | dv | ) |
Computes domain specification from Area header data
dv | Domain information |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::Domain::earth_rad, WXP::DomainVal::ellipse, WXP::StrLib::equal(), WXP::Gvar::getElevDelta(), WXP::Gvar::getScanDelta(), WXP::Wxp::isDebug(), WXP::Domain::LAMB, WXP::EarthPoint::lat, WXP::Domain::LATLON, WXP::EarthPoint::lon, WXP::Domain::MERC, WXP::Domain::MOLL, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::Wxp::outDebug(), WXP::Wxp::outMessage(), WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::print(), WXP::DomainVal::proj, WXP::Domain::PSTEREO, WXP::Domain::SAT, WXP::Domain::set(), WXP::Domain::tran(), WXP::Gvar::tran(), WXP::Point::x, and WXP::Point::y.
Referenced by readHeader().
int AreaFile::close | ( | ) |
Closes the file
References WXP::File::close().
|
inline |
Gets number of bands
int AreaFile::getComment | ( | String & | str | ) |
Gets the comment field from AREA header
str | Output string |
References WXP::String::set(), and WXP::StrLib::trimWS().
Referenced by readHeader().
|
inline |
Gets element correction factor
|
inline |
Gets element resolution
|
inline |
Gets element size
|
inline |
Gets the filter map
int AreaFile::getImageDate | ( | ) |
Computes image date from AREA header data
References getImageDate(), and WXP::Date::getSeconds().
Referenced by getImageDate(), and readHeader().
int AreaFile::getImageDate | ( | Date & | date | ) |
Computes image date from AREA header data
date | Output date |
References WXP::DateVal::day, WXP::DateVal::hour, WXP::DateVal::min, WXP::DateVal::sec, WXP::Date::set(), and WXP::DateVal::year.
|
inline |
Gets the image identifier
|
inline |
Gets line correction factor
|
inline |
Gets line resolution
|
inline |
Gets line size
|
inline |
Gets the navigation type
|
inline |
Gets the satellite identifier
int AreaFile::getSync | ( | ) |
int AreaFile::init | ( | ) |
Initializes the object
Referenced by AreaFile().
bool AreaFile::isOpen | ( | ) |
Returns if file opened
int AreaFile::open | ( | const char * | filename | ) |
Opens a AreaFile file
filename | File to open |
References WXP::File::isOpen(), WXP::File::open(), and WXP::FileAttr::READ.
Referenced by WXP::SatFile::open().
int AreaFile::print | ( | ) |
Prints object data
References WXP::AreaDir::print().
int AreaFile::printGvar | ( | ) |
Prints GVAR data structure
int AreaFile::printNav | ( | ) |
Prints navigation data structure
References WXP::AreaNav::print().
int AreaFile::read | ( | Image & | image | ) |
Reads in data from the file
image | Image to read data into |
References readData(), and readHeader().
Referenced by WXP::SatFile::read().
unsigned char AreaFile::readByte | ( | ) |
int AreaFile::readData | ( | Image & | image | ) |
Reads in AREA image data
image | Output image |
References WXP::Image::allocData(), WXP::String::get(), WXP::File::read(), WXP::Image::setPixel(), WXP::SatTool::toIRG7Temp(), and WXP::String::valid().
Referenced by read().
int AreaFile::readHeader | ( | ) |
Reads in AREA header from the file, stores data internally
References WXP::DateVal::day, WXP::Gvar::epochTime(), WXP::StrLib::equal(), getSync(), WXP::DateVal::hour, WXP::Swap::init(), WXP::Gvar::initConstants(), WXP::Gvar::initParams(), WXP::Wxp::isDebug(), WXP::DateVal::min, WXP::Wxp::outDebug(), WXP::AreaDir::print(), WXP::AreaNav::print(), WXP::File::read(), WXP::DateVal::sec, WXP::File::seek(), WXP::Gvar::setAttitudeAngle(), WXP::StrLib::trimWS(), and WXP::DateVal::year.
Referenced by WXP::SatFile::getHeader(), read(), and readHeader().
int AreaFile::readHeader | ( | Image & | image | ) |
Reads in the AREA file header and puts info in Image
image | Output image |
References calcDomain(), WXP::DateTool::createLabel(), getComment(), getImageDate(), WXP::Image::init(), and readHeader().
unsigned int AreaFile::readWord | ( | ) |
Gets a word from file
References WXP::File::read().
int AreaFile::rewind | ( | ) |
Rewinds the file
References WXP::File::rewind().