Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::PnmCodec< T > Class Template Reference

#include <PnmCodec.h>

Inheritance diagram for prapi::PnmCodec< T >:

MatrixCodec< T > Object List of all members.

Detailed Description

template<class T>
class prapi::PnmCodec< T >

A codec for PNM images.

This Codec is able to read and write integer-valued binary, gray-scale and color images in plain (ascii) and raw formats. The codec only works with RGBColor and int images. Int images are written as binary when possible.

Public Methods

 PnmCodec ()
 A specialization for integer-valued gray-scale images.

void setRaw (bool raw)
 Set the raw flag.

bool isRaw ()
 Check whether the output will be in raw format.

bool isBinaryAllowed ()
 Check if binary output format is allowed (if possible).

void setBinaryAllowed (bool allow)
 Enable or disable binary output.

void decodeMatrix (std::istream &in, util::Matrix< T > &mat) throw (util::MatrixException&, util::io::IOException&)
void encodeMatrix (std::ostream &out, const util::Matrix< T > &mat) throw (util::MatrixException&, util::io::IOException&)

Member Function Documentation

template<class T>
void prapi::PnmCodec< T >::setBinaryAllowed bool    allow [inline]

Enable or disable binary output.

If allowed, binary file will be produced when the data to be encoded contains only ones and zeros. Binary format is disabled by default.

template<class T>
void prapi::PnmCodec< T >::setRaw bool    raw [inline]

Set the raw flag.

This flag controls whether the images are written in raw format. Default is true.

The documentation for this class was generated from the following files:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.