COLOR BASE CONCEPTS. More...
#include <gil_concept.hpp>
Public Member Functions | |
void | constraints () |
Public Attributes | |
ColorBase | cb |
COLOR BASE CONCEPTS.
A color base is a container of color elements (such as channels, channel references or channel pointers) The most common use of color base is in the implementation of a pixel, in which case the color elements are channel values. The color base concept, however, can be used in other scenarios. For example, a planar pixel has channels that are not contiguous in memory. Its reference is a proxy class that uses a color base whose elements are channel references. Its iterator uses a color base whose elements are channel iterators.
A color base must have an associated layout (which consists of a color space, as well as an ordering of the channels). There are two ways to index the elements of a color base: A physical index corresponds to the way they are ordered in memory, and a semantic index corresponds to the way the elements are ordered in their color space. For example, in the RGB color space the elements are ordered as {red_t, green_t, blue_t}. For a color base with a BGR layout, the first element in physical ordering is the blue element, whereas the first semantic element is the red one. Models of ColorBaseConcept
are required to provide the at_c<K>(ColorBase)
function, which allows for accessing the elements based on their physical order. GIL provides a semantic_at_c<K>(ColorBase)
function (described later) which can operate on any model of ColorBaseConcept and returns the corresponding semantic element.
|
inline |
ColorBase boost::gil::ColorBaseConcept< ColorBase >::cb |
Referenced by boost::gil::ColorBaseConcept< ColorBase >::constraints().