|
pixel.hpp
Go to the documentation of this file.
10 /*************************************************************************************************/
47 template <typename PixelBased> struct color_space_type<const PixelBased> : public color_space_type<PixelBased> {};
48 template <typename PixelBased> struct channel_mapping_type<const PixelBased> : public channel_mapping_type<PixelBased> {};
49 template <typename PixelBased> struct channel_type<const PixelBased> : public channel_type<PixelBased> {};
52 template <typename PixelBased> struct is_planar<const PixelBased> : public is_planar<PixelBased> {};
104 struct pixel : public detail::homogeneous_color_base<ChannelValue,Layout,mpl::size<typename Layout::color_space_t>::value> {
107 typedef detail::homogeneous_color_base<ChannelValue,Layout,mpl::size<typename Layout::color_space_t>::value> parent_t;
119 pixel(channel_t v0, channel_t v1, channel_t v2, channel_t v3, channel_t v4) : parent_t(v0,v1,v2,v3,v4) {}
120 pixel(channel_t v0, channel_t v1, channel_t v2, channel_t v3, channel_t v4, channel_t v5) : parent_t(v0,v1,v2,v3,v4,v5) {}
126 template <typename Pixel> pixel(const Pixel& p, typename enable_if_c<is_pixel<Pixel>::value>::type* dummy = 0) : parent_t(p) {
130 template <typename P> pixel& operator=(const P& p) { assign(p, mpl::bool_<is_pixel<P>::value>()); return *this; }
131 template <typename P> bool operator==(const P& p) const { return equal(p, mpl::bool_<is_pixel<P>::value>()); }
136 typename channel_traits<channel_t>::reference operator[](std::size_t i) { return dynamic_at_c(*this,i); }
137 typename channel_traits<channel_t>::const_reference operator[](std::size_t i) const { return dynamic_at_c(*this,i); }
139 template <typename Pixel> void assign(const Pixel& p, mpl::true_) { check_compatible<Pixel>(); static_copy(p,*this); }
140 template <typename Pixel> bool equal(const Pixel& p, mpl::true_) const { check_compatible<Pixel>(); return static_equal(*this,p); }
142 template <typename Pixel> void check_compatible() const { gil_function_requires<PixelsCompatibleConcept<Pixel,pixel> >(); }
147 static void check_gray() { BOOST_STATIC_ASSERT((is_same<typename Layout::color_space_t, gray_t>::value)); }
148 template <typename Channel> void assign(const Channel& chan, mpl::false_) { check_gray(); gil::at_c<0>(*this)=chan; }
149 template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return gil::at_c<0>(*this)==chan; }
212 struct has_trivial_constructor<gil::pixel<ChannelValue,Layout> > : public has_trivial_constructor<ChannelValue> {};
pixel related algorithms Channel utilities. metafunctions that construct types or return type properties Concept check classes for GIL concepts. pixel class and related utilities GIL configuration file. Various utilities not specific to the image library. Some are non-standard STL extensions or generic ... Generated on Mon Mar 26 2018 16:26:15 for Generic Image Library by
1.8.6
|