pfs::Frame Class Reference

Interface representing a single PFS frame. More...

#include <pfs.h>

List of all members.

Public Member Functions

virtual int getWidth () const =0
 Gets width of the channels (in pixels).
virtual int getHeight () const =0
 Gets height of the channels (in pixels).
virtual void getXYZChannels (Channel *&X, Channel *&Y, Channel *&Z)=0
 Gets color channels in XYZ color space.
virtual void createXYZChannels (Channel *&X, Channel *&Y, Channel *&Z)=0
 Creates color channels in XYZ color space.
virtual ChannelgetChannel (const char *name)=0
 Gets a named channel.
virtual ChannelcreateChannel (const char *name)=0
 Creates a named channel.
virtual void removeChannel (Channel *channel)=0
 Removes a channel.
virtual ChannelIteratorgetChannels ()=0
 DEPRECIATED!!! Use getIterator instead.
virtual
ChannelIteratorPtr 
getChannelIterator ()=0
 Use ChannelIterator to iterate over all Channels in the Frame.
virtual TagContainergetTags ()=0
 Returns TagContainer that can be used to access or modify tags associated with this Frame object.


Detailed Description

Interface representing a single PFS frame.

Frame may contain 0 or more channels (e.g. color XYZ, depth channel, alpha channnel). All the channels are of the same size. Frame can also contain additional information in tags (see getTags).

Definition at line 247 of file pfs.h.


Member Function Documentation

virtual void pfs::Frame::getXYZChannels ( Channel *&  X,
Channel *&  Y,
Channel *&  Z 
) [pure virtual]

Gets color channels in XYZ color space.

May return NULLs if such channels do not exist. Values assigned to X, Y, Z are always either all NULLs or valid pointers to channels.

Parameters:
X [out] a pointer to store X channel in
Y [out] a pointer to store Y channel in
Z [out] a pointer to store Z channel in

virtual void pfs::Frame::createXYZChannels ( Channel *&  X,
Channel *&  Y,
Channel *&  Z 
) [pure virtual]

Creates color channels in XYZ color space.

If such channels already exists, returns existing channels, rather than creating new ones. Note, that nothing can be assumed about the content of each channel.

Parameters:
X [out] a pointer to store X channel in
Y [out] a pointer to store Y channel in
Z [out] a pointer to store Z channel in

virtual Channel* pfs::Frame::getChannel ( const char *  name  )  [pure virtual]

Gets a named channel.

Parameters:
name [in] name of the channel. Name must be 8 or less character long.
Returns:
channel or NULL if the channel does not exist

virtual Channel* pfs::Frame::createChannel ( const char *  name  )  [pure virtual]

Creates a named channel.

If the channel already exists, returns existing channel.

Note that new channels should be created only for the first frame. The channels should not changes for the subsequent frames of a sequence.

Parameters:
name [in] name of the channel. Name must be 8 or less character long.
Returns:
existing or newly created channel

virtual void pfs::Frame::removeChannel ( Channel channel  )  [pure virtual]

Removes a channel.

It is safe to remove the channel pointed by the ChannelIterator.

Parameters:
channel [in] channel that should be removed.

virtual ChannelIterator* pfs::Frame::getChannels (  )  [pure virtual]

DEPRECIATED!!! Use getIterator instead.

Returns iterator for all available channels.

Note that only one iterator for particular frame can be used at a time. This method returns each time the same data structure, so the iterator from previous call is lost after the call. The iterator MUST NOT be deleted after use.

Object ChannelIterator MUST NOT be freed. It's responsibility of a Frame object.

virtual ChannelIteratorPtr pfs::Frame::getChannelIterator (  )  [pure virtual]

Use ChannelIterator to iterate over all Channels in the Frame.

ChannelIteratorPtr is a smart pointer, which destructs ChannelIterator when ChannelIteratorPtr is destructed. Use -> operator to access ChannelIterator members from a ChannelIteratorPtr object.

To iterate over all channels, use the following code: pfs::ChannelIteratorPtr it( frame->getChannelIterator() ); while( it->hasNext() ) { pfs::Channel *ch = cit->getNext(); //Do whatever is needed }


The documentation for this class was generated from the following file:
Generated on Tue Nov 25 17:23:48 2008 for Portable Floating-point Streams (pfstools) by  doxygen 1.5.3