Boost GIL


metafunctions.hpp
1//
2// Copyright 2005-2007 Adobe Systems Incorporated
3// Copyright 2021 Pranam Lashkari <plashkari628@gmail.com>
4//
5// Distributed under the Boost Software License, Version 1.0
6// See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt
8//
9#ifndef BOOST_GIL_METAFUNCTIONS_HPP
10#define BOOST_GIL_METAFUNCTIONS_HPP
11
12#include <boost/core/use_default.hpp>
13
14#include <boost/gil/channel.hpp>
15#include <boost/gil/dynamic_step.hpp>
16#include <boost/gil/concepts.hpp>
17#include <boost/gil/concepts/detail/type_traits.hpp>
18#include <boost/gil/detail/mp11.hpp>
19
20#include <iterator>
21#include <type_traits>
22
23namespace boost { namespace gil {
24
25// forward declarations
26template <typename T, typename L> struct pixel;
27template <typename BitField,typename ChannelRefs,typename Layout> struct packed_pixel;
28template <typename T, typename C> struct planar_pixel_reference;
29template <typename IC, typename C> struct planar_pixel_iterator;
30template <typename I> class memory_based_step_iterator;
31template <typename I> class memory_based_2d_locator;
32template <typename L> class image_view;
33template <typename Pixel, bool IsPlanar = false, typename Alloc=std::allocator<unsigned char> > class image;
34template <typename T> struct channel_type;
35template <typename T> struct color_space_type;
36template <typename T> struct channel_mapping_type;
37template <typename It> struct is_iterator_adaptor;
38template <typename It> struct iterator_adaptor_get_base;
39template <typename BitField, typename ChannelBitSizes, typename Layout, bool IsMutable> struct bit_aligned_pixel_reference;
40
47
48
55
59template <typename PixelRef>
60struct pixel_reference_is_basic : public std::false_type {};
61
62template <typename T, typename L>
63struct pixel_reference_is_basic<pixel<T, L>&> : std::true_type {};
64
65template <typename T, typename L>
66struct pixel_reference_is_basic<const pixel<T, L>&> : std::true_type {};
67
68template <typename TR, typename CS>
69struct pixel_reference_is_basic<planar_pixel_reference<TR, CS>> : std::true_type {};
70
71template <typename TR, typename CS>
72struct pixel_reference_is_basic<const planar_pixel_reference<TR, CS>> : std::true_type {};
73
77template <typename Iterator>
78struct iterator_is_basic : std::false_type {};
79
81template <typename T, typename L>
82struct iterator_is_basic<pixel<T, L>*> : std::true_type {};
83
85template <typename T, typename L>
86struct iterator_is_basic<pixel<T, L> const*> : std::true_type {};
87
89template <typename T, typename CS>
90struct iterator_is_basic<planar_pixel_iterator<T*, CS>> : std::true_type {};
91
93template <typename T, typename CS>
94struct iterator_is_basic<planar_pixel_iterator<T const*, CS>> : std::true_type {};
95
97template <typename T, typename L>
98struct iterator_is_basic<memory_based_step_iterator<pixel<T, L>*>> : std::true_type {};
99
101template <typename T, typename L>
102struct iterator_is_basic<memory_based_step_iterator<pixel<T, L> const*>> : std::true_type {};
103
105template <typename T, typename CS>
107 : std::true_type
108{};
109
111template <typename T, typename CS>
113 : std::true_type
114{};
115
116
119template <typename Loc>
120struct locator_is_basic : std::false_type {};
121
122template <typename Iterator>
123struct locator_is_basic
124 <
126 > : iterator_is_basic<Iterator>
127{};
128
131template <typename View>
132struct view_is_basic : std::false_type {};
133
134template <typename Loc>
135struct view_is_basic<image_view<Loc>> : locator_is_basic<Loc> {};
136
139template <typename Img>
140struct image_is_basic : std::false_type {};
141
142template <typename Pixel, bool IsPlanar, typename Alloc>
143struct image_is_basic<image<Pixel, IsPlanar, Alloc>> : std::true_type {};
144
145
149
150template <typename I>
151struct iterator_is_step;
152
153namespace detail {
154
155template <typename It, bool IsBase, bool EqualsStepType>
156struct iterator_is_step_impl;
157
158// iterator that has the same type as its dynamic_x_step_type must be a step iterator
159template <typename It, bool IsBase>
160struct iterator_is_step_impl<It, IsBase, true> : std::true_type {};
161
162// base iterator can never be a step iterator
163template <typename It>
164struct iterator_is_step_impl<It, true, false> : std::false_type {};
165
166// for an iterator adaptor, see if its base is step
167template <typename It>
168struct iterator_is_step_impl<It, false, false>
169 : public iterator_is_step<typename iterator_adaptor_get_base<It>::type> {};
170
171} // namespace detail
172
175template <typename I>
177 : detail::iterator_is_step_impl
178 <
179 I,
180 !is_iterator_adaptor<I>::value,
181 std::is_same<I, typename dynamic_x_step_type<I>::type
182 >::value
183>
184{};
185
188template <typename L> struct locator_is_step_in_x : public iterator_is_step<typename L::x_iterator> {};
189
192template <typename L> struct locator_is_step_in_y : public iterator_is_step<typename L::y_iterator> {};
193
196template <typename V> struct view_is_step_in_x : public locator_is_step_in_x<typename V::xy_locator> {};
197
200template <typename V> struct view_is_step_in_y : public locator_is_step_in_y<typename V::xy_locator> {};
201
204template <typename PixelReference>
206 : mp11::mp_not
207 <
208 std::is_same
209 <
210 typename detail::remove_const_and_reference<PixelReference>::type,
211 typename detail::remove_const_and_reference<PixelReference>::type::value_type
212 >
213 >
214{};
215
218template <typename Pixel>
220 : mp11::mp_or<is_reference<Pixel>, pixel_reference_is_proxy<Pixel>> {};
221
225
230template <typename R>
232 : std::integral_constant<bool, std::remove_reference<R>::type::is_mutable>
233{};
234
235template <typename R>
236struct pixel_reference_is_mutable<R const&>
237 : mp11::mp_and<pixel_reference_is_proxy<R>, pixel_reference_is_mutable<R>>
238{};
239
242template <typename L> struct locator_is_mutable : public iterator_is_mutable<typename L::x_iterator> {};
245template <typename V> struct view_is_mutable : public iterator_is_mutable<typename V::x_iterator> {};
246
247
254
258
262
266
269template <typename T, typename L, bool IsPlanar=false, bool IsMutable=true> struct pixel_reference_type{};
270template <typename T, typename L> struct pixel_reference_type<T,L,false,true > { using type = pixel<T,L>&; };
271template <typename T, typename L> struct pixel_reference_type<T,L,false,false> { using type = pixel<T,L> const&; };
272template <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
273template <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
274
277template <typename Pixel, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type_from_pixel{};
278template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,true > { using type = Pixel *; };
279template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,false> { using type = const Pixel *; };
280template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,true> {
281 using type = planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::pointer,typename color_space_type<Pixel>::type>;
282};
283template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,false> {
284 using type = planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::const_pointer,typename color_space_type<Pixel>::type>;
285};
286template <typename Pixel, bool IsPlanar, bool IsMutable> struct iterator_type_from_pixel<Pixel,IsPlanar,true,IsMutable> {
287 using type = memory_based_step_iterator<typename iterator_type_from_pixel<Pixel,IsPlanar,false,IsMutable>::type>;
288};
289
292template <typename T, typename L, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type{};
293template <typename T, typename L> struct iterator_type<T,L,false,false,true > { using type = pixel<T,L>*; };
294template <typename T, typename L> struct iterator_type<T,L,false,false,false> { using type = pixel<T,L> const*; };
295template <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
296template <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
297template <typename T, typename L, bool IsPlanar, bool IsMutable> struct iterator_type<T,L,IsPlanar,true,IsMutable> {
298 using type = memory_based_step_iterator<typename iterator_type<T,L,IsPlanar,false,IsMutable>::type>;
299};
300
303template <typename XIterator>
310
311namespace detail {
312
313template <typename BitField, typename FirstBit, typename NumBits>
314struct packed_channel_reference_type
315{
316 using type = packed_channel_reference
317 <
318 BitField, FirstBit::value, NumBits::value, true
319 > const;
320};
321
322template <typename BitField, typename ChannelBitSizes>
323class packed_channel_references_vector_type
324{
325 template <typename FirstBit, typename NumBits>
326 using reference_type = typename packed_channel_reference_type<BitField, FirstBit, NumBits>::type;
327
328 // If ChannelBitSizesVector is mp11::mp_list_c<int,7,7,2>
329 // Then first_bits_vector will be mp11::mp_list_c<int,0,7,14,16>
330 using first_bit_list = mp11::mp_fold_q
331 <
332 ChannelBitSizes,
333 mp11::mp_list<std::integral_constant<int, 0>>,
334 mp11::mp_bind
335 <
336 mp11::mp_push_back,
337 mp11::_1,
338 mp11::mp_bind
339 <
340 mp11::mp_plus,
341 mp11::mp_bind<mp_back, mp11::_1>,
342 mp11::_2
343 >
344 >
345 >;
346
347 static_assert(mp11::mp_at_c<first_bit_list, 0>::value == 0, "packed channel first bit must be 0");
348
349public:
350 using type = mp11::mp_transform
351 <
352 reference_type,
353 mp_pop_back<first_bit_list>,
354 ChannelBitSizes
355 >;
356};
357
358} // namespace detail
359
368template <typename BitField, typename ChannelBitSizes, typename Layout>
370{
371 using type = packed_pixel
372 <
373 BitField,
374 typename detail::packed_channel_references_vector_type
375 <
376 BitField,
377 ChannelBitSizes
378 >::type,
379 Layout>;
380};
381
390
393template <typename BitField, typename ChannelBitSizes, typename Layout, typename Alloc=std::allocator<unsigned char>>
398
401template <typename BitField, unsigned Size1, typename Layout, typename Alloc = std::allocator<unsigned char>>
403 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1>, Layout, Alloc>
404{};
405
408template <typename BitField, unsigned Size1, unsigned Size2, typename Layout, typename Alloc = std::allocator<unsigned char>>
410 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2>, Layout, Alloc>
411{};
412
415template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc = std::allocator<unsigned char>>
417 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2, Size3>, Layout, Alloc>
418{};
419
422template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc = std::allocator<unsigned char>>
424 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc>
425{};
426
429template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc = std::allocator<unsigned char>>
431 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
432
433
440template
441<
442 typename ChannelBitSizes,
443 typename Layout,
444 typename Alloc = std::allocator<unsigned char>
445>
447{
448private:
449
450 static constexpr int bit_size =
451 mp11::mp_fold
452 <
453 ChannelBitSizes,
454 std::integral_constant<int, 0>,
455 mp11::mp_plus
456 >::value;
457
458 using bitfield_t = typename detail::min_fast_uint<bit_size + 7>::type;
459 using bit_alignedref_t = bit_aligned_pixel_reference<bitfield_t, ChannelBitSizes, Layout, true> const;
460
461public:
463};
464
467template <unsigned Size1, typename Layout, typename Alloc = std::allocator<unsigned char>>
468struct bit_aligned_image1_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1>, Layout, Alloc> {};
469
472template <unsigned Size1, unsigned Size2, typename Layout, typename Alloc = std::allocator<unsigned char>>
473struct bit_aligned_image2_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2>, Layout, Alloc> {};
474
477template <unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc = std::allocator<unsigned char>>
478struct bit_aligned_image3_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2, Size3>, Layout, Alloc> {};
479
482template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc = std::allocator<unsigned char>>
483struct bit_aligned_image4_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc> {};
484
487template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc = std::allocator<unsigned char>>
488struct bit_aligned_image5_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
489
490
493template <typename Channel, typename Layout>
495{
496 // by default use gil::pixel. Specializations are provided for
498};
499
500// Specializations for packed channels
501template <typename BitField, int NumBits, bool IsMutable, typename Layout>
502struct pixel_value_type<packed_dynamic_channel_reference<BitField, NumBits, IsMutable>, Layout>
503 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
504{};
505
506template <typename BitField, int NumBits, bool IsMutable, typename Layout>
507struct pixel_value_type<packed_dynamic_channel_reference<BitField, NumBits, IsMutable> const, Layout>
508 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
509{};
510
511template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
512struct pixel_value_type<packed_channel_reference<BitField, FirstBit, NumBits, IsMutable>, Layout>
513 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
514{};
515
516template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
517struct pixel_value_type<packed_channel_reference<BitField, FirstBit, NumBits, IsMutable> const, Layout>
518 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
519{};
520
521template <int NumBits, typename Layout>
522struct pixel_value_type<packed_channel_value<NumBits>, Layout>
523 : packed_pixel_type<typename detail::min_fast_uint<NumBits>::type, mp11::mp_list_c<unsigned, NumBits>, Layout>
524{};
525
528template <typename T, typename L, bool IsPlanar = false, bool IsStepX = false, bool IsMutable = true>
530{
531 using type = typename type_from_x_iterator
532 <
534 >::xy_locator_type;
535};
536
539template <typename T, typename L, bool IsPlanar = false, bool IsStepX = false, bool IsMutable = true>
541{
542 using type = typename type_from_x_iterator
543 <
545 >::view_t;
546};
547
550template <typename T, typename L, bool IsPlanar = false, typename Alloc = std::allocator<unsigned char>>
552{
553 using type = image<pixel<T, L>, IsPlanar, Alloc>;
554};
555
558template <typename Pixel, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
562
563
567template
568<
569 typename Ref,
570 typename T = use_default,
571 typename L = use_default,
572 typename IsPlanar = use_default,
573 typename IsMutable = use_default>
575{
576 using pixel_t = typename std::remove_reference<Ref>::type;
577
578 using channel_t = typename mp11::mp_if
579 <
580 std::is_same<T, use_default>,
582 T
583 >::type;
584
585 using layout_t = typename mp11::mp_if
586 <
587 std::is_same<L, use_default>,
588 layout
589 <
590 typename color_space_type<pixel_t>::type,
591 typename channel_mapping_type<pixel_t>::type
592 >,
593 L
594 >::type;
595
596 static bool const mut = mp11::mp_if
597 <
598 std::is_same<IsMutable, use_default>,
600 IsMutable
601 >::value;
602
603 static bool const planar = mp11::mp_if
604 <
605 std::is_same<IsPlanar, use_default>,
606 is_planar<pixel_t>,
607 IsPlanar
608 >::value;
609
610public:
612};
613
617template
618<
619 typename Iterator,
620 typename T = use_default,
621 typename L = use_default,
622 typename IsPlanar = use_default,
623 typename IsStep = use_default,
624 typename IsMutable = use_default
625>
627{
628 using channel_t = typename mp11::mp_if
629 <
630 std::is_same<T, use_default>,
632 T
633 >::type;
634
635 using layout_t = typename mp11::mp_if
636 <
637 std::is_same<L, use_default>,
638 layout
639 <
640 typename color_space_type<Iterator>::type,
641 typename channel_mapping_type<Iterator>::type
642 >,
643 L
644 >::type;
645
646 static const bool mut = mp11::mp_if
647 <
648 std::is_same<IsMutable, use_default>,
650 IsMutable
651 >::value;
652
653 static bool const planar = mp11::mp_if
654 <
655 std::is_same<IsPlanar, use_default>,
656 is_planar<Iterator>,
657 IsPlanar
658 >::value;
659
660 static bool const step = mp11::mp_if
661 <
662 std::is_same<IsStep, use_default>,
664 IsStep
665 >::type::value;
666
667public:
669};
670
674template <typename View, typename T = use_default, typename L = use_default, typename IsPlanar = use_default, typename StepX = use_default, typename IsMutable = use_default>
676{
677 using channel_t = typename mp11::mp_if
678 <
679 std::is_same<T, use_default>,
681 T
682 >;
683
684 using layout_t = typename mp11::mp_if
685 <
686 std::is_same<L, use_default>,
687 layout
688 <
689 typename color_space_type<View>::type,
690 typename channel_mapping_type<View>::type
691 >,
692 L
693 >;
694
695 static bool const mut = mp11::mp_if
696 <
697 std::is_same<IsMutable, use_default>,
699 IsMutable
700 >::value;
701
702 static bool const planar = mp11::mp_if
703 <
704 std::is_same<IsPlanar, use_default>,
705 is_planar<View>,
706 IsPlanar
707 >::value;
708
709 static bool const step = mp11::mp_if
710 <
711 std::is_same<StepX, use_default>,
713 StepX
714 >::value;
715
716public:
717 using type = typename view_type<channel_t, layout_t, planar, step, mut>::type;
718};
719
723template <typename Image, typename T = use_default, typename L = use_default, typename IsPlanar = use_default>
725{
726 using channel_t = typename mp11::mp_if
727 <
728 std::is_same<T, use_default>,
730 T
731 >::type;
732
733 using layout_t = typename mp11::mp_if
734 <
735 std::is_same<L, use_default>,
736 layout
737 <
738 typename color_space_type<Image>::type,
739 typename channel_mapping_type<Image>::type>,
740 L
741 >::type;
742
743 static bool const planar = mp11::mp_if
744 <
745 std::is_same<IsPlanar, use_default>,
746 is_planar<Image>,
747 IsPlanar
748 >::value;
749
750public:
752};
753
754}} // namespace boost::gil
755
756#endif
Constructs a homogeneous image type from a source image type by changing some of the properties....
Definition metafunctions.hpp:725
Constructs a pixel iterator type from a source pixel iterator type by changing some of the properties...
Definition metafunctions.hpp:627
Constructs a pixel reference type from a source pixel reference type by changing some of the properti...
Definition metafunctions.hpp:575
Constructs an image view type from a source view type by changing some of the properties....
Definition metafunctions.hpp:676
A lightweight object that interprets memory as a 2D array of pixels. Models ImageViewConcept,...
Definition image_view.hpp:54
container interface over image view. Models ImageConcept, PixelBasedConcept
Definition image.hpp:43
Memory-based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,...
Definition locator.hpp:230
MEMORY-BASED STEP ITERATOR.
Definition step_iterator.hpp:158
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36
Returns the type of a single-channel bit-aligned image given the bit size of its channel and its layo...
Definition metafunctions.hpp:468
Returns the type of a two channel bit-aligned image given the bit size of its channels and its layout...
Definition metafunctions.hpp:473
Returns the type of a three channel bit-aligned image given the bit size of its channels and its layo...
Definition metafunctions.hpp:478
Returns the type of a four channel bit-aligned image given the bit size of its channels and its layou...
Definition metafunctions.hpp:483
Returns the type of a five channel bit-aligned image given the bit size of its channels and its layou...
Definition metafunctions.hpp:488
Returns the type of a packed image whose pixels may not be byte aligned. For example,...
Definition metafunctions.hpp:447
Definition color_convert.hpp:31
Basic images must use basic views and std::allocator.
Definition metafunctions.hpp:140
Returns the type of a homogeneous image given the channel type, layout, and whether it operates on pl...
Definition metafunctions.hpp:552
returns the base iterator for a given iterator adaptor. Provide an specialization when introducing ne...
Definition metafunctions.hpp:38
Determines if a given pixel iterator is basic Basic iterators must use gil::pixel (if interleaved),...
Definition metafunctions.hpp:78
Metafunction predicate returning whether the given iterator allows for changing its values.
Definition pixel_iterator.hpp:49
Determines if the given iterator has a step that could be set dynamically.
Definition metafunctions.hpp:184
Returns the type of a pixel iterator given the pixel type, whether it operates on planar data,...
Definition metafunctions.hpp:277
Returns the type of a homogeneous iterator given the channel type, layout, whether it operates on pla...
Definition metafunctions.hpp:292
Represents a color space and ordering of channels in memory.
Definition utilities.hpp:265
Determines if a given locator is basic. A basic locator is memory-based and has basic x_iterator and ...
Definition metafunctions.hpp:120
Determines if the given locator is mutable (i.e. its pixels can be changed)
Definition metafunctions.hpp:242
Determines if the given locator has a horizontal step that could be set dynamically.
Definition metafunctions.hpp:188
Determines if the given locator has a vertical step that could be set dynamically.
Definition metafunctions.hpp:192
Returns the type of a homogeneous locator given the channel type, layout, whether it operates on plan...
Definition metafunctions.hpp:530
Returns the type of a single-channel image given its bitfield type, the bit size of its channel and i...
Definition metafunctions.hpp:404
Returns the type of a two channel image given its bitfield type, the bit size of its channels and its...
Definition metafunctions.hpp:411
Returns the type of a three channel image given its bitfield type, the bit size of its channels and i...
Definition metafunctions.hpp:418
Returns the type of a four channel image given its bitfield type, the bit size of its channels and it...
Definition metafunctions.hpp:425
Returns the type of a five channel image given its bitfield type, the bit size of its channels and it...
Definition metafunctions.hpp:431
Returns the type of an interleaved packed image: an image whose channels may not be byte-aligned,...
Definition metafunctions.hpp:395
Returns the type of a packed pixel given its bitfield type, the bit size of its channels and its layo...
Definition metafunctions.hpp:370
Heterogeneous pixel value whose channel references can be constructed from the pixel bitfield and the...
Definition packed_pixel.hpp:50
Given a model of a pixel, determines whether the model represents a pixel reference (as opposed to pi...
Definition metafunctions.hpp:220
Determines if a given pixel reference is basic Basic references must use gil::pixel& (if interleaved)...
Definition metafunctions.hpp:60
Determines if the given pixel reference is mutable (i.e. its channels can be changed)
Definition metafunctions.hpp:233
Determines whether the given pixel reference is a proxy class or a native C++ reference.
Definition metafunctions.hpp:214
Returns the type of a homogeneous pixel reference given the channel type, layout, whether it operates...
Definition metafunctions.hpp:269
Returns the type of a homogeneous pixel given the channel type and layout.
Definition metafunctions.hpp:495
Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept,...
Definition pixel.hpp:106
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept,...
Definition planar_pixel_iterator.hpp:59
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition metafunctions.hpp:305
Basic views must be over basic locators.
Definition metafunctions.hpp:132
Determines if the given view is mutable (i.e. its pixels can be changed)
Definition metafunctions.hpp:245
Determines if the given view has a horizontal step that could be set dynamically.
Definition metafunctions.hpp:196
Determines if the given view has a vertical step that could be set dynamically.
Definition metafunctions.hpp:200
Returns the type of a view the pixel type, whether it operates on planar data and whether it has a st...
Definition metafunctions.hpp:559
Returns the type of a homogeneous view given the channel type, layout, whether it operates on planar ...
Definition metafunctions.hpp:541