libpsynth 0.2.1
frame
frame

A homogeneous frame value. More...

Collaboration diagram for frame:

A homogeneous frame value.

Models HomogeneousFrameValueConcept

Represents a frame value (a container of samples). Models: HomogeneousChannelBaseValueConcept, FrameValueConcept, HomogeneousFrameBasedConcept

A frame is a set of samples defining the channel at a given point in an image. Conceptually, a frame is little more than a channel base whose elements model SampleConcept. The class frame defines a simple, homogeneous frame value. It is used to store the value of a channel. The built-in C++ references to frame, frame& and const frame& are used to represent a reference to a frame inside an interleaved image range (a range in which all samples are together in memory). Similarly, built-in pointer types frame* and const frame* are used as the standard iterator over a row of interleaved homogeneous frames.

Since frame inherits the properties of channel base, assigning, equality comparison and copy-construcion are allowed between compatible frames. This means that an 8-bit RGB frame may be assigned to an 8-bit BGR frame, or to an 8-bit planar reference. The samples are properly paired semantically.

The single-sample (monoscale) instantiation of the class frame, (i.e. frame<T,mono_layout>) is also convertible to/from a sample value. This allows monoscale frames to be used in simpler expressions like *mono_pix1 = *mono_pix2 instead of more complicated at_c<0>(mono_pix1) = at_c<0>(mono_pix2) or get_channel<mono_channel_t>(mono_pix1) = get_channel<mono_channel_t>(mono_pix2)