WXP::AreaFile Class Reference
[File I/O objects]

This class decodes McIDAS AREA files. More...

#include "../include/AreaFile.h"

List of all members.

Public Member Functions

 AreaFile ()
int init ()
int open (const char *filename)
bool isOpen ()
int rewind ()
int close ()
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 (  ) 

Constructor. Initializes data.

References init().


Member Function Documentation

int AreaFile::calcDomain ( DomainVal dv  ) 
int AreaFile::close (  ) 

Closes the file

References WXP::File::close().

int WXP::AreaFile::getBands (  )  [inline]

Gets number of bands

int AreaFile::getComment ( String str  ) 

Gets the comment field from AREA header

Return values:
str Output string

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

Referenced by readHeader().

int WXP::AreaFile::getElemCor (  )  [inline]

Gets element correction factor

int WXP::AreaFile::getElemRes (  )  [inline]

Gets element resolution

int WXP::AreaFile::getElemSize (  )  [inline]

Gets element size

int WXP::AreaFile::getFilterMap (  )  [inline]

Gets the filter map

int AreaFile::getImageDate (  ) 

Computes image date from AREA header data

Returns:
Number of seconds since 1/1/1970

References WXP::Date::getSeconds().

Referenced by readHeader().

int AreaFile::getImageDate ( Date date  ) 

Computes image date from AREA header data

Return values:
date Output date

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

int WXP::AreaFile::getImageId (  )  [inline]

Gets the image identifier

int WXP::AreaFile::getLineCor (  )  [inline]

Gets line correction factor

int WXP::AreaFile::getLineRes (  )  [inline]

Gets line resolution

int WXP::AreaFile::getLineSize (  )  [inline]

Gets line size

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

Gets the navigation type

int WXP::AreaFile::getSatId (  )  [inline]

Gets the satellite identifier

int AreaFile::getSync (  ) 

Gets the sync bytes from file

References readByte().

Referenced by readHeader().

int AreaFile::init (  ) 

Initializes the object

Referenced by AreaFile().

bool AreaFile::isOpen (  ) 

Returns if file opened

Returns:
True if opened
int AreaFile::open ( const char *  filename  ) 

Opens a AreaFile file

Parameters:
filename File to open
Returns:
1 if opened file

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

Return values:
image Image to read data into

References readData(), and readHeader().

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

unsigned char AreaFile::readByte (  ) 

Gets a byte from file

References WXP::File::read().

Referenced by getSync().

int AreaFile::readData ( Image image  ) 

Reads in AREA image data

Return values:
image Output image

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

Referenced by read().

int AreaFile::readHeader ( Image image  ) 

Reads in the AREA file header and puts info in Image

Return values:
image Output image

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

int AreaFile::readHeader (  ) 
unsigned int AreaFile::readWord (  ) 

Gets a word from file

References WXP::File::read().

int AreaFile::rewind (  ) 

Rewinds the file

References WXP::File::rewind().


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

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1