#include <image.h>

Public Types | |
| enum | imtype { NOTUSED , PBM_A , PGM_A , PPM_A , PBM_B , PGM_B , PPM_B } |
Public Member Functions | |
| PNM () | |
| ~PNM () | |
| void | clear (void) |
| void | read_header () |
| void | write_header (const imtype _type, const arma::uword _rows, const arma::uword _cols, const int _maxval, const std::string comments) |
| bool | write (std::string fname, const imtype _type, const arma::cube &img, const std::string info="") |
| bool | write (std::string fname, const imtype _type, arma::mat &img, const std::string info="") |
| void | get_info () |
| arma::uword | get_rows () |
| arma::uword | get_cols () |
| int | get_maxval () |
| bool | read (std::string fname, arma::cube &img) |
| bool | read (std::string fname, arma::mat &img) |
Public Attributes | |
| enum sp::PNM::imtype | type |
Private Attributes | |
| std::ifstream | ifs |
| std::ofstream | ofs |
| arma::uword | cols |
| arma::uword | rows |
| int | maxval |
Implements portable anymap image functions Supports .pbm, .pgm and .ppm plain and raw
| enum sp::PNM::imtype |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Write the .pnm file.
| fname | File name |
| _type | File name |
| img | Image data |
| info | File comments |
Definition at line 150 of file image.h.
References cols, ofs, PPM_A, PPM_B, rows, type, and write_header().
Referenced by main().

|
inline |
|
private |
Nr of columns in image.
Definition at line 27 of file image.h.
Referenced by clear(), get_cols(), get_info(), PNM(), read(), read(), read_header(), write(), write(), and write_header().
|
private |
Input stream handle.
Definition at line 25 of file image.h.
Referenced by read(), read(), and read_header().
|
private |
Maximum pixel value in image.
Definition at line 29 of file image.h.
Referenced by clear(), get_info(), get_maxval(), PNM(), read(), read_header(), write(), and write_header().
|
private |
Output stream handle.
Definition at line 26 of file image.h.
Referenced by write(), write(), and write_header().
|
private |
Nr of rows in image.
Definition at line 28 of file image.h.
Referenced by clear(), get_info(), get_rows(), PNM(), read(), read(), read_header(), write(), write(), and write_header().
| enum sp::PNM::imtype sp::PNM::type |
Image format.
Referenced by clear(), get_info(), PNM(), read(), read(), read_header(), write(), write(), and write_header().