WXP::SatFile Class Reference

This class reads satellite imagery from file. More...

#include "../include/SatFile.h"

List of all members.

Public Types

enum  Type {
  UNK, RAW, IMG, IMGZ,
  GINI, GINIZ, UNISYS, AREA,
  TIFF, LRIT, GIF, PNG
}

Public Member Functions

 SatFile ()
 SatFile (const char *filename, int raccess, int rtype)
 SatFile (const char *filename, int raccess, const char *rtype)
 SatFile (Filename &filename, int raccess)
 ~SatFile ()
int init ()
int open (const char *filename, int raccess, int rtype)
int open (const char *filename, int raccess, const char *rtype)
int open (Filename &filename, int raccess)
bool isOpen ()
int rewind ()
int close ()
int getHeader (Image &data)
int read (Image &data)
int read (const char *filename, int type, Image &image)
int read (const char *filename, const char *type, Image &image)
int read (Filename &filename, Image &image)
int write (Image &data)
int write (const char *filename, int type, Image &image)
int setMapRemove (int val)
int setDomain (const char *str)
int setCalibration (const char *str)

Static Public Member Functions

static int getType (const char *str)
static int checkType (const char *filename)

Detailed Description

This class reads satellite imagery from file.

Author:
Dan Vietor

Constructor & Destructor Documentation

SatFile::SatFile (  ) 

Constructor. Initializes the class

References init().

SatFile::SatFile ( const char *  filename,
int  access,
int  type 
)

Constructor. Opens the satellite file

Parameters:
filename File to open
access Access (FileAttr::READ, FileAttr::WRITE)
type File type (IMG, IMGZ, GINI, GINIZ, AREA, UNISYS, TIFF, LRIT)

References init(), and open().

SatFile::SatFile ( const char *  filename,
int  access,
const char *  type 
)

Constructor. Opens the satellite file

Parameters:
filename File to open
access Access (FileAttr::READ, FileAttr::WRITE)
type File type (img, imgz, gini, giniz, area, unisys, tiff, lrit)

References init(), and open().

SatFile::SatFile ( Filename filename,
int  access 
)

Constructor. Opens the satellite file

Parameters:
filename File to open
access Access (FileAttr::READ, FileAttr::WRITE)
type File type (img, imgz, gini, giniz, area, unisys, tiff, lrit)

References WXP::Filename::getName(), WXP::Filename::getType(), init(), and open().

SatFile::~SatFile (  ) 

Destructor

References close().


Member Function Documentation

int SatFile::checkType ( const char *  filename  )  [static]

Check the type of data in the file

Parameters:
filename File to check

References WXP::StrLib::equal(), WXP::File::isOpen(), and WXP::File::scanf().

int SatFile::close (  ) 

Closes the file

References WXP::File::close().

Referenced by ~SatFile().

int SatFile::getHeader ( Image image  ) 

Reads the image header

Return values:
image Image class to put header information

References WXP::Image::init(), WXP::SatUniFile::readHeader(), WXP::AreaFile::readHeader(), WXP::GiniFile::readHeader(), and WXP::ImgWxpFile::readHeader().

Referenced by WXP::SatPlot::getDomain().

int SatFile::init (  ) 

Initializes the class data

References WXP::Const::MISS.

Referenced by SatFile().

bool SatFile::isOpen (  ) 

Is file open

Returns:
True if open

Referenced by WXP::SatPlot::getDomain().

int SatFile::open ( const char *  filename,
int  access,
const char *  rtype 
)

Opens a satellite image file

Parameters:
filename File to open
access Access (File::READ, File::WRITE)
rtype File type (unk, img, imgz, gini, giniz, area, unisys)

References open().

int SatFile::open ( const char *  filename,
int  access,
int  rtype 
)
int SatFile::read ( Image image  ) 

Reads the image in from the file

Return values:
image Image class to put satellite image

References WXP::Image::init(), WXP::GifFile::read(), WXP::TiffFile::read(), WXP::SatUniFile::read(), WXP::AreaFile::read(), WXP::GiniFile::read(), and WXP::ImgWxpFile::read().

int SatFile::rewind (  ) 

Rewinds the file

References WXP::File::rewind(), and WXP::File::skipLine().

int SatFile::setCalibration ( const char *  str  ) 

Sets the calibration factor

Parameters:
str The calibration
int SatFile::setDomain ( const char *  str  ) 

Sets the domain of the image for navigation

Parameters:
str The domain of the image
int SatFile::setMapRemove ( int  val  ) 

Enables map removal algorithm

Parameters:
str Turns on map removal

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