YuvParser Class Reference

This class handles reading/parsing of RASFMT_RAW_VIDEO image files. More...

#include <Raster/YuvParser.H>

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

List of all members.

Classes

struct  Rep

Public Member Functions

 YuvParser (const char *fname)
 Construct with a filename, and use the current default Dims setting.
virtual ~YuvParser ()
 Destructor.
virtual GenericFrameSpec getFrameSpec () const
 Get the specifications of the image without fully reading it.
virtual std::string getComments () const
 Get the comments from the image without fully reading it.
virtual uint getTagCount () const
 Get image tags if the image supports them.
virtual bool getTag (uint tag, std::string &name, std::string &value) const
 Get image tags if the image supports them.
virtual GenericFrame getFrame ()
 Get a GenericFrame representation from the raster file.

Static Public Member Functions

static void setDefaultDims (const Dims &d)
 Specify a new default Dims value.
static Dims getDefaultDims ()
 Get the current default Dims value.
static void setStrictDims (bool v)
 Whether to pass strictLength=true when calling VideoFrame::fromFile().
static bool getStrictDims ()
 Get the current strict dims setting.

Detailed Description

This class handles reading/parsing of RASFMT_RAW_VIDEO image files.

Definition at line 47 of file YuvParser.H.


Constructor & Destructor Documentation

YuvParser::YuvParser ( const char *  fname  ) 

Construct with a filename, and use the current default Dims setting.

The exact Dims and VideoFormat of the resulting frame is inferred from the filename extension, which should be of the form ".WWWxHHH.PIXFMT", where WWW and HHH are the image dimensions and PIXFMT is e.g. "yuv420p" for VIDFMT_YUV420P. For backward-compatibility, the image dimensions may be omitted (though this is discouraged), in which case the dimensions are taken to be the current value of getDefaultDims(); the initial default Dims value is 640x480.

Definition at line 147 of file YuvParser.C.

YuvParser::~YuvParser (  )  [virtual]

Destructor.

Definition at line 154 of file YuvParser.C.


Member Function Documentation

std::string YuvParser::getComments (  )  const [virtual]

Get the comments from the image without fully reading it.

Implements RasterParser.

Definition at line 203 of file YuvParser.C.

Dims YuvParser::getDefaultDims (  )  [static]

Get the current default Dims value.

The initial default Dims is 640x480.

Definition at line 168 of file YuvParser.C.

Referenced by RasterInputOptions::paramChanged().

GenericFrame YuvParser::getFrame (  )  [virtual]

Get a GenericFrame representation from the raster file.

This can subsequently be converted to rgb, grayscale, floating-point, or video-yuv.

Implements RasterParser.

Definition at line 215 of file YuvParser.C.

References VideoFrame::fromFile(), VideoFrame::fromStream(), GVX_ERR_CONTEXT, rutz::ibzip2open(), rutz::igzopen(), and rutz::sfmt().

GenericFrameSpec YuvParser::getFrameSpec (  )  const [virtual]

Get the specifications of the image without fully reading it.

Implements RasterParser.

Definition at line 189 of file YuvParser.C.

static bool YuvParser::getStrictDims (  )  [static]

Get the current strict dims setting.

bool YuvParser::getTag ( uint  tag,
std::string name,
std::string value 
) const [virtual]

Get image tags if the image supports them.

Implements RasterParser.

Definition at line 211 of file YuvParser.C.

uint YuvParser::getTagCount (  )  const [virtual]

Get image tags if the image supports them.

Implements RasterParser.

Definition at line 207 of file YuvParser.C.

void YuvParser::setDefaultDims ( const Dims d  )  [static]

Specify a new default Dims value.

This will be the Dims that are used if a YuvParser is constructed with no Dims specification.

Definition at line 161 of file YuvParser.C.

Referenced by RasterInputOptions::paramChanged().

void YuvParser::setStrictDims ( bool  v  )  [static]

Whether to pass strictLength=true when calling VideoFrame::fromFile().

Definition at line 175 of file YuvParser.C.

Referenced by RasterInputOptions::paramChanged().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:26:58 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3