WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WXP::AreaFile Class Reference

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 ()
 

Detailed Description

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.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ AreaFile()

AreaFile::AreaFile ( )

Constructor. Initializes data.

References init().

Member Function Documentation

◆ calcDomain()

int AreaFile::calcDomain ( DomainVal dv)

◆ close()

int AreaFile::close ( )

Closes the file

References WXP::File::close().

◆ getBands()

int WXP::AreaFile::getBands ( )
inline

Gets number of bands

◆ getComment()

int AreaFile::getComment ( String str)

Gets the comment field from AREA header

Return values
strOutput string

References WXP::String::set(), and WXP::StrLib::trimWS().

Referenced by readHeader().

◆ getElemCor()

int WXP::AreaFile::getElemCor ( )
inline

Gets element correction factor

◆ getElemRes()

int WXP::AreaFile::getElemRes ( )
inline

Gets element resolution

◆ getElemSize()

int WXP::AreaFile::getElemSize ( )
inline

Gets element size

◆ getFilterMap()

int WXP::AreaFile::getFilterMap ( )
inline

Gets the filter map

◆ getImageDate() [1/2]

int AreaFile::getImageDate ( )

Computes image date from AREA header data

Returns
Number of seconds since 1/1/1970

References getImageDate(), and WXP::Date::getSeconds().

Referenced by getImageDate(), and readHeader().

◆ getImageDate() [2/2]

int AreaFile::getImageDate ( Date date)

Computes image date from AREA header data

Return values
dateOutput date

References WXP::DateVal::day, WXP::DateVal::hour, WXP::DateVal::min, WXP::DateVal::sec, WXP::Date::set(), and WXP::DateVal::year.

◆ getImageId()

int WXP::AreaFile::getImageId ( )
inline

Gets the image identifier

◆ getLineCor()

int WXP::AreaFile::getLineCor ( )
inline

Gets line correction factor

◆ getLineRes()

int WXP::AreaFile::getLineRes ( )
inline

Gets line resolution

◆ getLineSize()

int WXP::AreaFile::getLineSize ( )
inline

Gets line size

◆ getNavType()

const char * WXP::AreaFile::getNavType ( )
inline

Gets the navigation type

◆ getSatId()

int WXP::AreaFile::getSatId ( )
inline

Gets the satellite identifier

◆ getSync()

int AreaFile::getSync ( )

Gets the sync bytes from file

References readByte().

Referenced by readHeader().

◆ init()

int AreaFile::init ( )

Initializes the object

Referenced by AreaFile().

◆ isOpen()

bool AreaFile::isOpen ( )

Returns if file opened

Returns
True if opened

◆ open()

int AreaFile::open ( const char *  filename)

Opens a AreaFile file

Parameters
filenameFile to open
Returns
1 if opened file

References WXP::File::isOpen(), WXP::File::open(), and WXP::FileAttr::READ.

Referenced by WXP::SatFile::open().

◆ print()

int AreaFile::print ( )

Prints object data

References WXP::AreaDir::print().

◆ printGvar()

int AreaFile::printGvar ( )

Prints GVAR data structure

◆ printNav()

int AreaFile::printNav ( )

Prints navigation data structure

References WXP::AreaNav::print().

◆ read()

int AreaFile::read ( Image image)

Reads in data from the file

Return values
imageImage to read data into

References readData(), and readHeader().

Referenced by WXP::SatFile::read().

◆ readByte()

unsigned char AreaFile::readByte ( )

Gets a byte from file

References WXP::File::read().

Referenced by getSync().

◆ readData()

int AreaFile::readData ( Image image)

Reads in AREA image data

Return values
imageOutput image

References WXP::Image::allocData(), WXP::String::get(), WXP::File::read(), WXP::Image::setPixel(), WXP::SatTool::toIRG7Temp(), and WXP::String::valid().

Referenced by read().

◆ readHeader() [1/2]

int AreaFile::readHeader ( )

◆ readHeader() [2/2]

int AreaFile::readHeader ( Image image)

Reads in the AREA file header and puts info in Image

Return values
imageOutput image

References calcDomain(), WXP::DateTool::createLabel(), getComment(), getImageDate(), WXP::Image::init(), and readHeader().

◆ readWord()

unsigned int AreaFile::readWord ( )

Gets a word from file

References WXP::File::read().

◆ rewind()

int AreaFile::rewind ( )

Rewinds the file

References WXP::File::rewind().


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