RDK2::Geometry::PGMFile Struct Reference

#include <pgmfile.h>

Collaboration diagram for RDK2::Geometry::PGMFile:

Collaboration graph
[legend]

Detailed Description

Alcune funzioni per caricare e salvare i pgm (sia P2 che P5), cercando di unire il codice ripetuto fra DMatrix e RMapImage. Puo' darsi che questa roba non vada in Geometry (che bello subversion che si possono spostare i file.

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

Member Enumeration Documentation

Enumerator:
P2 
P5 

Definition at line 38 of file pgmfile.h.


Constructor & Destructor Documentation

RDK2::Geometry::PGMFile::PGMFile ( const std::string &  file  )  throw (runtime_error) [inline]

Opens a PGM file, throws an exceptions if there are problems.

Definition at line 47 of file pgmfile.h.

References load().

Here is the call graph for this function:

RDK2::Geometry::PGMFile::PGMFile (  ) 


Member Function Documentation

void RDK2::Geometry::PGMFile::load ( std::istream &  is  )  throw (runtime_error)

void RDK2::Geometry::PGMFile::load ( const std::string &  file  )  throw (runtime_error)

Definition at line 30 of file pgmfile.cpp.

References RDK2::Filesystem::fsOpenOrException().

Here is the call graph for this function:

bool RDK2::Geometry::PGMFile::load_ ( const std::string &  file  ) 

Definition at line 110 of file pgmfile.cpp.

References load(), and RDK_ERROR_STREAM.

Here is the call graph for this function:

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().

Here is the call graph for this function:

bool RDK2::Geometry::PGMFile::readResolution ( double mapResolution  ) 

Definition at line 155 of file pgmfile.cpp.

References comment, RDK_ERROR_STREAM, and RDK2::TextUtils::toString().

Here is the call graph for this function:


Field Documentation

The comment section in the file.

Definition at line 41 of file pgmfile.h.

Referenced by readResolution().

Definition at line 43 of file pgmfile.h.

Definition at line 43 of file pgmfile.h.

Definition at line 43 of file pgmfile.h.

Definition at line 44 of file pgmfile.h.


The documentation for this struct was generated from the following files:

Generated on Tue Mar 3 15:05:54 2009 for OpenRDK by  doxygen 1.5.6