This class reads satellite imagery from file. More...
#include "../include/SatFile.h"
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) |
This class reads satellite imagery from file.
| SatFile::SatFile | ( | ) |
Constructor. Initializes the class
References init().
| SatFile::SatFile | ( | const char * | filename, | |
| int | access, | |||
| int | type | |||
| ) |
Constructor. Opens the satellite file
| filename | File to open | |
| access | Access (FileAttr::READ, FileAttr::WRITE) | |
| type | File type (IMG, IMGZ, GINI, GINIZ, AREA, UNISYS, TIFF, LRIT) |
| SatFile::SatFile | ( | const char * | filename, | |
| int | access, | |||
| const char * | type | |||
| ) |
Constructor. Opens the satellite file
| filename | File to open | |
| access | Access (FileAttr::READ, FileAttr::WRITE) | |
| type | File type (img, imgz, gini, giniz, area, unisys, tiff, lrit) |
| SatFile::SatFile | ( | Filename & | filename, | |
| int | access | |||
| ) |
Constructor. Opens the satellite file
| 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().
| int SatFile::checkType | ( | const char * | filename | ) | [static] |
Check the type of data in the file
| filename | File to check |
References WXP::StrLib::equal(), WXP::File::isOpen(), and WXP::File::scanf().
| int SatFile::close | ( | ) |
| int SatFile::getHeader | ( | Image & | image | ) |
Reads the image header
| 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 | ( | ) |
| bool SatFile::isOpen | ( | ) |
| int SatFile::open | ( | const char * | filename, | |
| int | access, | |||
| const char * | rtype | |||
| ) |
Opens a satellite image file
| 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 | |||
| ) |
Opens a satellite image file
| filename | File to open | |
| access | Access (File::READ, File::WRITE) | |
| rtype | File type (UNK, IMG, IMGZ, GINI, GINIZ, AREA, UNISYS) |
References WXP::ImgWxpFile::IMG, WXP::ImgWxpFile::IMGZ, WXP::File::open(), WXP::GifFile::open(), WXP::LritFile::open(), WXP::TiffFile::open(), WXP::SatUniFile::open(), WXP::AreaFile::open(), WXP::GiniFile::open(), WXP::ImgWxpFile::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by WXP::SatPlot::getDomain(), open(), and SatFile().
| int SatFile::read | ( | Image & | image | ) |
Reads the image in from the file
| 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
| str | The calibration |
| int SatFile::setDomain | ( | const char * | str | ) |
Sets the domain of the image for navigation
| str | The domain of the image |
| int SatFile::setMapRemove | ( | int | val | ) |
Enables map removal algorithm
| str | Turns on map removal |
1.6.1