]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <!-- Copyright 2008 Lubomir Bourdev and Hailin Jin |
2 | ||
3 | Distributed under the Boost Software License, Version 1.0. | |
4 | (See accompanying file LICENSE_1_0.txt or copy at | |
5 | http://www.boost.org/LICENSE_1_0.txt) | |
6 | --> | |
7 | ||
8 | <!-- | |
9 | Copyright 2005-2007 Adobe Systems Incorporated | |
10 | Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt | |
11 | or a copy at http://stlab.adobe.com/licenses.html) | |
12 | ||
13 | Some files are held under additional license. | |
14 | Please see "http://stlab.adobe.com/licenses.html" for more information. | |
15 | --> | |
16 | ||
17 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
18 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
19 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
20 | ||
21 | <head> | |
22 | <TITLE>Generic Image Library: ColorBaseConcept Struct Template Reference</TITLE> | |
23 | <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/> | |
24 | <LINK TYPE="text/css" REL="stylesheet" HREF="adobe_source.css"/> | |
25 | </head> | |
26 | <body> | |
27 | <table border="0" cellspacing="0" cellpadding="0" style='width: 100%; margin: 0; padding: 0'><tr> | |
28 | <td width="100%" valign="top" style='padding-left: 10px; padding-right: 10px; padding-bottom: 10px'> | |
29 | <div class="qindex"><a class="qindex" href="index.html">Modules</a> | |
30 | | <a class="qindex" href="classes.html">Alphabetical List</a> | |
31 | | <a class="qindex" href="annotated.html">Class List</a> | |
32 | | <a class="qindex" href="dirs.html">Directories</a> | |
33 | | <a class="qindex" href="files.html">File List</a> | |
34 | | <a class="qindex" href="../index.html">GIL Home Page</a> | |
35 | </div> | |
36 | <!-- End Header --> | |
37 | <!-- Generated by Doxygen 1.5.6 --> | |
38 | <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<b>gil</b>::<a class="el" href="g_i_l_0274.html">ColorBaseConcept</a> | |
39 | </div> | |
40 | <div class="contents"> | |
41 | <h1>ColorBaseConcept Struct Template Reference<br> | |
42 | <small> | |
43 | [<a class="el" href="g_i_l_0117.html">Concepts</a>]</small> | |
44 | </h1><!-- doxytag: class="boost::gil::ColorBaseConcept" --><code>#include <<a class="el" href="g_i_l_0091.html">gil_concept.hpp</a>></code> | |
45 | <p> | |
46 | ||
47 | <p> | |
48 | <a href="g_i_l_0273.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> | |
49 | <h3>template<typename ColorBase><br> | |
50 | struct boost::gil::ColorBaseConcept< ColorBase ></h3> | |
51 | ||
52 | A color base is a container of color elements (such as channels, channel references or channel pointers). | |
53 | <p> | |
54 | COLOR BASE CONCEPTS The most common use of color base is in the implementation of a <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a>, in which case the color elements are channel values. The color base concept, however, can be used in other scenarios. For example, a planar <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> 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.<p> | |
55 | A color base must have an associated <a class="el" href="g_i_l_0567.html" title="Represents a color space and ordering of channels in memory.">layout</a> (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 {<a class="el" href="g_i_l_0618.html" title="Red.">red_t</a>, <a class="el" href="g_i_l_0537.html" title="Green.">green_t</a>, <a class="el" href="g_i_l_0405.html" title="Blue.">blue_t</a>}. For a color base with a BGR <a class="el" href="g_i_l_0567.html" title="Represents a color space and ordering of channels in memory.">layout</a>, the first element in physical ordering is the blue element, whereas the first semantic element is the red one. Models of <code><a class="el" href="g_i_l_0274.html" title="A color base is a container of color elements (such as channels, channel references...">ColorBaseConcept</a></code> are required to provide the <code>at_c<K>(ColorBase)</code> function, which allows for accessing the elements based on their physical order. GIL provides a <code>semantic_at_c<K>(ColorBase)</code> function (described later) which can operate on any model of <a class="el" href="g_i_l_0274.html" title="A color base is a container of color elements (such as channels, channel references...">ColorBaseConcept</a> and returns the corresponding semantic element.<p> | |
56 | <div class="fragment"><pre class="fragment">concept ColorBaseConcept<typename T> : CopyConstructible<T>, EqualityComparable<T> { | |
57 | <span class="comment">// a GIL layout (the color space and element permutation)</span> | |
58 | <span class="keyword">typename</span> layout_t; | |
59 | ||
60 | <span class="comment">// The type of K-th element</span> | |
61 | <span class="keyword">template</span> <<span class="keywordtype">int</span> K> <span class="keyword">struct </span>kth_element_type; where Metafunction<kth_element_type>; | |
62 | ||
63 | <span class="comment">// The result of at_c</span> | |
64 | <span class="keyword">template</span> <<span class="keywordtype">int</span> K> <span class="keyword">struct </span>kth_element_const_reference_type; where Metafunction<kth_element_const_reference_type>; | |
65 | ||
66 | <span class="keyword">template</span> <<span class="keywordtype">int</span> K> kth_element_const_reference_type<T,K>::type at_c(T); | |
67 | ||
68 | <span class="comment">// Copy-constructible and equality comparable with other compatible color bases</span> | |
69 | <span class="keyword">template</span> <ColorBaseConcept T2> where { ColorBasesCompatibleConcept<T,T2> } | |
70 | T::T(T2); | |
71 | <span class="keyword">template</span> <ColorBaseConcept T2> where { ColorBasesCompatibleConcept<T,T2> } | |
72 | <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> T&, <span class="keyword">const</span> T2&); | |
73 | <span class="keyword">template</span> <ColorBaseConcept T2> where { ColorBasesCompatibleConcept<T,T2> } | |
74 | <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> T&, <span class="keyword">const</span> T2&); | |
75 | ||
76 | }; | |
77 | </pre></div> <table border="0" cellpadding="0" cellspacing="0"> | |
78 | <tr><td></td></tr> | |
79 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> | |
80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0a0dbf6ca9028bbbb2240cad5882537"></a><!-- doxytag: member="boost::gil::ColorBaseConcept::constraints" ref="b0a0dbf6ca9028bbbb2240cad5882537" args="()" --> | |
81 | void </td><td class="memItemRight" valign="bottom"><b>constraints</b> ()</td></tr> | |
82 | ||
83 | <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> | |
84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36965b52a82be93752886f21e7efcf94"></a><!-- doxytag: member="boost::gil::ColorBaseConcept::cb" ref="36965b52a82be93752886f21e7efcf94" args="" --> | |
85 | ColorBase </td><td class="memItemRight" valign="bottom"><b>cb</b></td></tr> | |
86 | ||
87 | </table> | |
88 | <hr>The documentation for this struct was generated from the following file:<ul> | |
89 | <li><a class="el" href="g_i_l_0091.html">gil_concept.hpp</a></ul> | |
90 | </div> | |
91 | <hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:17 2009 for Generic Image Library by | |
92 | <a href="http://www.doxygen.org/index.html"> | |
93 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> | |
94 | </body> | |
95 | </html> |