8 #ifndef BOOST_GIL_DEVICE_N_HPP 9 #define BOOST_GIL_DEVICE_N_HPP 11 #include <boost/gil/metafunctions.hpp> 12 #include <boost/gil/utilities.hpp> 14 #include <boost/config.hpp> 15 #include <boost/mpl/range_c.hpp> 16 #include <boost/mpl/vector_c.hpp> 17 #include <boost/type_traits.hpp> 21 namespace boost {
namespace gil {
27 template <
int N>
struct devicen_t;
31 template <>
struct devicen_t<1> :
public mpl::vector1<devicen_color_t<0> > {};
35 template <>
struct devicen_t<2> :
public mpl::vector2<devicen_color_t<0>, devicen_color_t<1> > {};
39 template <>
struct devicen_t<3> :
public mpl::vector3<devicen_color_t<0>, devicen_color_t<1>, devicen_color_t<2> > {};
43 template <>
struct devicen_t<4> :
public mpl::vector4<devicen_color_t<0>, devicen_color_t<1>, devicen_color_t<2>, devicen_color_t<3> > {};
47 template <>
struct devicen_t<5> :
public mpl::vector5<devicen_color_t<0>, devicen_color_t<1>, devicen_color_t<2>, devicen_color_t<3>, devicen_color_t<4> > {};
55 template <
typename IC>
57 planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes)
60 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1), rowsize_in_bytes));
65 template <
typename IC>
67 planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes)
70 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2), rowsize_in_bytes));
75 template <
typename IC>
77 planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes)
80 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2,c3), rowsize_in_bytes));
85 template <
typename IC>
87 planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes)
90 return view_t(width, height,
typename view_t::locator(
typename view_t::x_iterator(c0,c1,c2,c3,c4), rowsize_in_bytes));
Definition: algorithm.hpp:30
type_from_x_iterator< planar_pixel_iterator< IC, devicen_t< 5 > > >::view_t planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes)
from 5-channel planar data
Definition: device_n.hpp:87
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:239
unnamed color
Definition: device_n.hpp:25
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:247
unnamed color layout of up to five channels
Definition: device_n.hpp:51