blob: b3f4f7a6413132b3e38b98f00bf9a0e99a0d86cf [file] [log] [blame]
<!-- Copyright 2008 Lubomir Bourdev and Hailin Jin
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<!--
Copyright 2005-2007 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
Some files are held under additional license.
Please see "http://stlab.adobe.com/licenses.html" for more information.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<TITLE>Generic Image Library: channel_algorithm.hpp File Reference</TITLE>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/>
<LINK TYPE="text/css" REL="stylesheet" HREF="adobe_source.css"/>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" style='width: 100%; margin: 0; padding: 0'><tr>
<td width="100%" valign="top" style='padding-left: 10px; padding-right: 10px; padding-bottom: 10px'>
<div class="qindex"><a class="qindex" href="index.html">Modules</a>
| <a class="qindex" href="classes.html">Alphabetical List</a>
| <a class="qindex" href="annotated.html">Class List</a>
| <a class="qindex" href="dirs.html">Directories</a>
| <a class="qindex" href="files.html">File List</a>
| <a class="qindex" href="../index.html">GIL Home Page</a>
</div>
<!-- End Header -->
<!-- Generated by Doxygen 1.5.6 -->
<div class="navpath"><a class="el" href="g_i_l_0076.html">boost</a>&nbsp;&raquo&nbsp;<a class="el" href="g_i_l_0079.html">gil</a>
</div>
<div class="contents">
<h1>channel_algorithm.hpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Channel algorithms.
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Lubomir Bourdev and Hailin Jin <br>
Adobe Systems Incorporated </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>2005-2007 <br>
Last updated on May 6, 2007</dd></dl>
Definitions of standard GIL 8-bit, 16-bit, 32-bit channels
<p>
<code>#include &quot;<a class="el" href="g_i_l_0093.html">gil_config.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0014.html">channel.hpp</a>&quot;</code><br>
<code>#include &lt;boost/mpl/less.hpp&gt;</code><br>
<code>#include &lt;boost/mpl/integral_c.hpp&gt;</code><br>
<code>#include &lt;boost/mpl/greater.hpp&gt;</code><br>
<code>#include &lt;boost/type_traits.hpp&gt;</code><br>
<p>
<a href="g_i_l_0015.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost.html">boost</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>boost::gil</b></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>boost::gil::detail</b></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0410.html">channel_converter_unsigned&lt; T, T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converting a channel to itself - identity operation. <a href="g_i_l_0410.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0477.html">channel_converter_unsigned_impl</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the default implementation. Performance specializatons are provided. <a href="g_i_l_0477.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0414.html">channel_converter_unsigned&lt; bits32f, DstChannelV &gt;</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0412.html">channel_converter_unsigned&lt; bits32, bits32f &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">32 bit &lt;-&gt; float channel conversion <a href="g_i_l_0412.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0416.html">channel_converter_unsigned&lt; bits32f, bits32 &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">32 bit &lt;-&gt; float channel conversion <a href="g_i_l_0416.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0408.html">channel_converter</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A unary function object converting between channel types. <a href="g_i_l_0408.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0450.html">default_channel_converter</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Same as <a class="el" href="g_i_l_0408.html" title="A unary function object converting between channel types.">channel_converter</a>, except it takes the destination channel by reference, which allows us to move the templates from the class level to the method level. This is important when invoking it on heterogeneous pixels. <a href="g_i_l_0450.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0422.html">channel_multiplier_unsigned</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the default implementation. Performance specializatons are provided. <a href="g_i_l_0422.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0428.html">channel_multiplier_unsigned&lt; bits8 &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specialization of channel_multiply for 8-bit unsigned channels. <a href="g_i_l_0428.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0424.html">channel_multiplier_unsigned&lt; bits16 &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specialization of channel_multiply for 16-bit unsigned channels. <a href="g_i_l_0424.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0426.html">channel_multiplier_unsigned&lt; bits32f &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specialization of channel_multiply for float 0..1 channels. <a href="g_i_l_0426.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0420.html">channel_multiplier</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function object to multiply two channels. result = a * b / max_value. <a href="g_i_l_0420.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gf04e6ac30a35a1f68a8bb84730e34786"></a><!-- doxytag: member="channel_algorithm.hpp::channel_convert" ref="gf04e6ac30a35a1f68a8bb84730e34786" args="(SrcChannel src)" -->
template&lt;typename DstChannel, typename SrcChannel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_traits&lt; DstChannel &gt;<br>
::value_type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0099.html#gf04e6ac30a35a1f68a8bb84730e34786">channel_convert</a> (SrcChannel src)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converting from one channel type to another. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36fdfb4869446c1151d0850faf72e3b3"></a><!-- doxytag: member="channel_algorithm.hpp::div255" ref="36fdfb4869446c1151d0850faf72e3b3" args="(uint32_t in)" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><b>div255</b> (uint32_t in)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="114bcacf9a7cce97638fe8704d44559f"></a><!-- doxytag: member="channel_algorithm.hpp::div32768" ref="114bcacf9a7cce97638fe8704d44559f" args="(uint32_t in)" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><b>div32768</b> (uint32_t in)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gf73b2a47a7877767534df0eee46dda17"></a><!-- doxytag: member="channel_algorithm.hpp::channel_multiply" ref="gf73b2a47a7877767534df0eee46dda17" args="(Channel a, Channel b)" -->
template&lt;typename Channel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_traits&lt; Channel &gt;<br>
::value_type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0103.html#gf73b2a47a7877767534df0eee46dda17">channel_multiply</a> (Channel a, Channel b)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function multiplying two channels. result = a * b / max_value. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ge2e0267865f89610ef26148874a04bb5"></a><!-- doxytag: member="channel_algorithm.hpp::channel_invert" ref="ge2e0267865f89610ef26148874a04bb5" args="(Channel x)" -->
template&lt;typename Channel&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">channel_traits&lt; Channel &gt;<br>
::value_type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0101.html#ge2e0267865f89610ef26148874a04bb5">channel_invert</a> (Channel x)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default implementation. Provide overloads for performance. <br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:15 2009 for Generic Image Library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>