#include <pgmfile.h>

Definition at line 37 of file pgmfile.h.
Public Types | |
| enum | Type { P2, P5 } |
Public Member Functions | |
| PGMFile (const std::string &file) throw (runtime_error) | |
| PGMFile () | |
| void | load (std::istream &is) throw (runtime_error) |
| void | load (const std::string &file) throw (runtime_error) |
| bool | load_ (const std::string &file) |
| RDK2::Geometry::Viewport | getViewport (double meters_per_pixel=0) throw (runtime_error, invalid_argument) |
| bool | readResolution (double &) |
Data Fields | |
| enum RDK2::Geometry::PGMFile::Type | type |
| std::string | comment |
| int | maxVal |
| int | width |
| int | height |
| DMatrix< int > | buffer |
| RDK2::Geometry::PGMFile::PGMFile | ( | const std::string & | file | ) | throw (runtime_error) [inline] |
| RDK2::Geometry::PGMFile::PGMFile | ( | ) |
| void RDK2::Geometry::PGMFile::load | ( | std::istream & | is | ) | throw (runtime_error) |
Definition at line 36 of file pgmfile.cpp.
References RDK2::TextUtils::consumeWhitespace(), EXPECT_MAXVAL, RDK2::TextUtils::quote(), RDK_DEBUG_STREAM, RDK_ERROR_STREAM, RDK_TRACE_PRINTF, RDK2::TextUtils::readCommentLines(), and RDK2::TextUtils::toString().
Referenced by load_(), and PGMFile().

| void RDK2::Geometry::PGMFile::load | ( | const std::string & | file | ) | throw (runtime_error) |
Definition at line 30 of file pgmfile.cpp.
References RDK2::Filesystem::fsOpenOrException().

| bool RDK2::Geometry::PGMFile::load_ | ( | const std::string & | file | ) |
Definition at line 110 of file pgmfile.cpp.
References load(), and RDK_ERROR_STREAM.

| Viewport RDK2::Geometry::PGMFile::getViewport | ( | double | meters_per_pixel = 0 |
) | throw (runtime_error, invalid_argument) |
Definition at line 119 of file pgmfile.cpp.
References RDK_DEBUG_STREAM, and RDK2::TextUtils::toString().

Definition at line 155 of file pgmfile.cpp.
References comment, RDK_ERROR_STREAM, and RDK2::TextUtils::toString().

| std::string RDK2::Geometry::PGMFile::comment |
The comment section in the file.
Definition at line 41 of file pgmfile.h.
Referenced by readResolution().
1.5.6