Boost GIL


metafunctions.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 #ifndef BOOST_GIL_METAFUNCTIONS_HPP
9 #define BOOST_GIL_METAFUNCTIONS_HPP
10 
11 #include <boost/gil/channel.hpp>
12 #include <boost/gil/dynamic_step.hpp>
13 #include <boost/gil/concepts.hpp>
14 
15 #include <boost/mpl/accumulate.hpp>
16 #include <boost/mpl/back.hpp>
17 #include <boost/mpl/bool.hpp>
18 #include <boost/mpl/if.hpp>
19 #include <boost/mpl/pop_back.hpp>
20 #include <boost/mpl/push_back.hpp>
21 #include <boost/mpl/transform.hpp>
22 #include <boost/mpl/vector.hpp>
23 #include <boost/mpl/vector_c.hpp>
24 #include <boost/type_traits.hpp>
25 
26 #include <iterator>
27 
28 namespace boost { namespace gil {
29 
30 // forward declarations
31 template <typename T, typename L> struct pixel;
32 template <typename BitField,typename ChannelRefVec,typename Layout> struct packed_pixel;
33 template <typename T, typename C> struct planar_pixel_reference;
34 template <typename IC, typename C> struct planar_pixel_iterator;
35 template <typename I> class memory_based_step_iterator;
36 template <typename I> class memory_based_2d_locator;
37 template <typename L> class image_view;
38 template <typename Pixel, bool IsPlanar, typename Alloc> class image;
39 template <typename T> struct channel_type;
40 template <typename T> struct color_space_type;
41 template <typename T> struct channel_mapping_type;
42 template <typename It> struct is_iterator_adaptor;
43 template <typename It> struct iterator_adaptor_get_base;
44 template <typename BitField, typename ChannelBitSizes, typename Layout, bool IsMutable> struct bit_aligned_pixel_reference;
45 
52 
53 
60 
64 template <typename PixelRef> struct pixel_reference_is_basic : public mpl::false_ {};
65 template <typename T, typename L> struct pixel_reference_is_basic< pixel<T,L>&> : public mpl::true_ {};
66 template <typename T, typename L> struct pixel_reference_is_basic<const pixel<T,L>&> : public mpl::true_ {};
67 template <typename TR, typename Cs> struct pixel_reference_is_basic<planar_pixel_reference<TR,Cs> > : public mpl::true_ {};
68 template <typename TR, typename Cs> struct pixel_reference_is_basic<const planar_pixel_reference<TR,Cs> > : public mpl::true_ {};
69 
70 
74 template <typename Iterator>
75 struct iterator_is_basic : public mpl::false_ {};
76 template <typename T, typename L> // mutable interleaved
77 struct iterator_is_basic< pixel<T,L>* > : public mpl::true_ {};
78 template <typename T, typename L> // immutable interleaved
79 struct iterator_is_basic<const pixel<T,L>* > : public mpl::true_ {};
80 template <typename T, typename Cs> // mutable planar
81 struct iterator_is_basic<planar_pixel_iterator< T*,Cs> > : public mpl::true_ {};
82 template <typename T, typename Cs> // immutable planar
83 struct iterator_is_basic<planar_pixel_iterator<const T*,Cs> > : public mpl::true_ {};
84 template <typename T, typename L> // mutable interleaved step
85 struct iterator_is_basic<memory_based_step_iterator< pixel<T,L>*> > : public mpl::true_ {};
86 template <typename T, typename L> // immutable interleaved step
87 struct iterator_is_basic<memory_based_step_iterator<const pixel<T,L>*> > : public mpl::true_ {};
88 template <typename T, typename Cs> // mutable planar step
89 struct iterator_is_basic<memory_based_step_iterator<planar_pixel_iterator< T*,Cs> > > : public mpl::true_ {};
90 template <typename T, typename Cs> // immutable planar step
91 struct iterator_is_basic<memory_based_step_iterator<planar_pixel_iterator<const T*,Cs> > > : public mpl::true_ {};
92 
93 
96 template <typename Loc> struct locator_is_basic : public mpl::false_ {};
97 template <typename Iterator> struct locator_is_basic<memory_based_2d_locator<memory_based_step_iterator<Iterator> > > : public iterator_is_basic<Iterator> {};
98 
101 template <typename View> struct view_is_basic : public mpl::false_ {};
102 template <typename Loc> struct view_is_basic<image_view<Loc> > : public locator_is_basic<Loc> {};
103 
106 template <typename Img> struct image_is_basic : public mpl::false_ {};
107 template <typename Pixel, bool IsPlanar, typename Alloc> struct image_is_basic<image<Pixel,IsPlanar,Alloc> > : public mpl::true_ {};
108 
109 
113 
114 template <typename I> struct iterator_is_step;
115 namespace detail {
116  template <typename It, bool IsBase, bool EqualsStepType> struct iterator_is_step_impl;
117  // iterator that has the same type as its dynamic_x_step_type must be a step iterator
118  template <typename It, bool IsBase> struct iterator_is_step_impl<It,IsBase,true> : public mpl::true_{};
119 
120  // base iterator can never be a step iterator
121  template <typename It> struct iterator_is_step_impl<It,true,false> : public mpl::false_{};
122 
123  // for an iterator adaptor, see if its base is step
124  template <typename It> struct iterator_is_step_impl<It,false,false>
125  : public iterator_is_step<typename iterator_adaptor_get_base<It>::type>{};
126 }
127 
130 template <typename I> struct iterator_is_step
131  : public detail::iterator_is_step_impl<I,
132  !is_iterator_adaptor<I>::value,
133  is_same<I,typename dynamic_x_step_type<I>::type>::value >{};
134 
137 template <typename L> struct locator_is_step_in_x : public iterator_is_step<typename L::x_iterator> {};
138 
141 template <typename L> struct locator_is_step_in_y : public iterator_is_step<typename L::y_iterator> {};
142 
145 template <typename V> struct view_is_step_in_x : public locator_is_step_in_x<typename V::xy_locator> {};
146 
149 template <typename V> struct view_is_step_in_y : public locator_is_step_in_y<typename V::xy_locator> {};
150 
153 template <typename PixelReference>
155  : public mpl::not_<is_same<typename detail::remove_const_and_reference<PixelReference>::type,
156  typename detail::remove_const_and_reference<PixelReference>::type::value_type> > {};
157 
160 template <typename Pixel>
161 struct pixel_is_reference : public mpl::or_<is_reference<Pixel>, pixel_reference_is_proxy<Pixel> > {};
162 
166 
171 template <typename R> struct pixel_reference_is_mutable : public mpl::bool_<remove_reference<R>::type::is_mutable> {};
172 template <typename R> struct pixel_reference_is_mutable<const R&>
173  : public mpl::and_<pixel_reference_is_proxy<R>, pixel_reference_is_mutable<R> > {};
174 
177 template <typename L> struct locator_is_mutable : public iterator_is_mutable<typename L::x_iterator> {};
180 template <typename V> struct view_is_mutable : public iterator_is_mutable<typename V::x_iterator> {};
181 
182 
189 
193 
197 
201 
204 template <typename T, typename L, bool IsPlanar=false, bool IsMutable=true> struct pixel_reference_type{};
205 template <typename T, typename L> struct pixel_reference_type<T,L,false,true > { using type = pixel<T,L>&; };
206 template <typename T, typename L> struct pixel_reference_type<T,L,false,false> { using type = pixel<T,L> const&; };
207 template <typename T, typename L> struct pixel_reference_type<T,L,true,true> { using type = planar_pixel_reference<typename channel_traits<T>::reference,typename color_space_type<L>::type> const; }; // TODO: Assert M=identity
208 template <typename T, typename L> struct pixel_reference_type<T,L,true,false> { using type = planar_pixel_reference<typename channel_traits<T>::const_reference,typename color_space_type<L>::type> const; };// TODO: Assert M=identity
209 
212 template <typename Pixel, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type_from_pixel{};
213 template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,true > { using type = Pixel *; };
214 template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,false> { using type = const Pixel *; };
215 template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,true> {
216  using type = planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::pointer,typename color_space_type<Pixel>::type>;
217 };
218 template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,false> {
219  using type = planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::const_pointer,typename color_space_type<Pixel>::type>;
220 };
221 template <typename Pixel, bool IsPlanar, bool IsMutable> struct iterator_type_from_pixel<Pixel,IsPlanar,true,IsMutable> {
223 };
224 
227 template <typename T, typename L, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type{};
228 template <typename T, typename L> struct iterator_type<T,L,false,false,true > { using type = pixel<T,L>*; };
229 template <typename T, typename L> struct iterator_type<T,L,false,false,false> { using type = pixel<T,L> const*; };
230 template <typename T, typename L> struct iterator_type<T,L,true,false,true> { using type = planar_pixel_iterator<T*,typename L::color_space_t>; }; // TODO: Assert M=identity
231 template <typename T, typename L> struct iterator_type<T,L,true,false,false> { using type = planar_pixel_iterator<const T*,typename L::color_space_t>; }; // TODO: Assert M=identity
232 template <typename T, typename L, bool IsPlanar, bool IsMutable> struct iterator_type<T,L,IsPlanar,true,IsMutable> {
234 };
235 
238 template <typename XIterator>
243 };
244 
245 namespace detail {
246  template <typename BitField, typename FirstBit, typename NumBits>
247  struct packed_channel_reference_type {
248  using type = packed_channel_reference<BitField,FirstBit::value,NumBits::value,true> const;
249  };
250 
251  template <typename BitField, typename ChannelBitSizesVector>
252  class packed_channel_references_vector_type {
253  // If ChannelBitSizesVector is mpl::vector<int,7,7,2>
254  // Then first_bits_vector will be mpl::vector<int,0,7,14,16>
255  using first_bits_vector = typename mpl::accumulate<ChannelBitSizesVector, mpl::vector1<mpl::int_<0> >,
256  mpl::push_back<mpl::_1, mpl::plus<mpl::back<mpl::_1>, mpl::_2> > >::type;
257  public:
258  using type = typename mpl::transform<typename mpl::pop_back<first_bits_vector>::type, ChannelBitSizesVector,
259  packed_channel_reference_type<BitField, mpl::_1,mpl::_2> >::type;
260  };
261 
262 }
263 
272 template <typename BitField, typename ChannelBitSizeVector, typename Layout>
274 {
276 };
277 
286 
289 template <typename BitField, typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
292 };
293 
296 template <typename BitField, unsigned Size1, typename Layout, typename Alloc=std::allocator<unsigned char> >
297 struct packed_image1_type : public packed_image_type<BitField, mpl::vector1_c<unsigned, Size1>, Layout, Alloc> {};
298 
301 template <typename BitField, unsigned Size1, unsigned Size2, typename Layout, typename Alloc=std::allocator<unsigned char> >
302 struct packed_image2_type : public packed_image_type<BitField, mpl::vector2_c<unsigned, Size1, Size2>, Layout, Alloc> {};
303 
306 template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc=std::allocator<unsigned char> >
307 struct packed_image3_type : public packed_image_type<BitField, mpl::vector3_c<unsigned, Size1, Size2, Size3>, Layout, Alloc> {};
308 
311 template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc=std::allocator<unsigned char> >
312 struct packed_image4_type : public packed_image_type<BitField, mpl::vector4_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc> {};
313 
316 template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc=std::allocator<unsigned char> >
317 struct packed_image5_type : public packed_image_type<BitField, mpl::vector5_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
318 
319 
326 template
327 <
328  typename ChannelBitSizeVector,
329  typename Layout,
330  typename Alloc = std::allocator<unsigned char>
331 >
333 {
334 private:
335  static constexpr int bit_size =
336  mpl::accumulate
337  <
338  ChannelBitSizeVector,
339  mpl::int_<0>,
340  mpl::plus<mpl::_1, mpl::_2>
341  >::type::value;
342 
343  using bitfield_t = typename detail::min_fast_uint<bit_size + 7>::type;
344  using bit_alignedref_t = bit_aligned_pixel_reference<bitfield_t, ChannelBitSizeVector, Layout, true> const;
345 
346 public:
348 };
349 
352 template <unsigned Size1, typename Layout, typename Alloc=std::allocator<unsigned char> >
353 struct bit_aligned_image1_type : public bit_aligned_image_type<mpl::vector1_c<unsigned, Size1>, Layout, Alloc> {};
354 
357 template <unsigned Size1, unsigned Size2, typename Layout, typename Alloc=std::allocator<unsigned char> >
358 struct bit_aligned_image2_type : public bit_aligned_image_type<mpl::vector2_c<unsigned, Size1, Size2>, Layout, Alloc> {};
359 
362 template <unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc=std::allocator<unsigned char> >
363 struct bit_aligned_image3_type : public bit_aligned_image_type<mpl::vector3_c<unsigned, Size1, Size2, Size3>, Layout, Alloc> {};
364 
367 template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc=std::allocator<unsigned char> >
368 struct bit_aligned_image4_type : public bit_aligned_image_type<mpl::vector4_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc> {};
369 
372 template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc=std::allocator<unsigned char> >
373 struct bit_aligned_image5_type : public bit_aligned_image_type<mpl::vector5_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
374 
375 
376 
379 template <typename Channel, typename Layout>
381  using type = pixel<Channel,Layout>; // by default use gil::pixel. Specializations are provided for
382 };
383 
384 // Specializations for packed channels
385 template <typename BitField, int NumBits, bool IsMutable, typename Layout>
386 struct pixel_value_type< packed_dynamic_channel_reference<BitField,NumBits,IsMutable>,Layout> :
387  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
388 template <typename BitField, int NumBits, bool IsMutable, typename Layout>
389 struct pixel_value_type<const packed_dynamic_channel_reference<BitField,NumBits,IsMutable>,Layout> :
390  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
391 
392 template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
393 struct pixel_value_type< packed_channel_reference<BitField,FirstBit,NumBits,IsMutable>,Layout> :
394  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
395 template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
396 struct pixel_value_type<const packed_channel_reference<BitField,FirstBit,NumBits,IsMutable>,Layout> :
397  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
398 
399 template <int NumBits, typename Layout>
400 struct pixel_value_type<packed_channel_value<NumBits>,Layout> :
401  public packed_pixel_type<typename detail::min_fast_uint<NumBits>::type, mpl::vector1_c<unsigned,NumBits>, Layout> {};
402 
403 
406 template <typename T, typename L, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
407 struct locator_type {
409 };
410 
413 template <typename T, typename L, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
414 struct view_type {
416 };
417 
420 template <typename T, typename L, bool IsPlanar=false, typename Alloc=std::allocator<unsigned char> >
421 struct image_type {
422  using type = image<pixel<T,L>, IsPlanar, Alloc>;
423 };
424 
427 template <typename Pixel, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
430 };
431 
432 
436 template <typename Ref, typename T=use_default, typename L=use_default, typename IsPlanar=use_default, typename IsMutable=use_default>
438  using pixel_t = typename remove_reference<Ref>::type;
439  using channel_t = typename mpl::if_<is_same<T, use_default>, typename channel_type<pixel_t>::type, T>::type;
440  using layout_t = typename mpl::if_<is_same<L, use_default>,
441  layout<typename color_space_type<pixel_t>::type, typename channel_mapping_type<pixel_t>::type>, L>::type;
442  static const bool mut =mpl::if_<is_same<IsMutable,use_default>, pixel_reference_is_mutable<Ref>, IsMutable>::type::value;
443  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<pixel_t>, IsPlanar>::type::value;
444 public:
446 };
447 
451 template <typename Iterator, typename T=use_default, typename L=use_default, typename IsPlanar=use_default, typename IsStep=use_default, typename IsMutable=use_default>
453  using channel_t = typename mpl::if_<is_same<T ,use_default>, typename channel_type<Iterator>::type, T>::type;
454  using layout_t = typename mpl::if_<is_same<L,use_default>,
455  layout<typename color_space_type<Iterator>::type, typename channel_mapping_type<Iterator>::type>, L>::type;
456 
457  static const bool mut =mpl::if_<is_same<IsMutable,use_default>, iterator_is_mutable<Iterator>, IsMutable>::type::value;
458  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<Iterator>, IsPlanar>::type::value;
459  static const bool step =mpl::if_<is_same<IsStep ,use_default>, iterator_is_step<Iterator>, IsStep>::type::value;
460 public:
462 };
463 
467 template <typename View, typename T=use_default, typename L=use_default, typename IsPlanar=use_default, typename StepX=use_default, typename IsMutable=use_default>
469  using channel_t = typename mpl::if_<is_same<T ,use_default>, typename channel_type<View>::type, T>::type;
470  using layout_t = typename mpl::if_<is_same<L,use_default>,
471  layout<typename color_space_type<View>::type, typename channel_mapping_type<View>::type>, L>::type;
472  static const bool mut =mpl::if_<is_same<IsMutable,use_default>, view_is_mutable<View>, IsMutable>::type::value;
473  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<View>, IsPlanar>::type::value;
474  static const bool step =mpl::if_<is_same<StepX ,use_default>, view_is_step_in_x<View>,StepX>::type::value;
475 public:
476  using type = typename view_type<channel_t, layout_t, planar, step, mut>::type;
477 };
478 
482 template <typename Image, typename T=use_default, typename L=use_default, typename IsPlanar=use_default>
484  using channel_t = typename mpl::if_<is_same<T ,use_default>, typename channel_type<Image>::type, T>::type;
485  using layout_t = typename mpl::if_<is_same<L,use_default>,
486  layout<typename color_space_type<Image>::type, typename channel_mapping_type<Image>::type>, L>::type;
487  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<Image>, IsPlanar>::type::value;
488 public:
489  using type = typename image_type<channel_t, layout_t, planar>::type;
490 };
491 
492 }} // namespace boost::gil
493 
494 #endif
metafunction predicate determining whether the given iterator is a plain one or an adaptor over anoth...
Definition: metafunctions.hpp:42
Returns the type of an interleaved packed image: an image whose channels may not be byte-aligned...
Definition: metafunctions.hpp:290
Determines whether the given pixel reference is a proxy class or a native C++ reference.
Definition: metafunctions.hpp:154
A reference proxy to a planar pixel. Models: HomogeneousColorBaseConcept, HomogeneousPixelConcept.
Definition: metafunctions.hpp:33
Returns the type of a homogeneous image given the channel type, layout, and whether it operates on pl...
Definition: metafunctions.hpp:421
Determines if the given locator has a horizontal step that could be set dynamically.
Definition: metafunctions.hpp:137
Returns the type of a homogeneous view given the channel type, layout, whether it operates on planar ...
Definition: metafunctions.hpp:414
Definition: algorithm.hpp:30
A lightweight object that interprets memory as a 2D array of pixels. Models ImageViewConcept,PixelBasedConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept.
Definition: image_view.hpp:51
returns the base iterator for a given iterator adaptor. Provide an specialization when introducing ne...
Definition: metafunctions.hpp:43
Returns the type of a single-channel image given its bitfield type, the bit size of its channel and i...
Definition: metafunctions.hpp:297
Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept, PixelValueConcept, HomogeneousPixelBasedConcept.
Definition: metafunctions.hpp:31
Returns the type of a homogeneous iterator given the channel type, layout, whether it operates on pla...
Definition: metafunctions.hpp:227
Returns the type of a four channel image given its bitfield type, the bit size of its channels and it...
Definition: metafunctions.hpp:312
Returns the type of a two channel image given its bitfield type, the bit size of its channels and its...
Definition: metafunctions.hpp:302
Returns the type of a five channel bit-aligned image given the bit size of its channels and its layou...
Definition: metafunctions.hpp:373
Constructs a pixel iterator type from a source pixel iterator type by changing some of the properties...
Definition: metafunctions.hpp:452
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:34
Determines if a given pixel iterator is basic Basic iterators must use gil::pixel (if interleaved)...
Definition: metafunctions.hpp:75
Constructs a pixel reference type from a source pixel reference type by changing some of the properti...
Definition: metafunctions.hpp:437
Returns the type of a four channel bit-aligned image given the bit size of its channels and its layou...
Definition: metafunctions.hpp:368
Memory-based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConceptThe class takes a step iterator as a parameter. The step iterator provides navigation along the vertical axis while its base iterator provides horizontal navigation.
Definition: algorithm.hpp:38
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:239
Basic images must use basic views and std::allocator.
Definition: metafunctions.hpp:106
Determines if the given pixel reference is mutable (i.e. its channels can be changed) ...
Definition: metafunctions.hpp:171
Determines if the given locator is mutable (i.e. its pixels can be changed)
Definition: metafunctions.hpp:177
Constructs a homogeneous image type from a source image type by changing some of the properties...
Definition: metafunctions.hpp:483
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:247
container interface over image view. Models ImageConcept, PixelBasedConcept
Definition: image.hpp:39
Determines if a given locator is basic. A basic locator is memory-based and has basic x_iterator and ...
Definition: metafunctions.hpp:96
Returns the type of a homogeneous pixel reference given the channel type, layout, whether it operates...
Definition: metafunctions.hpp:204
Returns the type of a packed image whose pixels may not be byte aligned. For example, an "rgb222" image is bit-aligned because its pixel spans six bits.
Definition: metafunctions.hpp:332
Determines if the given view has a vertical step that could be set dynamically.
Definition: metafunctions.hpp:149
Determines if the given view is mutable (i.e. its pixels can be changed)
Definition: metafunctions.hpp:180
Definition: color_convert.hpp:30
Returns the type of a homogeneous pixel given the channel type and layout.
Definition: metafunctions.hpp:380
Returns the type of a homogeneous locator given the channel type, layout, whether it operates on plan...
Definition: metafunctions.hpp:407
Metafunction predicate returning whether the given iterator allows for changing its values...
Definition: pixel_iterator.hpp:48
Constructs an image view type from a source view type by changing some of the properties.Use use_default for the properties of the source view that you want to keep.
Definition: metafunctions.hpp:468
Returns the type of a packed pixel given its bitfield type, the bit size of its channels and its layo...
Definition: metafunctions.hpp:273
Heterogeneous pixel value whose channel references can be constructed from the pixel bitfield and the...
Definition: metafunctions.hpp:32
Given a model of a pixel, determines whether the model represents a pixel reference (as opposed to pi...
Definition: metafunctions.hpp:161
Returns the type of a single-channel bit-aligned image given the bit size of its channel and its layo...
Definition: metafunctions.hpp:353
Determines if a given pixel reference is basic Basic references must use gil::pixel& (if interleaved)...
Definition: metafunctions.hpp:64
Returns the type of a three channel image given its bitfield type, the bit size of its channels and i...
Definition: metafunctions.hpp:307
Determines if the given locator has a vertical step that could be set dynamically.
Definition: metafunctions.hpp:141
Basic views must be over basic locators.
Definition: metafunctions.hpp:101
Determines if the given iterator has a step that could be set dynamically.
Definition: metafunctions.hpp:114
Returns the type of a two channel bit-aligned image given the bit size of its channels and its layout...
Definition: metafunctions.hpp:358
Returns the type of a pixel iterator given the pixel type, whether it operates on planar data...
Definition: metafunctions.hpp:212
Returns the type of a view the pixel type, whether it operates on planar data and whether it has a st...
Definition: metafunctions.hpp:428
MEMORY-BASED STEP ITERATOR.
Definition: algorithm.hpp:36
Returns the type of a three channel bit-aligned image given the bit size of its channels and its layo...
Definition: metafunctions.hpp:363
Determines if the given view has a horizontal step that could be set dynamically. ...
Definition: metafunctions.hpp:145
Returns the type of a five channel image given its bitfield type, the bit size of its channels and it...
Definition: metafunctions.hpp:317