Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | List of all members
om::images::base::ImageFrame Class Reference

A class that provides all of the information needed for an ImageFilter to process image data. More...

#include <omImageFrame.h>

Public Member Functions

 ImageFrame ()
 Create a new image frame which has no images and the default capacity. More...
 
 ImageFrame (Size newNumImages)
 Create a new image frame which has the specified number of images (initially all NULL). More...
 
 ImageFrame (Image *newImage)
 Create a new image frame which wraps a single Image object pointer. More...
 
 ImageFrame (Image *newImage1, Image *newImage2)
 Create a new image frame which wraps two Image object pointers. More...
 
 ImageFrame (const ImageFrame &other)
 Create an exact copy of the specified image frame, copying all of its image pointers. More...
 
 ~ImageFrame ()
 Destroy a image frame and release all of its resources. More...
 
ImageFrameoperator= (const ImageFrame &other)
 Assign the contents of the specified image frame, including its image pointers. More...
 
Size getImageCount () const
 Get the number of images that this image frame contains. More...
 
void setImageCount (Size newNumImages)
 Change the size of the internal image array, padding any new image pointers with NULL. More...
 
ImagegetImage (Index imageIndex)
 Return the Image within this image frame at the specified index. More...
 
const ImagegetImage (Index imageIndex) const
 Return the Image within this image frame at the specified index. More...
 
void setImage (Index imageIndex, Image *newImage)
 Replace the Image pointer at the specified index with a new pointer. More...
 
void addImage (Image *newImage)
 Add the specified image pointer to the end of this frame's list of images. More...
 
void insertImage (Index newImageIndex, Image *newImage)
 Insert the specified image pointer at the specified index in this frame's list of images. More...
 
void removeImage (Index imageIndex)
 Remove the image from this image frame at the specified index. More...
 
void clearImages ()
 Remove all images from this image frame. More...
 
void setImagesToNull ()
 Keep the current number of valid images the same, but set all image pointers to NULL. More...
 
void copyTo (ImageFrame &other) const
 Copy this image frame's entire data to another frame, replacing its data. More...
 
void copyMIDITo (ImageFrame &other) const
 Copy this image frame's MIDI data to another frame, replacing its MIDI data. More...
 
const TimegetTime () const
 Return the absolute time of the start of this image frame. More...
 
void setTime (const Time &newTime)
 Set the absolute time of the start of this image frame. More...
 

Static Public Member Functions

static Size getMaximumNumberOfImages ()
 Return the maximum number of images that an image frame can have. More...
 

Detailed Description

A class that provides all of the information needed for an ImageFilter to process image data.

Primarily, a image frame holds an internal array of pointers to Image objects which represent the images for each filter input or output. These images are allowed to be NULL, indicating that either the input at that index was not provided or the output at that index is not needed.

A image frame uses a fixed-size internal array of pointers to Image objects but can also allocate a variable-sized array of image pointers if the capacity of the fixed size array is exceeded. This is done for performance, so that an allocation is not performed in most cases when using multiple images.

Each image frame has an associated absolute timestamp, measured relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC). This allows the filter to detect breaks in the image timeline and react accordingly, or to synchronize image processing, such as with video.

Constructor & Destructor Documentation

om::images::base::ImageFrame::ImageFrame ( )
inline

Create a new image frame which has no images and the default capacity.

om::images::base::ImageFrame::ImageFrame ( Size  newNumImages)
inline

Create a new image frame which has the specified number of images (initially all NULL).

om::images::base::ImageFrame::ImageFrame ( Image newImage)
inline

Create a new image frame which wraps a single Image object pointer.

om::images::base::ImageFrame::ImageFrame ( Image newImage1,
Image newImage2 
)
inline

Create a new image frame which wraps two Image object pointers.

om::images::base::ImageFrame::ImageFrame ( const ImageFrame other)

Create an exact copy of the specified image frame, copying all of its image pointers.

om::images::base::ImageFrame::~ImageFrame ( )
inline

Destroy a image frame and release all of its resources.

Member Function Documentation

ImageFrame& om::images::base::ImageFrame::operator= ( const ImageFrame other)

Assign the contents of the specified image frame, including its image pointers.

Size om::images::base::ImageFrame::getImageCount ( ) const
inline

Get the number of images that this image frame contains.

void om::images::base::ImageFrame::setImageCount ( Size  newNumImages)
inline

Change the size of the internal image array, padding any new image pointers with NULL.

If the number of images is increasing, the new image pointers for the image frame are set to NULL. Otherwise, if the number is decreasing, the extra image pointers are discarded.

Image* om::images::base::ImageFrame::getImage ( Index  imageIndex)
inline

Return the Image within this image frame at the specified index.

const Image* om::images::base::ImageFrame::getImage ( Index  imageIndex) const
inline

Return the Image within this image frame at the specified index.

void om::images::base::ImageFrame::setImage ( Index  imageIndex,
Image newImage 
)
inline

Replace the Image pointer at the specified index with a new pointer.

void om::images::base::ImageFrame::addImage ( Image newImage)
inline

Add the specified image pointer to the end of this frame's list of images.

void om::images::base::ImageFrame::insertImage ( Index  newImageIndex,
Image newImage 
)
inline

Insert the specified image pointer at the specified index in this frame's list of images.

void om::images::base::ImageFrame::removeImage ( Index  imageIndex)
inline

Remove the image from this image frame at the specified index.

This method shifts all image pointers after the specified index back by one index to replace the removed image.

void om::images::base::ImageFrame::clearImages ( )
inline

Remove all images from this image frame.

void om::images::base::ImageFrame::setImagesToNull ( )
inline

Keep the current number of valid images the same, but set all image pointers to NULL.

void om::images::base::ImageFrame::copyTo ( ImageFrame other) const

Copy this image frame's entire data to another frame, replacing its data.

This method is provided as a convenient way to pass through MIDI and audio from an input frame to an output frame if the filter doesn't need to modify the data.

The method iterates over the MIDI and images in this frame and copies their contents to the corresponding images of the other frame if it exists, replacing the previous contents of the other image.

void om::images::base::ImageFrame::copyMIDITo ( ImageFrame other) const

Copy this image frame's MIDI data to another frame, replacing its MIDI data.

This method is provided as a convenient way to pass through MIDI from an input frame to an output frame if the filter doesn't need to modify the MIDI data.

The method iterates over the MIDI images in this frame and copies their contents to the corresponding MIDI image of the other frame if it exists, replacing the previous contents of the other image.

const Time& om::images::base::ImageFrame::getTime ( ) const
inline

Return the absolute time of the start of this image frame.

This is measured relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

void om::images::base::ImageFrame::setTime ( const Time newTime)
inline

Set the absolute time of the start of this image frame.

This is measured relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

static Size om::images::base::ImageFrame::getMaximumNumberOfImages ( )
inlinestatic

Return the maximum number of images that an image frame can have.


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