libcineon  0.1
Public Member Functions | Public Attributes | Protected Attributes | List of all members
cineon::Reader Class Reference

DPX Image Reader class. More...

#include <Cineon.h>

Collaboration diagram for cineon::Reader:
Collaboration graph
[legend]

Public Member Functions

 Reader ()
 Constructor. More...
 
virtual ~Reader ()
 Destructor. More...
 
void SetInStream (InStream *stream)
 Set the InStream object to be used to read images. More...
 
void Reset ()
 clear any caching or memory allocated specific to an image More...
 
bool ReadHeader ()
 Read the dpx header into the header member. More...
 
bool ReadImage (void *data, const DataSize size=kWord)
 Read an image element into a buffer that matches the image description type. More...
 
bool ReadBlock (void *data, const DataSize size, Block &block)
 Read a rectangular image block into a buffer from the image element specified by the Descriptor type. More...
 
bool ReadUserData (unsigned char *data)
 Read the user data into a buffer. More...
 

Public Attributes

Header header
 DPX header. More...
 

Protected Attributes

InStreamfd
 
Codeccodec
 
ElementReadStreamrio
 

Detailed Description

DPX Image Reader class.

Constructor & Destructor Documentation

cineon::Reader::Reader ( )

Constructor.

cineon::Reader::~Reader ( )
virtual

Destructor.

Member Function Documentation

bool cineon::Reader::ReadBlock ( void *  data,
const DataSize  size,
Block block 
)

Read a rectangular image block into a buffer from the image element specified by the Descriptor type.

Parameters
databuffer
sizesize of the buffer component
blockimage area to read
descelement description type
Returns
success true/false
bool cineon::Reader::ReadHeader ( )

Read the dpx header into the header member.

Returns
success true/false
bool cineon::Reader::ReadImage ( void *  data,
const DataSize  size = kWord 
)

Read an image element into a buffer that matches the image description type.

The DataSize allows the user to specific the buffer DataSize which can differ from the image element. It is possible, for example, to read an 8-bit per component (3 components per pixel for RGB) into 16-bits.

Parameters
databuffer
sizesize of the buffer component
descelement description type
Returns
success true/false
bool cineon::Reader::ReadUserData ( unsigned char *  data)

Read the user data into a buffer.

Buffer must be large enough to hold the user data.

Parameters
databuffer
Returns
success true/false
void cineon::Reader::Reset ( )

clear any caching or memory allocated specific to an image

void cineon::Reader::SetInStream ( InStream stream)

Set the InStream object to be used to read images.

Parameters
streamObject to use for low level reads

Member Data Documentation

Codec* cineon::Reader::codec
protected
InStream* cineon::Reader::fd
protected
Header cineon::Reader::header

DPX header.

ElementReadStream* cineon::Reader::rio
protected

The documentation for this class was generated from the following files: