1 <!-- Copyright 2008 Lubomir Bourdev and Hailin Jin
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)
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)
13 Some files are held under additional license.
14 Please see "http://stlab.adobe.com/licenses.html" for more information.
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">
22 <TITLE>Generic Image Library: channel_algorithm.hpp File 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"/>
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>
37 <!-- Generated by Doxygen 1.5.6 -->
38 <div class=
"navpath"><a class=
"el" href=
"g_i_l_0076.html">boost
</a> »
<a class=
"el" href=
"g_i_l_0079.html">gil
</a>
40 <div class=
"contents">
41 <h1>channel_algorithm.hpp File Reference
</h1><hr><a name=
"_details"></a><h2>Detailed Description
</h2>
44 <dl class=
"author" compact
><dt><b>Author:
</b></dt><dd>Lubomir Bourdev and Hailin Jin
<br>
45 Adobe Systems Incorporated
</dd></dl>
46 <dl class=
"date" compact
><dt><b>Date:
</b></dt><dd>2005-
2007 <br>
47 Last updated on May
6,
2007</dd></dl>
48 Definitions of standard GIL
8-bit,
16-bit,
32-bit channels
50 <code>#include
"<a class=
"el" href=
"g_i_l_0093.html">gil_config.hpp
</a>"</code><br>
51 <code>#include
"<a class=
"el" href=
"g_i_l_0014.html">channel.hpp
</a>"</code><br>
52 <code>#include
<boost/mpl/less.hpp
></code><br>
53 <code>#include
<boost/mpl/integral_c.hpp
></code><br>
54 <code>#include
<boost/mpl/greater.hpp
></code><br>
55 <code>#include
<boost/type_traits.hpp
></code><br>
58 <a href=
"g_i_l_0015.html">Go to the source code of this file.
</a><table border=
"0" cellpadding=
"0" cellspacing=
"0">
60 <tr><td colspan=
"2"><br><h2>Namespaces
</h2></td></tr>
61 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">namespace
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"namespaceboost.html">boost
</a></td></tr>
63 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">namespace
</td><td class=
"memItemRight" valign=
"bottom"><b>boost::gil
</b></td></tr>
65 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">namespace
</td><td class=
"memItemRight" valign=
"bottom"><b>boost::gil::detail
</b></td></tr>
67 <tr><td colspan=
"2"><br><h2>Classes
</h2></td></tr>
68 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0410.html">channel_converter_unsigned
< T, T
></a></td></tr>
70 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Converting a channel to itself - identity operation.
<a href=
"g_i_l_0410.html#_details">More...
</a><br></td></tr>
71 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0477.html">channel_converter_unsigned_impl
</a></td></tr>
73 <tr><td class=
"mdescLeft"> </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>
74 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0414.html">channel_converter_unsigned
< bits32f, DstChannelV
></a></td></tr>
76 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0412.html">channel_converter_unsigned
< bits32, bits32f
></a></td></tr>
78 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">32 bit
<-
> float channel conversion
<a href=
"g_i_l_0412.html#_details">More...
</a><br></td></tr>
79 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0416.html">channel_converter_unsigned
< bits32f, bits32
></a></td></tr>
81 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">32 bit
<-
> float channel conversion
<a href=
"g_i_l_0416.html#_details">More...
</a><br></td></tr>
82 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0408.html">channel_converter
</a></td></tr>
84 <tr><td class=
"mdescLeft"> </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>
85 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0450.html">default_channel_converter
</a></td></tr>
87 <tr><td class=
"mdescLeft"> </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>
88 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0422.html">channel_multiplier_unsigned
</a></td></tr>
90 <tr><td class=
"mdescLeft"> </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>
91 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0428.html">channel_multiplier_unsigned
< bits8
></a></td></tr>
93 <tr><td class=
"mdescLeft"> </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>
94 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0424.html">channel_multiplier_unsigned
< bits16
></a></td></tr>
96 <tr><td class=
"mdescLeft"> </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>
97 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0426.html">channel_multiplier_unsigned
< bits32f
></a></td></tr>
99 <tr><td class=
"mdescLeft"> </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>
100 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0420.html">channel_multiplier
</a></td></tr>
102 <tr><td class=
"mdescLeft"> </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>
103 <tr><td colspan=
"2"><br><h2>Functions
</h2></td></tr>
104 <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)" -->
105 template
<typename DstChannel, typename SrcChannel
> </td></tr>
106 <tr><td class=
"memTemplItemLeft" nowrap
align=
"right" valign=
"top">channel_traits
< DstChannel
><br>
107 ::value_type
</td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0099.html#gf04e6ac30a35a1f68a8bb84730e34786">channel_convert
</a> (SrcChannel src)
</td></tr>
109 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Converting from one channel type to another.
<br></td></tr>
110 <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)" -->
111 uint32_t
</td><td class=
"memItemRight" valign=
"bottom"><b>div255
</b> (uint32_t in)
</td></tr>
113 <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)" -->
114 uint32_t
</td><td class=
"memItemRight" valign=
"bottom"><b>div32768
</b> (uint32_t in)
</td></tr>
116 <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)" -->
117 template
<typename Channel
> </td></tr>
118 <tr><td class=
"memTemplItemLeft" nowrap
align=
"right" valign=
"top">channel_traits
< Channel
><br>
119 ::value_type
</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>
121 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">A function multiplying two channels. result = a * b / max_value.
<br></td></tr>
122 <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)" -->
123 template
<typename Channel
> </td></tr>
124 <tr><td class=
"memTemplItemLeft" nowrap
align=
"right" valign=
"top">channel_traits
< Channel
><br>
125 ::value_type
</td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"g_i_l_0101.html#ge2e0267865f89610ef26148874a04bb5">channel_invert
</a> (Channel x)
</td></tr>
127 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Default implementation. Provide overloads for performance.
<br></td></tr>
130 <hr size=
"1"><address style=
"text-align: right;"><small>Generated on Sat May
2 13:
50:
15 2009 for Generic Image Library by
131 <a href=
"http://www.doxygen.org/index.html">
132 <img src=
"doxygen.png" alt=
"doxygen" align=
"middle" border=
"0"></a> 1.5.6 </small></address>