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

#include <RawReader.hh>

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

List of all members.

Public Member Functions

 RawReader (char const *name, ImageArray< coeff > &data, int y=512, int x=512, int offs=0)
virtual ~RawReader (void)
void header (int offs)
void cols (int cols)
void rows (int rows)

Protected Member Functions

virtual int readfmt (void)

Private Attributes

int m_offset
int m_xsize
int m_ysize

Detailed Description

A RAW file reader. Dimensions and a read offset can be specified through additional arguments to the constructor or through some methods.

Definition at line 21 of file RawReader.hh.


Constructor & Destructor Documentation

RawReader::RawReader ( char const *  name,
ImageArray< coeff > &  data,
int  y = 512,
int  x = 512,
int  offs = 0 
) [inline]

Constructor. Calls the mother class' constructor to initialize the {ImageArray} reference and eventually sets the image dimensions plus offset.

Parameters:
namethe file name
datathe reference to the {ImageArray} object
ythe number of rows
xthe number of cols
offsthe offset

Definition at line 39 of file RawReader.hh.

References cols(), header(), and rows().

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

Destructor - does nothing.

Definition at line 44 of file RawReader.hh.


Member Function Documentation

void RawReader::cols ( int  cols) [inline]

Set the horizontal size.

Parameters:
colsthe new number of cols

Definition at line 53 of file RawReader.hh.

References cols(), and m_xsize.

Referenced by cols(), and RawReader().

void RawReader::header ( int  offs) [inline]

Set the offset.

Parameters:
offsthe new offset

Definition at line 49 of file RawReader.hh.

References m_offset.

Referenced by RawReader().

virtual int RawReader::readfmt ( void  ) [protected, virtual]

Read the RAW file format. This does the actual work of reading and parsing the image file. It gets called by the {read ()} method.

Returns:
0 if successful, -1 on read error, -2 on file format error.

Implements GreymapReader.

void RawReader::rows ( int  rows) [inline]

Set the vertical size.

Parameters:
rowsthe new number of rows

Definition at line 57 of file RawReader.hh.

References m_ysize, and rows().

Referenced by RawReader(), and rows().


Member Data Documentation

int RawReader::m_offset [private]

The read offset. Some files have some leading bytes containing no usable information. If this applies this has a non-zero value.

Definition at line 62 of file RawReader.hh.

Referenced by header().

int RawReader::m_xsize [private]

The horizontal size.

Definition at line 64 of file RawReader.hh.

Referenced by cols().

int RawReader::m_ysize [private]

The vertical size.

Definition at line 66 of file RawReader.hh.

Referenced by rows().


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