Om
1.0.0
A universal framework for multimedia simulation
|
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... | |
ImageFrame & | operator= (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... | |
Image * | getImage (Index imageIndex) |
Return the Image within this image frame at the specified index. More... | |
const Image * | getImage (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 Time & | getTime () 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... | |
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.
|
inline |
Create a new image frame which has no images and the default capacity.
|
inline |
Create a new image frame which has the specified number of images (initially all NULL).
|
inline |
Create a new image frame which wraps a single Image object pointer.
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.
|
inline |
Destroy a image frame and release all of its resources.
ImageFrame& om::images::base::ImageFrame::operator= | ( | const ImageFrame & | other | ) |
Assign the contents of the specified image frame, including its image pointers.
|
inline |
Get the number of images that this image frame contains.
|
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.
Return the Image within this image frame at the specified index.
Return the Image within this image frame at the specified index.
Replace the Image pointer at the specified index with a new pointer.
|
inline |
Add the specified image pointer to the end of this frame's list of images.
Insert the specified image pointer at the specified index in this frame's list of images.
|
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.
|
inline |
Remove all images from this image frame.
|
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.
|
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).
|
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).
|
inlinestatic |
Return the maximum number of images that an image frame can have.