]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/gil/doc/html/g_i_l_0114.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / gil / doc / html / g_i_l_0114.html
CommitLineData
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: kth_semantic_element_type, kth_semantic_element_reference_type, kth_semantic_element_const_reference_type, semantic_at_c</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="contents">
39<h1>kth_semantic_element_type, kth_semantic_element_reference_type, kth_semantic_element_const_reference_type, semantic_at_c<br>
40<small>
41[<a class="el" href="g_i_l_0105.html">Algorithms and Utility Functions</a>]</small>
42</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
43Support for accessing the elements of a color base by semantic index.
44<p>
45semantic_at_c: Semantic channel accessors<p>
46The semantic index of an element is the index of its color in the color space. Semantic indexing allows for proper pairing of elements of color bases independent on their <a class="el" href="g_i_l_0567.html" title="Represents a color space and ordering of channels in memory.">layout</a>. For example, red is the first semantic element of a color base regardless of whether it has an RGB <a class="el" href="g_i_l_0567.html" title="Represents a color space and ordering of channels in memory.">layout</a> or a BGR <a class="el" href="g_i_l_0567.html" title="Represents a color space and ordering of channels in memory.">layout</a>. All GIL color base algorithms taking multiple color bases use semantic indexing to access their elements.<p>
47Example: <div class="fragment"><pre class="fragment"><span class="comment">// 16-bit BGR pixel, 4 bits for the blue, 3 bits for the green, 2 bits for the red channel and 7 unused bits</span>
48<span class="keyword">typedef</span> packed_pixel_type&lt;uint16_t, mpl::vector3_c&lt;unsigned,4,3,2&gt;, bgr_layout_t&gt;::type bgr432_pixel_t;
49
50<span class="comment">// A reference to its red channel. Although the red channel is the third, its semantic index is 0 in the RGB color space</span>
51<span class="keyword">typedef</span> kth_semantic_element_reference_type&lt;bgr432_pixel_t, 0&gt;::type red_channel_reference_t;
52
53<span class="comment">// Initialize the pixel to black</span>
54bgr432_pixel_t red_pixel(0,0,0);
55
56<span class="comment">// Set the red channel to 100%</span>
57red_channel_reference_t red_channel = semantic_at_c&lt;0&gt;(red_pixel);
58red_channel = channel_traits&lt;red_channel_reference_t&gt;::max_value();
59</pre></div>
60<p>
61<table border="0" cellpadding="0" cellspacing="0">
62<tr><td></td></tr>
63<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
64<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0565.html">kth_semantic_element_type</a></td></tr>
65
66<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies the type of the K-th semantic element of a color base. <a href="g_i_l_0565.html#_details">More...</a><br></td></tr>
67<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0563.html">kth_semantic_element_reference_type</a></td></tr>
68
69<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies the return type of the mutable semantic_at_c&lt;K&gt;(color_base);. <a href="g_i_l_0563.html#_details">More...</a><br></td></tr>
70<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0561.html">kth_semantic_element_const_reference_type</a></td></tr>
71
72<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies the return type of the constant semantic_at_c&lt;K&gt;(color_base);. <a href="g_i_l_0561.html#_details">More...</a><br></td></tr>
73<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
74<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2cdd9bfd1b27576659b8c79a3a0233de"></a><!-- doxytag: member="ColorBaseAlgorithmSemanticAtC::semantic_at_c" ref="g2cdd9bfd1b27576659b8c79a3a0233de" args="(ColorBase &amp;p)" -->
75template&lt;int K, typename ColorBase&gt; </td></tr>
76<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">disable_if&lt; is_const<br>
77&lt; ColorBase &gt;, typename <br>
78kth_semantic_element_reference_type<br>
79&lt; ColorBase, K &gt;::type &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0114.html#g2cdd9bfd1b27576659b8c79a3a0233de">semantic_at_c</a> (ColorBase &amp;p)</td></tr>
80
81<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A mutable accessor to the K-th semantic element of a color base. <br></td></tr>
82<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gba9e03ce04fda71e2e840c10325b8b11"></a><!-- doxytag: member="ColorBaseAlgorithmSemanticAtC::semantic_at_c" ref="gba9e03ce04fda71e2e840c10325b8b11" args="(const ColorBase &amp;p)" -->
83template&lt;int K, typename ColorBase&gt; </td></tr>
84<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">kth_semantic_element_const_reference_type<br>
85&lt; ColorBase, K &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0114.html#gba9e03ce04fda71e2e840c10325b8b11">semantic_at_c</a> (const ColorBase &amp;p)</td></tr>
86
87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A constant accessor to the K-th semantic element of a color base. <br></td></tr>
88</table>
89</div>
90<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:17 2009 for Generic Image Library by&nbsp;
91<a href="http://www.doxygen.org/index.html">
92<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
93</body>
94</html>