structboost_1_1gil_1_1_color_base_concept.html 9.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!-- HTML header for doxygen 1.8.13-->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  6. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  7. <meta name="generator" content="Doxygen 1.8.15"/>
  8. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  9. <title>Generic Image Library: ColorBaseConcept&lt; ColorBase &gt; Struct Template Reference</title>
  10. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  11. <script type="text/javascript" src="jquery.js"></script>
  12. <script type="text/javascript" src="dynsections.js"></script>
  13. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  14. <link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
  15. </head>
  16. <body>
  17. <div class="boost-header">
  18. <table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
  19. <tr>
  20. <td valign="top" width="300">
  21. <h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
  22. </td>
  23. <td ><h1 align="center"><a href="../index.html"></a></h1></td>
  24. <td></td>
  25. </tr>
  26. </table>
  27. </div>
  28. <hr/>
  29. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  30. <!-- Generated by Doxygen 1.8.15 -->
  31. <script type="text/javascript" src="menudata.js"></script>
  32. <script type="text/javascript" src="menu.js"></script>
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. $(function() {
  36. initMenu('',false,false,'search.php','Search');
  37. });
  38. /* @license-end */</script>
  39. <div id="main-nav"></div>
  40. <div id="nav-path" class="navpath">
  41. <ul>
  42. <li class="navelem"><b>boost</b></li><li class="navelem"><b>gil</b></li><li class="navelem"><a class="el" href="structboost_1_1gil_1_1_color_base_concept.html">ColorBaseConcept</a></li> </ul>
  43. </div>
  44. </div><!-- top -->
  45. <div class="header">
  46. <div class="summary">
  47. <a href="#pub-methods">Public Member Functions</a> &#124;
  48. <a href="#pub-attribs">Public Attributes</a> &#124;
  49. <a href="structboost_1_1gil_1_1_color_base_concept-members.html">List of all members</a> </div>
  50. <div class="headertitle">
  51. <div class="title">ColorBaseConcept&lt; ColorBase &gt; Struct Template Reference<div class="ingroups"><a class="el" href="group___color_base.html">ColorBase</a> &raquo; <a class="el" href="group___color_base_concept.html">Concepts</a></div></div> </div>
  52. </div><!--header-->
  53. <div class="contents">
  54. <p>A color base is a container of color elements (such as channels, channel references or channel pointers).
  55. <a href="structboost_1_1gil_1_1_color_base_concept.html#details">More...</a></p>
  56. <p><code>#include &lt;<a class="el" href="concepts_2color__base_8hpp_source.html">color_base.hpp</a>&gt;</code></p>
  57. <table class="memberdecls">
  58. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  59. Public Member Functions</h2></td></tr>
  60. <tr class="memitem:ab0a0dbf6ca9028bbbb2240cad5882537"><td class="memItemLeft" align="right" valign="top"><a id="ab0a0dbf6ca9028bbbb2240cad5882537"></a>
  61. void&#160;</td><td class="memItemRight" valign="bottom"><b>constraints</b> ()</td></tr>
  62. <tr class="separator:ab0a0dbf6ca9028bbbb2240cad5882537"><td class="memSeparator" colspan="2">&#160;</td></tr>
  63. </table><table class="memberdecls">
  64. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  65. Public Attributes</h2></td></tr>
  66. <tr class="memitem:a36965b52a82be93752886f21e7efcf94"><td class="memItemLeft" align="right" valign="top"><a id="a36965b52a82be93752886f21e7efcf94"></a>
  67. ColorBase&#160;</td><td class="memItemRight" valign="bottom"><b>cb</b></td></tr>
  68. <tr class="separator:a36965b52a82be93752886f21e7efcf94"><td class="memSeparator" colspan="2">&#160;</td></tr>
  69. </table>
  70. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  71. <div class="textblock"><h3>template&lt;typename ColorBase&gt;<br />
  72. struct boost::gil::ColorBaseConcept&lt; ColorBase &gt;</h3>
  73. <p>A color base is a container of color elements (such as channels, channel references or channel pointers). </p>
  74. <p>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.</p>
  75. <p>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 {<a class="el" href="structboost_1_1gil_1_1red__t.html" title="Red.">red_t</a>, <a class="el" href="structboost_1_1gil_1_1green__t.html" title="Green.">green_t</a>, <a class="el" href="structboost_1_1gil_1_1blue__t.html" title="Blue.">blue_t</a>}. 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 <code><a class="el" href="structboost_1_1gil_1_1_color_base_concept.html" title="A color base is a container of color elements (such as channels, channel references or channel pointe...">ColorBaseConcept</a></code> are required to provide the <code>at_c&lt;K&gt;(ColorBase)</code> function, which allows for accessing the elements based on their physical order. GIL provides a <code>semantic_at_c&lt;K&gt;(ColorBase)</code> function (described later) which can operate on any model of <a class="el" href="structboost_1_1gil_1_1_color_base_concept.html" title="A color base is a container of color elements (such as channels, channel references or channel pointe...">ColorBaseConcept</a> and returns the corresponding semantic element.</p>
  76. <div class="fragment"><div class="line">concept ColorBaseConcept&lt;typename T&gt; : CopyConstructible&lt;T&gt;, EqualityComparable&lt;T&gt;</div><div class="line">{</div><div class="line"> <span class="comment">// a GIL layout (the color space and element permutation)</span></div><div class="line"> <span class="keyword">typename</span> layout_t;</div><div class="line"></div><div class="line"> <span class="comment">// The type of K-th element</span></div><div class="line"> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> K&gt;</div><div class="line"> <span class="keyword">struct </span>kth_element_type;</div><div class="line"> where Metafunction&lt;kth_element_type&gt;;</div><div class="line"></div><div class="line"> <span class="comment">// The result of at_c</span></div><div class="line"> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> K&gt;</div><div class="line"> <span class="keyword">struct </span>kth_element_const_reference_type;</div><div class="line"> where Metafunction&lt;kth_element_const_reference_type&gt;;</div><div class="line"></div><div class="line"> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> K&gt;</div><div class="line"> kth_element_const_reference_type&lt;T,K&gt;::type <a class="code" href="group___color_base_model_homogeneous.html#gae2eaf5eecbad94d7dc6432b8f759fba0">at_c</a>(T);</div><div class="line"></div><div class="line"> <span class="comment">// Copy-constructible and equality comparable with other compatible color bases</span></div><div class="line"> <span class="keyword">template</span> &lt;ColorBaseConcept T2&gt; where { ColorBasesCompatibleConcept&lt;T,T2&gt; }</div><div class="line"> T::T(T2);</div><div class="line"> <span class="keyword">template</span> &lt;ColorBaseConcept T2&gt; where { ColorBasesCompatibleConcept&lt;T,T2&gt; }</div><div class="line"> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> T&amp;, <span class="keyword">const</span> T2&amp;);</div><div class="line"> <span class="keyword">template</span> &lt;ColorBaseConcept T2&gt; where { ColorBasesCompatibleConcept&lt;T,T2&gt; }</div><div class="line"> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> T&amp;, <span class="keyword">const</span> T2&amp;);</div><div class="line">};</div></div><!-- fragment --> </div><hr/>The documentation for this struct was generated from the following file:<ul>
  77. <li><a class="el" href="concepts_2color__base_8hpp_source.html">concepts/color_base.hpp</a></li>
  78. </ul>
  79. </div><!-- contents -->
  80. <!-- HTML footer for doxygen 1.8.13-->
  81. <!-- start footer part -->
  82. <hr class="footer"/>
  83. <address class="footer">
  84. <small>
  85. Generated by &#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.15
  86. </small>
  87. </address>
  88. </body>
  89. </html>