boost::gil::pixel
Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept, PixelValueConcept, HomogeneousPixelBasedConcept
Synopsis
Declared in <boost/gil/pixel.hpp>
template<
typename T,
typename L>
struct pixel
: detail::homogeneous_color_base<ChannelValue, Layout, mp11::mp_size<typename Layout::color_space_t>::value>
Description
A pixel is a set of channels defining the color at a given point in an image. Conceptually, a pixel is little more than a color base whose elements model ChannelConcept. The class pixel defines a simple, homogeneous pixel value. It is used to store the value of a color. The built‐in C++ references to pixel, pixel& and const pixel& are used to represent a reference to a pixel inside an interleaved image view (a view in which all channels are together in memory). Similarly, built‐in pointer types pixel* and const pixel* are used as the standard iterator over a row of interleaved homogeneous pixels.
Since pixel inherits the properties of color base, assigning, equality comparison and copy‐construcion are allowed between compatible pixels. This means that an 8‐bit RGB pixel may be assigned to an 8‐bit BGR pixel, or to an 8‐bit planar reference. The channels are properly paired semantically.
The single‐channel (grayscale) instantiation of the class pixel, (i.e. pixel<T,gray_layout_t>) is also convertible to/from a channel value. This allows grayscale pixels to be used in simpler expressions like *gray_pix1 = *gray_pix2 instead of more complicated at_c<0>(gray_pix1) = at_c<0>(gray_pix2) or get_color<gray_color_t>(gray_pix1) = get_color<gray_color_t>(gray_pix2)
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
Subscript operators |
|
Equality operators |
|
Inequality operator |
Template Parameters
Name |
Description |
ChannelValue |
TODO |
Layout |
mp11::make_integer_sequence<int, ColorSpace::size> |
Created with MrDocs