Vista     Main Page   Class List   Function List   File List   Examples  


CReader Class Reference

The CReader class implements an image or video stream reader. More...

Inheritance diagram for CReader:

CImageReader CMpeg2Reader List of all members.

Public Types

enum  EReaderFormat {
  FORMAT_NOT_RECOGNIZED, FORMAT_PGM, FORMAT_PPM, FORMAT_RAW8,
  FORMAT_RAW16, FORMAT_PNG, FORMAT_MPEG2
}

Public Methods

 CReader ()
virtual ~CReader ()
void setFileName (const char *filename)
void setFileName (string filename)
bool setFrameNumber (unsigned long framenumber)
virtual EReaderFormat getFormat ()
virtual string getFileName ()
virtual bool getFrame (CMotion2DImage< unsigned char > &I, unsigned nbsubsample=0, unsigned nrows=0, unsigned ncols=0)
virtual bool getFrame (CMotion2DImage< short > &I, unsigned nbsubsample=0, unsigned nrows=0, unsigned ncols=0)
virtual bool openStream ()
virtual bool closeStream ()
virtual void getType ()
virtual unsigned getNbSubsample ()

Detailed Description

The CReader class implements an image or video stream reader.
Examples:

Motion2D.cpp, and Warping.cpp.


Member Enumeration Documentation

enum CReader::EReaderFormat
 

The supported image or video stream reader format.

Enumeration values:
FORMAT_NOT_RECOGNIZED  Reader format not supported.
FORMAT_PGM  PNM PGM P5 image format.
FORMAT_PPM  PNM PPM P6 image format.
FORMAT_RAW8  RAW8 image format.
FORMAT_RAW16  RAW16 image format.
FORMAT_PNG  PNG image format.
FORMAT_MPEG2  MPEG2 image format.


Constructor & Destructor Documentation

CReader::CReader  
 

Image or video stream reader constructor.

virtual CReader::~CReader   [inline, virtual]
 

Destructor.


Member Function Documentation

virtual bool CReader::closeStream   [inline, virtual]
 

Close an image or video stream.

Reimplemented in CImageReader, and CMpeg2Reader.

Examples:
Motion2D.cpp, and Warping.cpp.

virtual string CReader::getFileName   [inline, virtual]
 

Return the filename of the image or video stream.

Reimplemented in CImageReader, and CMpeg2Reader.

Examples:
Motion2D.cpp, and Warping.cpp.

virtual EReaderFormat CReader::getFormat   [inline, virtual]
 

Return the considered image or video stream reader format.

See also:
EReaderFormat

Reimplemented in CImageReader, and CMpeg2Reader.

Examples:
Motion2D.cpp.

virtual bool CReader::getFrame CMotion2DImage< short > &    I,
unsigned    nbsubsample = 0,
unsigned    nrows = 0,
unsigned    ncols = 0
[inline, virtual]
 

Read a frame from an image or video stream.

Reimplemented in CImageReader, and CMpeg2Reader.

virtual bool CReader::getFrame CMotion2DImage< unsigned char > &    I,
unsigned    nbsubsample = 0,
unsigned    nrows = 0,
unsigned    ncols = 0
[inline, virtual]
 

Read a frame from an image or video stream.

Reimplemented in CImageReader, and CMpeg2Reader.

Examples:
Motion2D.cpp, and Warping.cpp.

virtual unsigned CReader::getNbSubsample   [inline, virtual]
 

Returns:
The number of subsampling applied to the image. If no subsampling is performed, this parameter is equal to zero.

Reimplemented in CImageReader, and CMpeg2Reader.

virtual void CReader::getType   [inline, virtual]
 

Print the type of the reader.

Reimplemented in CImageReader, and CMpeg2Reader.

virtual bool CReader::openStream   [inline, virtual]
 

Open an image or video stream.

Reimplemented in CImageReader, and CMpeg2Reader.

Examples:
Motion2D.cpp, and Warping.cpp.

void CReader::setFileName string    filename
 

Set the image or video stream filename to read.

See also:
getFileName()

void CReader::setFileName const char *    filename
 

Set the image or video stream filename to read.

See also:
getFileName()
Examples:
Motion2D.cpp, and Warping.cpp.

bool CReader::setFrameNumber unsigned long    framenumber
 

Set the image or video stream frame number to read.

Returns:
Allways true.
Examples:
Motion2D.cpp, and Warping.cpp.


The documentation for this class was generated from the following files:
Motion2D is Copyright © 1995-2005 by Inria
This documentation was generated on 31 Jan 2005 by Fabien Spindler for Motion2D 1.3.11 using doxygen1.2.18 written by Dimitri van Heesch, © 1997-2005