#include <qgarlib/MapleFile.H>
Inheritance diagram for qgar::MapleFile:

Definition at line 76 of file MapleFile.H.
Public Member Functions | |
Constructors | |
| MapleFile (char *aFileName, GreyLevelImage &aGlvImg, int aTesselation=1) | |
| Initialize from a grey-level image. | |
| MapleFile (char *aFileName, FloatImage &aFloatImg, int aTesselation=1) | |
| Initialize from a float image. | |
| MapleFile (char *aFileName, Histogram &aHistogram) | |
| Initialize from a histogram. | |
Destructor | |
| virtual | ~MapleFile () |
| Virtual destructor. | |
Access to file characteristics | |
| std::fstream & | fileStream () |
| Get file stream. | |
| const char *const | fileName () const |
| Get file name. | |
| QGEfileStatus | fileStatus () const |
| Get current file status. | |
Opening | |
| virtual void | openRONLY () throw (QgarErrorIO) |
| Open in read-only mode. | |
| virtual void | openWONLY () throw (QgarErrorIO) |
| Open in write-only mode. | |
| virtual void | openAPPEND () throw (QgarErrorIO) |
| Open in append mode. | |
| virtual void | openRW () throw (QgarErrorIO) |
| Open in read-write mode. | |
| virtual void | openRA () throw (QgarErrorIO) |
| Open in read-append mode. | |
Closing | |
| virtual void | close () |
| Close the file. | |
Checking status | |
| virtual void | isOpenR () throw (QgarErrorUser) |
| Abort if the file is not open in a mode allowing reading. | |
| virtual void | isOpenW () throw (QgarErrorUser) |
| Abort if the file is not open in a mode allowing writing. | |
| virtual void | isOpenA () throw (QgarErrorUser) |
| Abort if the file is not open in a mode allowing appending. | |
| virtual void | isOpenRW () throw (QgarErrorUser) |
| Abort if the file is not open in read-write mode. | |
| virtual void | isOpenRA () throw (QgarErrorUser) |
| Abort if the file is not open in readi-append mode. | |
Protected Member Functions | |
Input | |
| virtual void | readHeader () |
| Read file header. | |
Output | |
| virtual void | writeHeader () |
| Write file header. | |
| virtual void | writeFooter () |
| Write file footer. | |
Protected Attributes | |
Representation of a file | |
| char * | _fileName |
| File name. | |
| QGEfileStatus | _fileStatus |
| File status. | |
| std::fstream | _fileStream |
| Associated file stream. | |
|
||||||||||||||||
|
Initialize from a grey-level image. The file is open in write-only mode. It includes the code to draw the surface of the grey-level image aGlvmg. The axes of the resulting image are set so as to put the surface in the same reference frame as the image is when it is displayed. To visualize the corresponding surface, load the resulting file using Maple command read.
Definition at line 60 of file MapleFile.C. References qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::GenImage< T, CheckPolicy >::height(), qgar::AbstractFile::openWONLY(), qgar::GenImage< T, CheckPolicy >::pixel(), and qgar::GenImage< T, CheckPolicy >::width(). |
|
||||||||||||||||
|
Initialize from a float image. The file is open in write-only mode. It includes the code to draw the surface of the float image aGlvmg. The axes of the resulting image are set so as to put the surface in the same reference frame as the image is when it is displayed. To visualize the corresponding surface, load the resulting file using Maple command read.
Definition at line 109 of file MapleFile.C. References qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::GenImage< T, CheckPolicy >::height(), qgar::AbstractFile::openWONLY(), qgar::GenImage< T, CheckPolicy >::pixel(), and qgar::GenImage< T, CheckPolicy >::width(). |
|
||||||||||||
|
Initialize from a histogram. The file is open in write-only mode. It includes the code to draw the histogram as a curve. image aGlvmg. To visualize the corresponding surface, load the resulting file using Maple command read.
Definition at line 155 of file MapleFile.C. References qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::Histogram::lowerBnd(), qgar::AbstractFile::openWONLY(), qgar::Histogram::samplingRate(), and qgar::Histogram::upperBnd(). |
|
|
Virtual destructor.
Definition at line 197 of file MapleFile.C. |
|
|
Close the file. No effect is the file is already closed.
Definition at line 251 of file AbstractFile.C. References qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::QGE_FILE_STATUS_CLOSED, qgar::QGE_FILE_STATUS_READ_WRITE, qgar::QGE_FILE_STATUS_WRITE_ONLY, and qgar::AbstractFile::writeFooter(). Referenced by qgar::GenImage< T, CheckPolicy >::GenImage(), MapleFile(), qgar::AbstractFile::openAPPEND(), qgar::AbstractFile::openRA(), qgar::AbstractFile::openRONLY(), qgar::AbstractFile::openRW(), qgar::AbstractFile::openWONLY(), and qgar::GenImage< T, CheckPolicy >::save(). |
|
|
Get file name.
Definition at line 395 of file AbstractFile.H. References qgar::AbstractFile::_fileName. |
|
|
Get current file status.
Definition at line 404 of file AbstractFile.H. References qgar::AbstractFile::_fileStatus. |
|
|
Get file stream. When saving the stream, usual I/O operations apply to the associated file, depending on the opening mode. Definition at line 386 of file AbstractFile.H. References qgar::AbstractFile::_fileStream. |
|
|
Abort if the file is not open in a mode allowing appending.
Definition at line 310 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::QGE_FILE_STATUS_APPEND, and qgar::QGE_FILE_STATUS_READ_APPEND. |
|
|
Abort if the file is not open in a mode allowing reading.
Definition at line 273 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::QGE_FILE_STATUS_APPEND, and qgar::QGE_FILE_STATUS_WRITE_ONLY. Referenced by qgar::PgmFile::readRow(), and qgar::PbmFile::readRow(). |
|
|
Abort if the file is not open in readi-append mode.
Definition at line 347 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_APPEND. |
|
|
Abort if the file is not open in read-write mode.
Definition at line 329 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_WRITE. |
|
|
Abort if the file is not open in a mode allowing writing.
Definition at line 292 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_ONLY. Referenced by qgar::TgifFile::write(), qgar::DxfFile::write(), qgar::PgmFile::writeRow(), and qgar::PbmFile::writeRow(). |
|
|
Open in append mode. The eventual content of the file is preserved and the file pointer is set to the end of the file.
Definition at line 166 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_APPEND, and qgar::AbstractFile::readHeader(). |
|
|
Open in read-append mode. The file pointer is set to the end of the file.
Definition at line 223 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_READ_APPEND, and qgar::AbstractFile::readHeader(). |
|
|
Open in read-only mode. The file pointer is set to the first character after the header.
Definition at line 107 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_READ_ONLY, and qgar::AbstractFile::readHeader(). Referenced by qgar::GenImage< T, CheckPolicy >::GenImage(). |
|
|
Open in read-write mode.
Definition at line 197 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_READ_WRITE, and qgar::AbstractFile::writeHeader(). |
|
|
Open in write-only mode.
Definition at line 136 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_WRITE_ONLY, and qgar::AbstractFile::writeHeader(). Referenced by MapleFile(), and qgar::GenImage< T, CheckPolicy >::save(). |
|
|
Read file header.
Implements qgar::AbstractFile. Definition at line 211 of file MapleFile.C. |
|
|
Write file footer.
Implements qgar::AbstractFile. Definition at line 229 of file MapleFile.C. |
|
|
Write file header.
Implements qgar::AbstractFile. Definition at line 220 of file MapleFile.C. References qgar::AbstractFile::_fileStream. |
|
|
|