Wavelet and Image class library  1.3.2
Public Member Functions | Protected Member Functions | Private Member Functions
GreymapWriter Class Reference

#include <GreymapWriter.hh>

Inheritance diagram for GreymapWriter:
Inheritance graph
[legend]
Collaboration diagram for GreymapWriter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GreymapWriter (char const *name, ImageArray< coeff > &data)
virtual ~GreymapWriter (void)
void write (void)

Protected Member Functions

virtual int writefmt (void)=0

Private Member Functions

void pixelize (void)

Detailed Description

An abstract image writer. The image is being written putting its content from an {ImageArray} object into the file. A reference to the object holding the image is passed by the constructor, the actual object belongs to the outer world.

Definition at line 25 of file GreymapWriter.hh.


Constructor & Destructor Documentation

GreymapWriter::GreymapWriter ( char const *  name,
ImageArray< coeff > &  data 
) [inline]

Constructor. Only calls the mother class' constructor to initialize the {ImageArray} reference.

Parameters:
namethe file name, if {NULL}, then {stdout}
datathe reference to the {ImageArray} object

Definition at line 36 of file GreymapWriter.hh.

virtual GreymapWriter::~GreymapWriter ( void  ) [inline, virtual]

Destructor - does nothing.

Definition at line 40 of file GreymapWriter.hh.


Member Function Documentation

void GreymapWriter::pixelize ( void  ) [private]

Fill the pixels array. This is not trivial as the coefficients may contain negative values that have to be represented as grey-scale pixels.

void GreymapWriter::write ( void  )

Write the image. All steps independent of the file format will be performed, like testing for file writeability etc.

Exceptions:
ios_base::failurea read error has occured [not supported by all libraries, so eventually {invalid_argument} instead]
virtual int GreymapWriter::writefmt ( void  ) [protected, pure virtual]

Write different file formats (abstract). This is the method to be implemented for every image file format. It will be called by the {write ()} method.

Returns:
0 if successful, -1 on write error.

Implemented in RawWriter, PfgWriter, and PgmWriter.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines