|
WXP C++ Library Version 6.74.9
|
This class reads satellite imagery from file. More...
#include "../include/SatFile.h"
Public Types | |
| enum | Type { UNK , RAW , IMG , IMGZ , GINI , GINIZ , GINIP , NETCDF , 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().
|
static |
Check the type of data in the file
| filename | File to check |
References WXP::StrLib::equal(), WXP::File::isOpen(), and WXP::File::scanf().
Referenced by open().
| int SatFile::close | ( | ) |
| int SatFile::getHeader | ( | Image & | image | ) |
Reads the image header
| image | Image class to put header information |
References WXP::Image::init(), WXP::AreaFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::SatUniFile::readHeader(), WXP::ImgWxpFile::readHeader(), and WXP::LritFile::readHeader().
Referenced by WXP::SatPlot::getDomain().
| int SatFile::init | ( | ) |
Initializes the class data
References WXP::Const::MISS.
Referenced by SatFile(), SatFile(), SatFile(), and SatFile().
| 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 checkType(), WXP::ImgWxpFile::IMG, WXP::ImgWxpFile::IMGZ, WXP::File::open(), WXP::AreaFile::open(), WXP::LritFile::open(), WXP::GifFile::open(), WXP::PngFile::open(), WXP::SatCdfFile::open(), WXP::TiffFile::open(), WXP::ImgWxpFile::open(), WXP::GiniFile::open(), WXP::SatUniFile::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by WXP::SatPlot::getDomain(), open(), SatFile(), SatFile(), 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::GiniFile::read(), WXP::SatUniFile::read(), WXP::AreaFile::read(), WXP::GifFile::read(), WXP::ImgWxpFile::read(), WXP::LritFile::read(), WXP::PngFile::read(), and WXP::TiffFile::read().
Referenced by WXP::SatPlot::draw().
| int SatFile::rewind | ( | ) |
Rewinds the file
References WXP::File::rewind(), and WXP::File::skipLine().
| int SatFile::setCalibration | ( | const char * | str | ) |
| int SatFile::setDomain | ( | const char * | str | ) |
Sets the domain of the image for navigation
| str | The domain of the image |
Referenced by WXP::SatPlot::draw().
| int SatFile::setMapRemove | ( | int | val | ) |
Enables map removal algorithm
| str | Turns on map removal |
Referenced by WXP::SatPlot::draw().