Boost GIL


metafunctions.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3 
4  Use, modification and distribution are subject to the Boost Software License,
5  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6  http://www.boost.org/LICENSE_1_0.txt).
7 
8  See http://opensource.adobe.com/gil for most recent version including documentation.
9 */
10 
11 /*************************************************************************************************/
12 
13 #ifndef GIL_METAFUNCTIONS_HPP
14 #define GIL_METAFUNCTIONS_HPP
15 
25 
26 #include <iterator>
27 #include <boost/mpl/accumulate.hpp>
28 #include <boost/mpl/back.hpp>
29 #include <boost/mpl/bool.hpp>
30 #include <boost/mpl/if.hpp>
31 #include <boost/mpl/pop_back.hpp>
32 #include <boost/mpl/push_back.hpp>
33 #include <boost/mpl/transform.hpp>
34 #include <boost/mpl/vector.hpp>
35 #include <boost/mpl/vector_c.hpp>
36 #include <boost/type_traits.hpp>
37 #include "gil_concept.hpp"
38 #include "channel.hpp"
39 
40 namespace boost { namespace gil {
41 
42 // forward declarations
43 template <typename T, typename L> struct pixel;
44 template <typename BitField,typename ChannelRefVec,typename Layout> struct packed_pixel;
45 template <typename T, typename C> struct planar_pixel_reference;
46 template <typename IC, typename C> struct planar_pixel_iterator;
47 template <typename I> class memory_based_step_iterator;
48 template <typename I> class memory_based_2d_locator;
49 template <typename L> class image_view;
50 template <typename Pixel, bool IsPlanar, typename Alloc> class image;
51 template <typename T> struct channel_type;
52 template <typename T> struct color_space_type;
53 template <typename T> struct channel_mapping_type;
54 template <typename It> struct is_iterator_adaptor;
55 template <typename It> struct iterator_adaptor_get_base;
56 template <typename BitField, typename ChannelBitSizes, typename Layout, bool IsMutable> struct bit_aligned_pixel_reference;
57 
64 
65 
72 
76 template <typename PixelRef> struct pixel_reference_is_basic : public mpl::false_ {};
77 template <typename T, typename L> struct pixel_reference_is_basic< pixel<T,L>&> : public mpl::true_ {};
78 template <typename T, typename L> struct pixel_reference_is_basic<const pixel<T,L>&> : public mpl::true_ {};
79 template <typename TR, typename Cs> struct pixel_reference_is_basic<planar_pixel_reference<TR,Cs> > : public mpl::true_ {};
80 template <typename TR, typename Cs> struct pixel_reference_is_basic<const planar_pixel_reference<TR,Cs> > : public mpl::true_ {};
81 
82 
86 template <typename Iterator>
87 struct iterator_is_basic : public mpl::false_ {};
88 template <typename T, typename L> // mutable interleaved
89 struct iterator_is_basic< pixel<T,L>* > : public mpl::true_ {};
90 template <typename T, typename L> // immutable interleaved
91 struct iterator_is_basic<const pixel<T,L>* > : public mpl::true_ {};
92 template <typename T, typename Cs> // mutable planar
93 struct iterator_is_basic<planar_pixel_iterator< T*,Cs> > : public mpl::true_ {};
94 template <typename T, typename Cs> // immutable planar
95 struct iterator_is_basic<planar_pixel_iterator<const T*,Cs> > : public mpl::true_ {};
96 template <typename T, typename L> // mutable interleaved step
97 struct iterator_is_basic<memory_based_step_iterator< pixel<T,L>*> > : public mpl::true_ {};
98 template <typename T, typename L> // immutable interleaved step
99 struct iterator_is_basic<memory_based_step_iterator<const pixel<T,L>*> > : public mpl::true_ {};
100 template <typename T, typename Cs> // mutable planar step
101 struct iterator_is_basic<memory_based_step_iterator<planar_pixel_iterator< T*,Cs> > > : public mpl::true_ {};
102 template <typename T, typename Cs> // immutable planar step
103 struct iterator_is_basic<memory_based_step_iterator<planar_pixel_iterator<const T*,Cs> > > : public mpl::true_ {};
104 
105 
108 template <typename Loc> struct locator_is_basic : public mpl::false_ {};
109 template <typename Iterator> struct locator_is_basic<memory_based_2d_locator<memory_based_step_iterator<Iterator> > > : public iterator_is_basic<Iterator> {};
110 
113 template <typename View> struct view_is_basic : public mpl::false_ {};
114 template <typename Loc> struct view_is_basic<image_view<Loc> > : public locator_is_basic<Loc> {};
115 
118 template <typename Img> struct image_is_basic : public mpl::false_ {};
119 template <typename Pixel, bool IsPlanar, typename Alloc> struct image_is_basic<image<Pixel,IsPlanar,Alloc> > : public mpl::true_ {};
120 
121 
125 
126 template <typename I> struct iterator_is_step;
127 namespace detail {
128  template <typename It, bool IsBase, bool EqualsStepType> struct iterator_is_step_impl;
129  // iterator that has the same type as its dynamic_x_step_type must be a step iterator
130  template <typename It, bool IsBase> struct iterator_is_step_impl<It,IsBase,true> : public mpl::true_{};
131 
132  // base iterator can never be a step iterator
133  template <typename It> struct iterator_is_step_impl<It,true,false> : public mpl::false_{};
134 
135  // for an iterator adaptor, see if its base is step
136  template <typename It> struct iterator_is_step_impl<It,false,false>
137  : public iterator_is_step<typename iterator_adaptor_get_base<It>::type>{};
138 }
139 
142 template <typename I> struct iterator_is_step
143  : public detail::iterator_is_step_impl<I,
144  !is_iterator_adaptor<I>::type::value,
145  is_same<I,typename dynamic_x_step_type<I>::type>::value >{};
146 
149 template <typename L> struct locator_is_step_in_x : public iterator_is_step<typename L::x_iterator> {};
150 
153 template <typename L> struct locator_is_step_in_y : public iterator_is_step<typename L::y_iterator> {};
154 
157 template <typename V> struct view_is_step_in_x : public locator_is_step_in_x<typename V::xy_locator> {};
158 
161 template <typename V> struct view_is_step_in_y : public locator_is_step_in_y<typename V::xy_locator> {};
162 
165 template <typename PixelReference>
167  : public mpl::not_<is_same<typename remove_const_and_reference<PixelReference>::type,
168  typename remove_const_and_reference<PixelReference>::type::value_type> > {};
169 
172 template <typename Pixel>
173 struct pixel_is_reference : public mpl::or_<is_reference<Pixel>, pixel_reference_is_proxy<Pixel> > {};
174 
178 
183 template <typename R> struct pixel_reference_is_mutable : public mpl::bool_<remove_reference<R>::type::is_mutable> {};
184 template <typename R> struct pixel_reference_is_mutable<const R&>
185  : public mpl::and_<pixel_reference_is_proxy<R>, pixel_reference_is_mutable<R> > {};
186 
189 template <typename L> struct locator_is_mutable : public iterator_is_mutable<typename L::x_iterator> {};
192 template <typename V> struct view_is_mutable : public iterator_is_mutable<typename V::x_iterator> {};
193 
194 
201 
205 
209 
213 
216 template <typename T, typename L, bool IsPlanar=false, bool IsMutable=true> struct pixel_reference_type{};
217 template <typename T, typename L> struct pixel_reference_type<T,L,false,true > { typedef pixel<T,L>& type; };
218 template <typename T, typename L> struct pixel_reference_type<T,L,false,false> { typedef const pixel<T,L>& type; };
219 template <typename T, typename L> struct pixel_reference_type<T,L,true,true> { typedef const planar_pixel_reference<typename channel_traits<T>::reference,typename color_space_type<L>::type> type; }; // TODO: Assert M=identity
220 template <typename T, typename L> struct pixel_reference_type<T,L,true,false> { typedef const planar_pixel_reference<typename channel_traits<T>::const_reference,typename color_space_type<L>::type> type; };// TODO: Assert M=identity
221 
224 template <typename Pixel, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type_from_pixel{};
225 template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,true > { typedef Pixel* type; };
226 template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,false> { typedef const Pixel* type; };
227 template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,true> {
228  typedef planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::pointer,typename color_space_type<Pixel>::type> type;
229 };
230 template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,false> {
231  typedef planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::const_pointer,typename color_space_type<Pixel>::type> type;
232 };
233 template <typename Pixel, bool IsPlanar, bool IsMutable> struct iterator_type_from_pixel<Pixel,IsPlanar,true,IsMutable> {
234  typedef memory_based_step_iterator<typename iterator_type_from_pixel<Pixel,IsPlanar,false,IsMutable>::type> type;
235 };
236 
239 template <typename T, typename L, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type{};
240 template <typename T, typename L> struct iterator_type<T,L,false,false,true > { typedef pixel<T,L>* type; };
241 template <typename T, typename L> struct iterator_type<T,L,false,false,false> { typedef const pixel<T,L>* type; };
242 template <typename T, typename L> struct iterator_type<T,L,true,false,true> { typedef planar_pixel_iterator<T*,typename L::color_space_t> type; }; // TODO: Assert M=identity
243 template <typename T, typename L> struct iterator_type<T,L,true,false,false> { typedef planar_pixel_iterator<const T*,typename L::color_space_t> type; }; // TODO: Assert M=identity
244 template <typename T, typename L, bool IsPlanar, bool IsMutable> struct iterator_type<T,L,IsPlanar,true,IsMutable> {
245  typedef memory_based_step_iterator<typename iterator_type<T,L,IsPlanar,false,IsMutable>::type> type;
246 };
247 
250 template <typename XIterator>
255 };
256 
257 namespace detail {
258  template <typename BitField, typename FirstBit, typename NumBits>
259  struct packed_channel_reference_type {
260  typedef const packed_channel_reference<BitField,FirstBit::value,NumBits::value,true> type;
261  };
262 
263  template <typename BitField, typename ChannelBitSizesVector>
264  class packed_channel_references_vector_type {
265  // If ChannelBitSizesVector is mpl::vector<int,7,7,2>
266  // Then first_bits_vector will be mpl::vector<int,0,7,14,16>
267  typedef typename mpl::accumulate<ChannelBitSizesVector, mpl::vector1<mpl::int_<0> >,
268  mpl::push_back<mpl::_1, mpl::plus<mpl::back<mpl::_1>, mpl::_2> > >::type first_bits_vector;
269  public:
270  typedef typename mpl::transform<typename mpl::pop_back<first_bits_vector>::type, ChannelBitSizesVector,
271  packed_channel_reference_type<BitField, mpl::_1,mpl::_2> >::type type;
272  };
273 
274 }
275 
284 template <typename BitField, typename ChannelBitSizeVector, typename Layout>
287 };
288 
297 
300 template <typename BitField, typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
303 };
304 
307 template <typename BitField, unsigned Size1, typename Layout, typename Alloc=std::allocator<unsigned char> >
308 struct packed_image1_type : public packed_image_type<BitField, mpl::vector1_c<unsigned, Size1>, Layout, Alloc> {};
309 
312 template <typename BitField, unsigned Size1, unsigned Size2, typename Layout, typename Alloc=std::allocator<unsigned char> >
313 struct packed_image2_type : public packed_image_type<BitField, mpl::vector2_c<unsigned, Size1, Size2>, Layout, Alloc> {};
314 
317 template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc=std::allocator<unsigned char> >
318 struct packed_image3_type : public packed_image_type<BitField, mpl::vector3_c<unsigned, Size1, Size2, Size3>, Layout, Alloc> {};
319 
322 template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc=std::allocator<unsigned char> >
323 struct packed_image4_type : public packed_image_type<BitField, mpl::vector4_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc> {};
324 
327 template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc=std::allocator<unsigned char> >
328 struct packed_image5_type : public packed_image_type<BitField, mpl::vector5_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
329 
330 
336 
337 template <typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
339 private:
340  BOOST_STATIC_CONSTANT(int, bit_size = (mpl::accumulate<ChannelBitSizeVector, mpl::int_<0>, mpl::plus<mpl::_1, mpl::_2> >::type::value));
341  typedef typename detail::min_fast_uint<bit_size+7>::type bitfield_t;
343 public:
345 };
346 
349 template <unsigned Size1, typename Layout, typename Alloc=std::allocator<unsigned char> >
350 struct bit_aligned_image1_type : public bit_aligned_image_type<mpl::vector1_c<unsigned, Size1>, Layout, Alloc> {};
351 
354 template <unsigned Size1, unsigned Size2, typename Layout, typename Alloc=std::allocator<unsigned char> >
355 struct bit_aligned_image2_type : public bit_aligned_image_type<mpl::vector2_c<unsigned, Size1, Size2>, Layout, Alloc> {};
356 
359 template <unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc=std::allocator<unsigned char> >
360 struct bit_aligned_image3_type : public bit_aligned_image_type<mpl::vector3_c<unsigned, Size1, Size2, Size3>, Layout, Alloc> {};
361 
364 template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc=std::allocator<unsigned char> >
365 struct bit_aligned_image4_type : public bit_aligned_image_type<mpl::vector4_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc> {};
366 
369 template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc=std::allocator<unsigned char> >
370 struct bit_aligned_image5_type : public bit_aligned_image_type<mpl::vector5_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
371 
372 
373 
376 template <typename Channel, typename Layout>
378  typedef pixel<Channel,Layout> type; // by default use gil::pixel. Specializations are provided for
379 };
380 
381 // Specializations for packed channels
382 template <typename BitField, int NumBits, bool IsMutable, typename Layout>
383 struct pixel_value_type< packed_dynamic_channel_reference<BitField,NumBits,IsMutable>,Layout> :
384  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
385 template <typename BitField, int NumBits, bool IsMutable, typename Layout>
386 struct pixel_value_type<const packed_dynamic_channel_reference<BitField,NumBits,IsMutable>,Layout> :
387  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
388 
389 template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
390 struct pixel_value_type< packed_channel_reference<BitField,FirstBit,NumBits,IsMutable>,Layout> :
391  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
392 template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
393 struct pixel_value_type<const packed_channel_reference<BitField,FirstBit,NumBits,IsMutable>,Layout> :
394  public packed_pixel_type<BitField, mpl::vector1_c<unsigned,NumBits>, Layout> {};
395 
396 template <int NumBits, typename Layout>
397 struct pixel_value_type<packed_channel_value<NumBits>,Layout> :
398  public packed_pixel_type<typename detail::min_fast_uint<NumBits>::type, mpl::vector1_c<unsigned,NumBits>, Layout> {};
399 
400 
403 template <typename T, typename L, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
404 struct locator_type {
406 };
407 
410 template <typename T, typename L, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
411 struct view_type {
413 };
414 
417 template <typename T, typename L, bool IsPlanar=false, typename Alloc=std::allocator<unsigned char> >
418 struct image_type {
419  typedef image<pixel<T,L>, IsPlanar, Alloc> type;
420 };
421 
424 template <typename Pixel, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
427 };
428 
429 
433 template <typename Ref, typename T=use_default, typename L=use_default, typename IsPlanar=use_default, typename IsMutable=use_default>
435  typedef typename remove_reference<Ref>::type pixel_t;
436  typedef typename mpl::if_<is_same<T, use_default>, typename channel_type<pixel_t>::type, T >::type channel_t;
437  typedef typename mpl::if_<is_same<L, use_default>,
438  layout<typename color_space_type<pixel_t>::type, typename channel_mapping_type<pixel_t>::type>, L>::type layout_t;
439  static const bool mut =mpl::if_<is_same<IsMutable,use_default>, pixel_reference_is_mutable<Ref>, IsMutable>::type::value;
440  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<pixel_t>, IsPlanar>::type::value;
441 public:
443 };
444 
448 template <typename Iterator, typename T=use_default, typename L=use_default, typename IsPlanar=use_default, typename IsStep=use_default, typename IsMutable=use_default>
450  typedef typename mpl::if_<is_same<T ,use_default>, typename channel_type<Iterator>::type, T >::type channel_t;
451  typedef typename mpl::if_<is_same<L,use_default>,
452  layout<typename color_space_type<Iterator>::type, typename channel_mapping_type<Iterator>::type>, L>::type layout_t;
453 
454  static const bool mut =mpl::if_<is_same<IsMutable,use_default>, iterator_is_mutable<Iterator>, IsMutable>::type::value;
455  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<Iterator>, IsPlanar>::type::value;
456  static const bool step =mpl::if_<is_same<IsStep ,use_default>, iterator_is_step<Iterator>, IsStep>::type::value;
457 public:
459 };
460 
464 template <typename View, typename T=use_default, typename L=use_default, typename IsPlanar=use_default, typename StepX=use_default, typename IsMutable=use_default>
466  typedef typename mpl::if_<is_same<T ,use_default>, typename channel_type<View>::type, T>::type channel_t;
467  typedef typename mpl::if_<is_same<L,use_default>,
468  layout<typename color_space_type<View>::type, typename channel_mapping_type<View>::type>, L>::type layout_t;
469  static const bool mut =mpl::if_<is_same<IsMutable,use_default>, view_is_mutable<View>, IsMutable>::type::value;
470  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<View>, IsPlanar>::type::value;
471  static const bool step =mpl::if_<is_same<StepX ,use_default>, view_is_step_in_x<View>,StepX>::type::value;
472 public:
474 };
475 
479 template <typename Image, typename T=use_default, typename L=use_default, typename IsPlanar=use_default>
481  typedef typename mpl::if_<is_same<T ,use_default>, typename channel_type<Image>::type, T >::type channel_t;
482  typedef typename mpl::if_<is_same<L,use_default>,
483  layout<typename color_space_type<Image>::type, typename channel_mapping_type<Image>::type>, L>::type layout_t;
484  static const bool planar=mpl::if_<is_same<IsPlanar,use_default>, is_planar<Image>, IsPlanar>::type::value;
485 public:
487 };
488 
489 
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: gil_concept.hpp:73
Returns the type of an interleaved packed image: an image whose channels may not be byte-aligned...
Definition: metafunctions.hpp:301
Determines whether the given pixel reference is a proxy class or a native C++ reference.
Definition: metafunctions.hpp:166
A reference proxy to a planar pixel. Models: HomogeneousColorBaseConcept, HomogeneousPixelConcept.
Definition: metafunctions.hpp:45
Returns the type of a homogeneous image given the channel type, layout, and whether it operates on pl...
Definition: metafunctions.hpp:418
Determines if the given locator has a horizontal step that could be set dynamically.
Definition: metafunctions.hpp:149
Returns the type of a homogeneous view given the channel type, layout, whether it operates on planar ...
Definition: metafunctions.hpp:411
A lightweight object that interprets memory as a 2D array of pixels. Models ImageViewConcept,PixelBasedConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept.
Definition: image_view.hpp:67
returns the base iterator for a given iterator adaptor. Provide an specialization when introducing ne...
Definition: gil_concept.hpp:75
Returns the type of a single-channel image given its bitfield type, the bit size of its channel and i...
Definition: metafunctions.hpp:308
Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept, PixelValueConcept, HomogeneousPixelBasedConcept.
Definition: metafunctions.hpp:43
Returns the type of a homogeneous iterator given the channel type, layout, whether it operates on pla...
Definition: metafunctions.hpp:239
Returns the type of a four channel image given its bitfield type, the bit size of its channels and it...
Definition: metafunctions.hpp:323
Returns the type of a two channel image given its bitfield type, the bit size of its channels and its...
Definition: metafunctions.hpp:313
Channel utilities.
Returns the type of a five channel bit-aligned image given the bit size of its channels and its layou...
Definition: metafunctions.hpp:370
Heterogeneous pixel reference corresponding to non-byte-aligned bit range. Models ColorBaseConcept...
Definition: bit_aligned_pixel_reference.hpp:124
Constructs a pixel iterator type from a source pixel iterator type by changing some of the properties...
Definition: metafunctions.hpp:449
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.
Definition: algorithm.hpp:52
Determines if a given pixel iterator is basic Basic iterators must use gil::pixel (if interleaved)...
Definition: metafunctions.hpp:87
Concept check classes for GIL concepts.
Constructs a pixel reference type from a source pixel reference type by changing some of the properti...
Definition: metafunctions.hpp:434
Returns the type of a four channel bit-aligned image given the bit size of its channels and its layou...
Definition: metafunctions.hpp:365
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:56
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition: metafunctions.hpp:251
Basic images must use basic views and std::allocator.
Definition: metafunctions.hpp:118
Determines if the given pixel reference is mutable (i.e. its channels can be changed) ...
Definition: metafunctions.hpp:183
Determines if the given locator is mutable (i.e. its pixels can be changed)
Definition: metafunctions.hpp:189
Constructs a homogeneous image type from a source image type by changing some of the properties...
Definition: metafunctions.hpp:480
Represents a color space and ordering of channels in memory.
Definition: utilities.hpp:316
container interface over image view. Models ImageConcept, PixelBasedConcept
Definition: image.hpp:58
Determines if a given locator is basic. A basic locator is memory-based and has basic x_iterator and ...
Definition: metafunctions.hpp:108
Returns the type of a homogeneous pixel reference given the channel type, layout, whether it operates...
Definition: metafunctions.hpp:216
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:338
Determines if the given view has a vertical step that could be set dynamically.
Definition: metafunctions.hpp:161
Determines if the given view is mutable (i.e. its pixels can be changed)
Definition: metafunctions.hpp:192
Returns the type of a homogeneous pixel given the channel type and layout.
Definition: metafunctions.hpp:377
Returns the type of a homogeneous locator given the channel type, layout, whether it operates on plan...
Definition: metafunctions.hpp:404
Metafunction predicate returning whether the given iterator allows for changing its values...
Definition: gil_concept.hpp:72
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:465
Returns the type of a packed pixel given its bitfield type, the bit size of its channels and its layo...
Definition: metafunctions.hpp:285
Heterogeneous pixel value whose channel references can be constructed from the pixel bitfield and the...
Definition: gil_concept.hpp:86
Given a model of a pixel, determines whether the model represents a pixel reference (as opposed to pi...
Definition: metafunctions.hpp:173
Returns the type of a single-channel bit-aligned image given the bit size of its channel and its layo...
Definition: metafunctions.hpp:350
Determines if a given pixel reference is basic Basic references must use gil::pixel& (if interleaved)...
Definition: metafunctions.hpp:76
Returns the type of a three channel image given its bitfield type, the bit size of its channels and i...
Definition: metafunctions.hpp:318
Determines if the given locator has a vertical step that could be set dynamically.
Definition: metafunctions.hpp:153
Basic views must be over basic locators.
Definition: metafunctions.hpp:113
Determines if the given iterator has a step that could be set dynamically.
Definition: metafunctions.hpp:126
Returns the type of a two channel bit-aligned image given the bit size of its channels and its layout...
Definition: metafunctions.hpp:355
Returns the type of a pixel iterator given the pixel type, whether it operates on planar data...
Definition: metafunctions.hpp:224
Returns the type of a view the pixel type, whether it operates on planar data and whether it has a st...
Definition: metafunctions.hpp:425
MEMORY-BASED STEP ITERATOR.
Definition: algorithm.hpp:54
Returns the type of a three channel bit-aligned image given the bit size of its channels and its layo...
Definition: metafunctions.hpp:360
Determines if the given view has a horizontal step that could be set dynamically. ...
Definition: metafunctions.hpp:157
Returns the type of a five channel image given its bitfield type, the bit size of its channels and it...
Definition: metafunctions.hpp:328