blob: a60f858845eb9e42369c28caa7bf50a36140a6b9 [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: image_view_factory.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>image_view_factory.hpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Methods for constructing image views from raw data or other image views /.
<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 March 9, 2007 / Methods for creating shallow image views from raw pixel data or from other image views - / flipping horizontally or vertically, axis-aligned rotation, a subimage, subsampled / or n-th channel image view. Derived image views are shallow copies and are fast to construct. </dd></dl>
<p>
<code>#include &lt;cassert&gt;</code><br>
<code>#include &lt;cstddef&gt;</code><br>
<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_0237.html">metafunctions.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0095.html">gray.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0070.html">color_convert.hpp</a>&quot;</code><br>
<p>
<a href="g_i_l_0226.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_0532.html">dynamic_xy_step_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the type of a view that has a dynamic step along both X and Y. <a href="g_i_l_0532.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_0531.html">dynamic_xy_step_transposed_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the type of a transposed view that has a dynamic step along both X and Y. <a href="g_i_l_0531.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0022.html">color_convert_deref_fn</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function object that given a source <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a>, returns it converted to a given color space and channel depth. Models: <a class="el" href="g_i_l_0350.html" title="Represents a unary function object that can be invoked upon dereferencing a pixel...">PixelDereferenceAdaptorConcept</a>. <a href="g_i_l_0022.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_0434.html">color_converted_view_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the type of a view that does color conversion upon dereferencing its pixels. <a href="g_i_l_0434.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_0515.html">nth_channel_deref_fn</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function object that returns a grayscale reference of the N-th channel of a given reference. Models: <a class="el" href="g_i_l_0350.html" title="Represents a unary function object that can be invoked upon dereferencing a pixel...">PixelDereferenceAdaptorConcept</a>.<p>
If the input is a <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> value or constant reference, the function object is immutable. Otherwise it is mutable (and returns non-const reference to the n-th channel). <a href="g_i_l_0515.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_0578.html">nth_channel_view_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given a source <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> view type View, returns the type of an <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> view over a single channel of View<p>
If the channels in the source view are adjacent in memory (such as planar non-step view or single-channel view) then the return view is a single-channel non-step view. If the channels are non-adjacent (interleaved and/or step view) then the return view is a single-channel step view. <a href="g_i_l_0578.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_0513.html">kth_channel_deref_fn</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function object that returns a grayscale reference of the K-th channel (specified as a template parameter) of a given reference. Models: <a class="el" href="g_i_l_0350.html" title="Represents a unary function object that can be invoked upon dereferencing a pixel...">PixelDereferenceAdaptorConcept</a>.<p>
If the input is a <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> value or constant reference, the function object is immutable. Otherwise it is mutable (and returns non-const reference to the k-th channel). <a href="g_i_l_0513.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_0559.html">kth_channel_view_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given a source <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> view type View, returns the type of an <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> view over a given channel of View.<p>
If the channels in the source view are adjacent in memory (such as planar non-step view or single-channel view) then the return view is a single-channel non-step view. If the channels are non-adjacent (interleaved and/or step view) then the return view is a single-channel step view. <a href="g_i_l_0559.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="g258d615c33c66b17c85b018297164df1"></a><!-- doxytag: member="image_view_factory.hpp::interleaved_view" ref="g258d615c33c66b17c85b018297164df1" args="(std::size_t width, std::size_t height, Iterator pixels, std::ptrdiff_t rowsize_in_bytes)" -->
template&lt;typename Iterator&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">type_from_x_iterator&lt; Iterator &gt;<br>
::view_t&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0140.html#g258d615c33c66b17c85b018297164df1">interleaved_view</a> (std::size_t width, std::size_t height, Iterator pixels, std::ptrdiff_t rowsize_in_bytes)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructing <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> views from raw interleaved <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> data. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g558c29855a5b73404d4d21f22832a624"></a><!-- doxytag: member="image_view_factory.hpp::interleaved_view" ref="g558c29855a5b73404d4d21f22832a624" args="(point2&lt; std::size_t &gt; dim, Iterator pixels, std::ptrdiff_t rowsize_in_bytes)" -->
template&lt;typename Iterator&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">type_from_x_iterator&lt; Iterator &gt;<br>
::view_t&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0140.html#g558c29855a5b73404d4d21f22832a624">interleaved_view</a> (point2&lt; std::size_t &gt; dim, Iterator pixels, std::ptrdiff_t rowsize_in_bytes)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructing <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> views from raw interleaved <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> data. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g01d2b0e1eb77cd5cafb18f4140278918"></a><!-- doxytag: member="image_view_factory.hpp::interleaved_view_get_raw_data" ref="g01d2b0e1eb77cd5cafb18f4140278918" args="(const HomogeneousView &amp;view)" -->
template&lt;typename HomogeneousView&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">detail::channel_pointer_type<br>
&lt; HomogeneousView &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0140.html#g01d2b0e1eb77cd5cafb18f4140278918">interleaved_view_get_raw_data</a> (const HomogeneousView &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns C pointer to the the channels of an interleaved homogeneous view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga696176662e719ef5637c2ed4d9a2035"></a><!-- doxytag: member="image_view_factory.hpp::planar_view_get_raw_data" ref="ga696176662e719ef5637c2ed4d9a2035" args="(const HomogeneousView &amp;view, int plane_index)" -->
template&lt;typename HomogeneousView&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">detail::channel_pointer_type<br>
&lt; HomogeneousView &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0140.html#ga696176662e719ef5637c2ed4d9a2035">planar_view_get_raw_data</a> (const HomogeneousView &amp;view, int plane_index)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns C pointer to the the channels of a given color plane of a planar homogeneous view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb5114cdb6c2a34f6706952f80baf2dfa"></a><!-- doxytag: member="image_view_factory.hpp::color_converted_view" ref="gb5114cdb6c2a34f6706952f80baf2dfa" args="(const View &amp;src, CC cc)" -->
template&lt;typename DstP, typename View, typename CC&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">color_converted_view_type<br>
&lt; View, DstP, CC &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0161.html#gb5114cdb6c2a34f6706952f80baf2dfa">color_converted_view</a> (const View &amp;src, CC cc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">view of a different color space with a user defined color-converter <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gf2cd4971200b4e54dd2fda3cb9e24d0f"></a><!-- doxytag: member="image_view_factory.hpp::color_converted_view" ref="gf2cd4971200b4e54dd2fda3cb9e24d0f" args="(const View &amp;src)" -->
template&lt;typename DstP, typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">color_converted_view_type<br>
&lt; View, DstP &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0161.html#gf2cd4971200b4e54dd2fda3cb9e24d0f">color_converted_view</a> (const View &amp;src)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">overload of generic color_converted_view with the default color-converter <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g32a09331d986dde04bf1bde90c1656f0"></a><!-- doxytag: member="image_view_factory.hpp::flipped_up_down_view" ref="g32a09331d986dde04bf1bde90c1656f0" args="(const View &amp;src)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_y_step_type&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>flipped_up_down_view</b> (const View &amp;src)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbee2ef9821943f3624ea8dbfd0db8198"></a><!-- doxytag: member="image_view_factory.hpp::flipped_left_right_view" ref="gbee2ef9821943f3624ea8dbfd0db8198" args="(const View &amp;src)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_x_step_type&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>flipped_left_right_view</b> (const View &amp;src)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1de282c275a334b18dc594247d78132f"></a><!-- doxytag: member="image_view_factory.hpp::transposed_view" ref="g1de282c275a334b18dc594247d78132f" args="(const View &amp;src)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_xy_step_transposed_type<br>
&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>transposed_view</b> (const View &amp;src)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g829c6d53990c18f073daeb076855b9ca"></a><!-- doxytag: member="image_view_factory.hpp::rotated90cw_view" ref="g829c6d53990c18f073daeb076855b9ca" args="(const View &amp;src)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_xy_step_transposed_type<br>
&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>rotated90cw_view</b> (const View &amp;src)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g6e33bede9fcd15e1e9f70c03fb3ec473"></a><!-- doxytag: member="image_view_factory.hpp::rotated90ccw_view" ref="g6e33bede9fcd15e1e9f70c03fb3ec473" args="(const View &amp;src)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_xy_step_transposed_type<br>
&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>rotated90ccw_view</b> (const View &amp;src)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gffbba41874c38b48f205a9989a558b11"></a><!-- doxytag: member="image_view_factory.hpp::rotated180_view" ref="gffbba41874c38b48f205a9989a558b11" args="(const View &amp;src)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_xy_step_type&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>rotated180_view</b> (const View &amp;src)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2a5ad30f36cbabf8b2a06207fe0c6e2b"></a><!-- doxytag: member="image_view_factory.hpp::subimage_view" ref="g2a5ad30f36cbabf8b2a06207fe0c6e2b" args="(const View &amp;src, const typename View::point_t &amp;topleft, const typename View::point_t &amp;dimensions)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">View&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>subimage_view</b> (const View &amp;src, const typename View::point_t &amp;topleft, const typename View::point_t &amp;dimensions)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g972d6ef0a1fd5acf497ec4a10f8f40ab"></a><!-- doxytag: member="image_view_factory.hpp::subimage_view" ref="g972d6ef0a1fd5acf497ec4a10f8f40ab" args="(const View &amp;src, int xMin, int yMin, int width, int height)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">View&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>subimage_view</b> (const View &amp;src, int xMin, int yMin, int width, int height)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gae305b10c154d866702008cd7f17a933"></a><!-- doxytag: member="image_view_factory.hpp::subsampled_view" ref="gae305b10c154d866702008cd7f17a933" args="(const View &amp;src, typename View::coord_t xStep, typename View::coord_t yStep)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_xy_step_type&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>subsampled_view</b> (const View &amp;src, typename View::coord_t xStep, typename View::coord_t yStep)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g0ba8d800d7b0510dae98f28375cdc462"></a><!-- doxytag: member="image_view_factory.hpp::subsampled_view" ref="g0ba8d800d7b0510dae98f28375cdc462" args="(const View &amp;src, const typename View::point_t &amp;step)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">dynamic_xy_step_type&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>subsampled_view</b> (const View &amp;src, const typename View::point_t &amp;step)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g791cfacb8f163d86056eacf42cc4c7a8"></a><!-- doxytag: member="image_view_factory.hpp::nth_channel_view" ref="g791cfacb8f163d86056eacf42cc4c7a8" args="(const View &amp;src, int n)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">nth_channel_view_type&lt; View &gt;::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>nth_channel_view</b> (const View &amp;src, int n)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gf4a4f74efaaadcc0f5d707d1089b334f"></a><!-- doxytag: member="image_view_factory.hpp::kth_channel_view" ref="gf4a4f74efaaadcc0f5d707d1089b334f" args="(const View &amp;src)" -->
template&lt;int K, typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">kth_channel_view_type&lt; K, View &gt;<br>
::type&nbsp;</td><td class="memTemplItemRight" valign="bottom"><b>kth_channel_view</b> (const View &amp;src)</td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:16 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>