2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-25 06:12:22 +00:00
Files
gil/develop/doc/html/reference/device__n_8hpp_source.html
github-actions[bot] 3b73200ee1 deploy: 49d9276706
2025-04-04 16:28:54 +00:00

172 lines
21 KiB
HTML

<!-- HTML header for doxygen 1.8.13-->
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Generic Image Library: device_n.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="boost-header">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
<tr>
<td valign="top" width="300">
<h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
</td>
<td ><h1 align="center"><a href="../index.html"></a></h1></td>
<td></td>
</tr>
</table>
</div>
<hr/>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1878a3f4746a95c6aad317458cc7ef80.html">boost</a></li><li class="navelem"><a class="el" href="dir_df4750f408086f9b9c1b5ee4251365ff.html">gil</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">device_n.hpp</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">//</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// Copyright 2005-2007 Adobe Systems Incorporated</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Distributed under the Boost Software License, Version 1.0</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// See accompanying file LICENSE_1_0.txt or copy at</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">// http://www.boost.org/LICENSE_1_0.txt</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">//</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#ifndef BOOST_GIL_DEVICE_N_HPP</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#define BOOST_GIL_DEVICE_N_HPP</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include &lt;boost/gil/metafunctions.hpp&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include &lt;boost/gil/utilities.hpp&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;boost/gil/detail/mp11.hpp&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;boost/config.hpp&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;cstddef&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceboost.html">boost</a> { <span class="keyword">namespace </span>gil {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// TODO: Document the DeviceN Color Space and Color Model</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// with reference to the Adobe documentation</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// https://www.adobe.com/content/dam/acom/en/devnet/postscript/pdfs/TN5604.DeviceN_Color.pdf</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="structboost_1_1gil_1_1devicen__color__t.html"> 30</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structboost_1_1gil_1_1devicen__color__t.html">devicen_color_t</a> {};</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">struct </span><a class="code hl_struct" href="structboost_1_1gil_1_1devicen__t.html">devicen_t</a>;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N&gt;</div>
<div class="foldopen" id="foldopen00039" data-start="{" data-end="};">
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="structboost_1_1gil_1_1devicen__t.html"> 39</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structboost_1_1gil_1_1devicen__t.html">devicen_t</a></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>{</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">using </span><a class="code hl_struct" href="structboost_1_1gil_1_1devicen__color__t.html">color_t</a> = <a class="code hl_struct" href="structboost_1_1gil_1_1devicen__color__t.html">devicen_color_t&lt;T::value&gt;</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">static_assert</span>(</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> (1 &lt;= N &amp;&amp; N &lt;= 5),</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;invalid number of DeviceN color components&quot;</span>);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">using </span>type = mp11::mp_transform&lt;color_t, mp11::mp_iota_c&lt;N&gt;&gt;;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>};</div>
</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="structboost_1_1gil_1_1devicen__layout__t.html"> 56</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structboost_1_1gil_1_1devicen__layout__t.html">devicen_layout_t</a> : <a class="code hl_struct" href="structboost_1_1gil_1_1layout.html">layout</a>&lt;typename devicen_t&lt;N&gt;::type&gt; {};</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> IC&gt;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="keyword">inline</span></div>
<div class="foldopen" id="foldopen00062" data-start="{" data-end="}">
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="group___image_view_constructors.html#ga8aa022ca3deea697e03fe0ef61b2529d"> 62</a></span><span class="keyword">auto</span> <a class="code hl_function" href="group___image_view_constructors.html#ga8aa022ca3deea697e03fe0ef61b2529d">planar_devicen_view</a>(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes)</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> -&gt; <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;2&gt;</a>&gt;&gt;::view_t</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>{</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">using </span>view_t = <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;2&gt;</a>&gt;&gt;::view_t;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">return</span> view_t(width, height, <span class="keyword">typename</span> view_t::locator(<span class="keyword">typename</span> view_t::x_iterator(c0,c1), rowsize_in_bytes));</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>}</div>
</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> IC&gt;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="keyword">inline</span></div>
<div class="foldopen" id="foldopen00073" data-start="{" data-end="}">
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="group___image_view_constructors.html#ga224511a93f2526ef3890ed1bde0e2f8b"> 73</a></span><span class="keyword">auto</span> <a class="code hl_function" href="group___image_view_constructors.html#ga8aa022ca3deea697e03fe0ef61b2529d">planar_devicen_view</a>(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> -&gt; <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;3&gt;</a>&gt;&gt;::view_t</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>{</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">using </span>view_t = <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;3&gt;</a>&gt;&gt;::view_t;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> view_t(width, height, <span class="keyword">typename</span> view_t::locator(<span class="keyword">typename</span> view_t::x_iterator(c0,c1,c2), rowsize_in_bytes));</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> IC&gt;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="keyword">inline</span></div>
<div class="foldopen" id="foldopen00084" data-start="{" data-end="}">
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="group___image_view_constructors.html#ga500a3a94a511dca8b2b12c2f4eb26d90"> 84</a></span><span class="keyword">auto</span> <a class="code hl_function" href="group___image_view_constructors.html#ga8aa022ca3deea697e03fe0ef61b2529d">planar_devicen_view</a>(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes)</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> -&gt; <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;4&gt;</a>&gt;&gt;::view_t</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>{</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keyword">using </span>view_t = <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;4&gt;</a>&gt;&gt;::view_t;</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">return</span> view_t(width, height, <span class="keyword">typename</span> view_t::locator(<span class="keyword">typename</span> view_t::x_iterator(c0,c1,c2,c3), rowsize_in_bytes));</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>}</div>
</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> IC&gt;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="keyword">inline</span></div>
<div class="foldopen" id="foldopen00095" data-start="{" data-end="}">
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="group___image_view_constructors.html#gad8116e49e186ccf17b8a4ca26b609185"> 95</a></span><span class="keyword">auto</span> <a class="code hl_function" href="group___image_view_constructors.html#ga8aa022ca3deea697e03fe0ef61b2529d">planar_devicen_view</a>(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes)</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> -&gt; <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;5&gt;</a>&gt;&gt;::view_t</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>{</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keyword">using </span>view_t = <span class="keyword">typename</span> <a class="code hl_struct" href="structboost_1_1gil_1_1type__from__x__iterator.html">type_from_x_iterator&lt;planar_pixel_iterator&lt;IC,devicen_t&lt;5&gt;</a>&gt;&gt;::view_t;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">return</span> view_t(width, height, <span class="keyword">typename</span> view_t::locator(<span class="keyword">typename</span> view_t::x_iterator(c0,c1,c2,c3,c4), rowsize_in_bytes));</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>}</div>
</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>}} <span class="comment">// namespace boost::gil</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup___image_view_constructors_html_ga8aa022ca3deea697e03fe0ef61b2529d"><div class="ttname"><a href="group___image_view_constructors.html#ga8aa022ca3deea697e03fe0ef61b2529d">boost::gil::planar_devicen_view</a></div><div class="ttdeci">auto planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes) -&gt; typename type_from_x_iterator&lt; planar_pixel_iterator&lt; IC, devicen_t&lt; 2 &gt; &gt; &gt;::view_t</div><div class="ttdoc">from 2-channel planar data</div><div class="ttdef"><b>Definition</b> device_n.hpp:62</div></div>
<div class="ttc" id="anamespaceboost_html"><div class="ttname"><a href="namespaceboost.html">boost</a></div><div class="ttdoc">defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)</div><div class="ttdef"><b>Definition</b> algorithm.hpp:36</div></div>
<div class="ttc" id="astructboost_1_1gil_1_1devicen__color__t_html"><div class="ttname"><a href="structboost_1_1gil_1_1devicen__color__t.html">boost::gil::devicen_color_t</a></div><div class="ttdoc">unnamed color</div><div class="ttdef"><b>Definition</b> device_n.hpp:30</div></div>
<div class="ttc" id="astructboost_1_1gil_1_1devicen__layout__t_html"><div class="ttname"><a href="structboost_1_1gil_1_1devicen__layout__t.html">boost::gil::devicen_layout_t</a></div><div class="ttdoc">unnamed color layout of up to five channels</div><div class="ttdef"><b>Definition</b> device_n.hpp:56</div></div>
<div class="ttc" id="astructboost_1_1gil_1_1devicen__t_html"><div class="ttname"><a href="structboost_1_1gil_1_1devicen__t.html">boost::gil::devicen_t</a></div><div class="ttdoc">Unnamed color space of 1, 2, 3, 4, or 5 channels.</div><div class="ttdef"><b>Definition</b> device_n.hpp:40</div></div>
<div class="ttc" id="astructboost_1_1gil_1_1layout_html"><div class="ttname"><a href="structboost_1_1gil_1_1layout.html">boost::gil::layout</a></div><div class="ttdoc">Represents a color space and ordering of channels in memory.</div><div class="ttdef"><b>Definition</b> utilities.hpp:268</div></div>
<div class="ttc" id="astructboost_1_1gil_1_1type__from__x__iterator_html"><div class="ttname"><a href="structboost_1_1gil_1_1type__from__x__iterator.html">boost::gil::type_from_x_iterator</a></div><div class="ttdoc">Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...</div><div class="ttdef"><b>Definition</b> metafunctions.hpp:303</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.9.8
</small>
</address>
</body>
</html>