Generic Image Library: metafunctions.hpp Source File

###  | #  |

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/gil/channel.hpp>
13#include <boost/gil/dynamic_step.hpp>
14#include <boost/gil/concepts.hpp>
15#include <boost/gil/concepts/detail/type_traits.hpp>
16#include <boost/gil/detail/mp11.hpp>
17
18#include <iterator>
19#include <type_traits>
20
21namespace boost { namespace gil {
22
23// forward declarations
24template <typename T, typename L> struct pixel;
25template <typename BitField,typename ChannelRefs,typename Layout> struct packed_pixel;
26template <typename T, typename C> struct planar_pixel_reference;
27template <typename IC, typename C> struct planar_pixel_iterator;
28template <typename I> class memory_based_step_iterator;
29 template <typename I> class memory_based_2d_locator;
30 template <typename L> class image_view;
31 template <typename Pixel, bool IsPlanar = false, typename Alloc=std::allocator<unsigned char> > class image;
32template <typename T> struct channel_type;
33template <typename T> struct color_space_type;
34template <typename T> struct channel_mapping_type;
35template <typename It> struct is_iterator_adaptor;
36template <typename It> struct iterator_adaptor_get_base;
37template <typename BitField, typename ChannelBitSizes, typename Layout, bool IsMutable> struct bit_aligned_pixel_reference;
38
45
46
53
57template <typename PixelRef>
58 struct pixel_reference_is_basic : public std::false_type {};
59
60template <typename T, typename L>
61struct pixel_reference_is_basic<pixel<T, L>&> : std::true_type {};
62
63template <typename T, typename L>
64struct pixel_reference_is_basic<const pixel<T, L>&> : std::true_type {};
65
66template <typename TR, typename CS>
67struct pixel_reference_is_basic<planar_pixel_reference<TR, CS>> : std::true_type {};
68
69template <typename TR, typename CS>
70struct pixel_reference_is_basic<const planar_pixel_reference<TR, CS>> : std::true_type {};
71
75template <typename Iterator>
76 struct iterator_is_basic : std::false_type {};
77
79template <typename T, typename L>
80 struct iterator_is_basic<pixel<T, L>*> : std::true_type {};
81
83template <typename T, typename L>
84 struct iterator_is_basic<pixel<T, L> const*> : std::true_type {};
85
87template <typename T, typename CS>
88 struct iterator_is_basic<planar_pixel_iterator<T*, CS>> : std::true_type {};
89
91template <typename T, typename CS>
92 struct iterator_is_basic<planar_pixel_iterator<T const*, CS>> : std::true_type {};
93
95template <typename T, typename L>
96 struct iterator_is_basic<memory_based_step_iterator<pixel<T, L>*>> : std::true_type {};
97
99template <typename T, typename L>
100 struct iterator_is_basic<memory_based_step_iterator<pixel<T, L> const*>> : std::true_type {};
101
103template <typename T, typename CS>
104 struct iterator_is_basic<memory_based_step_iterator<planar_pixel_iterator<T*, CS>>>
105 : std::true_type
106{};
107
109template <typename T, typename CS>
110 struct iterator_is_basic<memory_based_step_iterator<planar_pixel_iterator<T const*, CS>>>
111 : std::true_type
112{};
113
114
117template <typename Loc>
118 struct locator_is_basic : std::false_type {};
119
120template <typename Iterator>
121struct locator_is_basic
122 <
123 memory_based_2d_locator<memory_based_step_iterator<Iterator>>
124 > : iterator_is_basic<Iterator>
125{};
126
129template <typename View>
130 struct view_is_basic : std::false_type {};
131
132template <typename Loc>
133struct view_is_basic<image_view<Loc>> : locator_is_basic<Loc> {};
134
137template <typename Img>
138 struct image_is_basic : std::false_type {};
139
140template <typename Pixel, bool IsPlanar, typename Alloc>
141struct image_is_basic<image<Pixel, IsPlanar, Alloc>> : std::true_type {};
142
143
147
148template <typename I>
149struct iterator_is_step;
150
151namespace detail {
152
153template <typename It, bool IsBase, bool EqualsStepType>
154struct iterator_is_step_impl;
155
156// iterator that has the same type as its dynamic_x_step_type must be a step iterator
157template <typename It, bool IsBase>
158struct iterator_is_step_impl<It, IsBase, true> : std::true_type {};
159
160// base iterator can never be a step iterator
161template <typename It>
162struct iterator_is_step_impl<It, true, false> : std::false_type {};
163
164// for an iterator adaptor, see if its base is step
165template <typename It>
166struct iterator_is_step_impl<It, false, false>
167 : public iterator_is_step<typename iterator_adaptor_get_base<It>::type> {};
168
169} // namespace detail
170
173template <typename I>
174 struct iterator_is_step
175 : detail::iterator_is_step_impl
176 <
177 I,
178 !is_iterator_adaptor<I>::value,
179 std::is_same<I, typename dynamic_x_step_type<I>::type
180 >::value
181>
182{};
183
186 template <typename L> struct locator_is_step_in_x : public iterator_is_step<typename L::x_iterator> {};
187
190 template <typename L> struct locator_is_step_in_y : public iterator_is_step<typename L::y_iterator> {};
191
194 template <typename V> struct view_is_step_in_x : public locator_is_step_in_x<typename V::xy_locator> {};
195
198 template <typename V> struct view_is_step_in_y : public locator_is_step_in_y<typename V::xy_locator> {};
199
202template <typename PixelReference>
203 struct pixel_reference_is_proxy
204 : mp11::mp_not
205 <
206 std::is_same
207 <
208 typename detail::remove_const_and_reference<PixelReference>::type,
209 typename detail::remove_const_and_reference<PixelReference>::type::value_type
210 >
211 >
212{};
213
216template <typename Pixel>
217 struct pixel_is_reference
218 : mp11::mp_or<is_reference<Pixel>, pixel_reference_is_proxy<Pixel>> {};
219
223
228template <typename R>
229 struct pixel_reference_is_mutable
230 : std::integral_constant<bool, std::remove_reference<R>::type::is_mutable>
231{};
232
233template <typename R>
234struct pixel_reference_is_mutable<R const&>
235 : mp11::mp_and<pixel_reference_is_proxy<R>, pixel_reference_is_mutable<R>>
236{};
237
240 template <typename L> struct locator_is_mutable : public iterator_is_mutable<typename L::x_iterator> {};
243 template <typename V> struct view_is_mutable : public iterator_is_mutable<typename V::x_iterator> {};
244
245
252
256
260
264
267 template <typename T, typename L, bool IsPlanar=false, bool IsMutable=true> struct pixel_reference_type{};
268template <typename T, typename L> struct pixel_reference_type<T,L,false,true > { using type = pixel<T,L>&; };
269template <typename T, typename L> struct pixel_reference_type<T,L,false,false> { using type = pixel<T,L> const&; };
270template <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
271template <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
272
275 template <typename Pixel, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type_from_pixel{};
276template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,true > { using type = Pixel *; };
277template <typename Pixel> struct iterator_type_from_pixel<Pixel,false,false,false> { using type = const Pixel *; };
278template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,true> {
279 using type = planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::pointer,typename color_space_type<Pixel>::type>;
280};
281template <typename Pixel> struct iterator_type_from_pixel<Pixel,true,false,false> {
282 using type = planar_pixel_iterator<typename channel_traits<typename channel_type<Pixel>::type>::const_pointer,typename color_space_type<Pixel>::type>;
283};
284template <typename Pixel, bool IsPlanar, bool IsMutable> struct iterator_type_from_pixel<Pixel,IsPlanar,true,IsMutable> {
285 using type = memory_based_step_iterator<typename iterator_type_from_pixel<Pixel,IsPlanar,false,IsMutable>::type>;
286};
287
290 template <typename T, typename L, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true> struct iterator_type{};
291template <typename T, typename L> struct iterator_type<T,L,false,false,true > { using type = pixel<T,L>*; };
292template <typename T, typename L> struct iterator_type<T,L,false,false,false> { using type = pixel<T,L> const*; };
293template <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
294template <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
295template <typename T, typename L, bool IsPlanar, bool IsMutable> struct iterator_type<T,L,IsPlanar,true,IsMutable> {
296 using type = memory_based_step_iterator<typename iterator_type<T,L,IsPlanar,false,IsMutable>::type>;
297};
298
301template <typename XIterator>
302 struct type_from_x_iterator
303{
304 using step_iterator_t = memory_based_step_iterator<XIterator>;
305 using xy_locator_t = memory_based_2d_locator<step_iterator_t>;
306 using view_t = image_view<xy_locator_t>;
307};
308
309namespace detail {
310
311template <typename BitField, typename FirstBit, typename NumBits>
312struct packed_channel_reference_type
313{
314 using type = packed_channel_reference
315 <
316 BitField, FirstBit::value, NumBits::value, true
317 > const;
318};
319
320template <typename BitField, typename ChannelBitSizes>
321class packed_channel_references_vector_type
322{
323 template <typename FirstBit, typename NumBits>
324 using reference_type = typename packed_channel_reference_type<BitField, FirstBit, NumBits>::type;
325
326 // If ChannelBitSizesVector is mp11::mp_list_c<int,7,7,2>
327 // Then first_bits_vector will be mp11::mp_list_c<int,0,7,14,16>
328 using first_bit_list = mp11::mp_fold_q
329 <
330 ChannelBitSizes,
331 mp11::mp_list<std::integral_constant<int, 0>>,
332 mp11::mp_bind
333 <
334 mp11::mp_push_back,
335 mp11::_1,
336 mp11::mp_bind
337 <
338 mp11::mp_plus,
339 mp11::mp_bind<mp_back, mp11::_1>,
340 mp11::_2
341 >
342 >
343 >;
344
345 static_assert(mp11::mp_at_c<first_bit_list, 0>::value == 0, "packed channel first bit must be 0");
346
347public:
348 using type = mp11::mp_transform
349 <
350 reference_type,
351 mp_pop_back<first_bit_list>,
352 ChannelBitSizes
353 >;
354};
355
356} // namespace detail
357
366template <typename BitField, typename ChannelBitSizes, typename Layout>
367 struct packed_pixel_type
368{
369 using type = packed_pixel
370 <
371 BitField,
372 typename detail::packed_channel_references_vector_type
373 <
374 BitField,
375 ChannelBitSizes
376 >::type,
377 Layout>;
378};
379
388
391template <typename BitField, typename ChannelBitSizes, typename Layout, typename Alloc=std::allocator<unsigned char>>
392 struct packed_image_type
393{
394 using type = image<typename packed_pixel_type<BitField,ChannelBitSizes,Layout>::type,false,Alloc>;
395};
396
399template <typename BitField, unsigned Size1, typename Layout, typename Alloc = std::allocator<unsigned char>>
400 struct packed_image1_type
401 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1>, Layout, Alloc>
402{};
403
406template <typename BitField, unsigned Size1, unsigned Size2, typename Layout, typename Alloc = std::allocator<unsigned char>>
407 struct packed_image2_type
408 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2>, Layout, Alloc>
409{};
410
413template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc = std::allocator<unsigned char>>
414 struct packed_image3_type
415 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2, Size3>, Layout, Alloc>
416{};
417
420template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc = std::allocator<unsigned char>>
421 struct packed_image4_type
422 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc>
423{};
424
427template <typename BitField, unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc = std::allocator<unsigned char>>
428 struct packed_image5_type
429 : packed_image_type<BitField, mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
430
431
438template
439<
440 typename ChannelBitSizes,
441 typename Layout,
442 typename Alloc = std::allocator<unsigned char>
443>
444 struct bit_aligned_image_type
445{
446private:
447
448 static constexpr int bit_size =
449 mp11::mp_fold
450 <
451 ChannelBitSizes,
452 std::integral_constant<int, 0>,
453 mp11::mp_plus
454 >::value;
455
456 using bitfield_t = typename detail::min_fast_uint<bit_size + 7>::type;
457 using bit_alignedref_t = bit_aligned_pixel_reference<bitfield_t, ChannelBitSizes, Layout, true> const;
458
459public:
460 using type = image<bit_alignedref_t,false,Alloc>;
461};
462
465template <unsigned Size1, typename Layout, typename Alloc = std::allocator<unsigned char>>
466 struct bit_aligned_image1_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1>, Layout, Alloc> {};
467
470template <unsigned Size1, unsigned Size2, typename Layout, typename Alloc = std::allocator<unsigned char>>
471 struct bit_aligned_image2_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2>, Layout, Alloc> {};
472
475template <unsigned Size1, unsigned Size2, unsigned Size3, typename Layout, typename Alloc = std::allocator<unsigned char>>
476 struct bit_aligned_image3_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2, Size3>, Layout, Alloc> {};
477
480template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, typename Layout, typename Alloc = std::allocator<unsigned char>>
481 struct bit_aligned_image4_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4>, Layout, Alloc> {};
482
485template <unsigned Size1, unsigned Size2, unsigned Size3, unsigned Size4, unsigned Size5, typename Layout, typename Alloc = std::allocator<unsigned char>>
486 struct bit_aligned_image5_type : bit_aligned_image_type<mp11::mp_list_c<unsigned, Size1, Size2, Size3, Size4, Size5>, Layout, Alloc> {};
487
488
491template <typename Channel, typename Layout>
492 struct pixel_value_type
493{
494 // by default use gil::pixel. Specializations are provided for
495 using type = pixel<Channel, Layout>;
496};
497
498// Specializations for packed channels
499template <typename BitField, int NumBits, bool IsMutable, typename Layout>
500struct pixel_value_type<packed_dynamic_channel_reference<BitField, NumBits, IsMutable>, Layout>
501 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
502{};
503
504template <typename BitField, int NumBits, bool IsMutable, typename Layout>
505struct pixel_value_type<packed_dynamic_channel_reference<BitField, NumBits, IsMutable> const, Layout>
506 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
507{};
508
509template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
510struct pixel_value_type<packed_channel_reference<BitField, FirstBit, NumBits, IsMutable>, Layout>
511 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
512{};
513
514template <typename BitField, int FirstBit, int NumBits, bool IsMutable, typename Layout>
515struct pixel_value_type<packed_channel_reference<BitField, FirstBit, NumBits, IsMutable> const, Layout>
516 : packed_pixel_type<BitField, mp11::mp_list_c<unsigned, NumBits>, Layout>
517{};
518
519template <int NumBits, typename Layout>
520struct pixel_value_type<packed_channel_value<NumBits>, Layout>
521 : packed_pixel_type<typename detail::min_fast_uint<NumBits>::type, mp11::mp_list_c<unsigned, NumBits>, Layout>
522{};
523
526template <typename T, typename L, bool IsPlanar = false, bool IsStepX = false, bool IsMutable = true>
527 struct locator_type
528{
529 using type = typename type_from_x_iterator
530 <
531 typename iterator_type<T, L, IsPlanar, IsStepX, IsMutable>::type
532 >::xy_locator_type;
533};
534
537template <typename T, typename L, bool IsPlanar = false, bool IsStepX = false, bool IsMutable = true>
538 struct view_type
539{
540 using type = typename type_from_x_iterator
541 <
542 typename iterator_type<T, L, IsPlanar, IsStepX, IsMutable>::type
543 >::view_t;
544};
545
548template <typename T, typename L, bool IsPlanar = false, typename Alloc = std::allocator<unsigned char>>
549 struct image_type
550{
551 using type = image<pixel<T, L>, IsPlanar, Alloc>;
552};
553
556template <typename Pixel, bool IsPlanar=false, bool IsStepX=false, bool IsMutable=true>
557 struct view_type_from_pixel {
558 using type = typename type_from_x_iterator<typename iterator_type_from_pixel<Pixel,IsPlanar,IsStepX,IsMutable>::type>::view_t;
559};
560
561
565template
566<
567 typename Ref,
568 typename T = use_default,
569 typename L = use_default,
570 typename IsPlanar = use_default,
571 typename IsMutable = use_default>
572 class derived_pixel_reference_type
573{
574 using pixel_t = typename std::remove_reference<Ref>::type;
575
576 using channel_t = typename mp11::mp_if
577 <
578 std::is_same<T, use_default>,
579 typename channel_type<pixel_t>::type,
580 T
581 >::type;
582
583 using layout_t = typename mp11::mp_if
584 <
585 std::is_same<L, use_default>,
586 layout
587 <
588 typename color_space_type<pixel_t>::type,
589 typename channel_mapping_type<pixel_t>::type
590 >,
591 L
592 >::type;
593
594 static bool const mut = mp11::mp_if
595 <
596 std::is_same<IsMutable, use_default>,
597 pixel_reference_is_mutable<Ref>,
598 IsMutable
599 >::value;
600
601 static bool const planar = mp11::mp_if
602 <
603 std::is_same<IsPlanar, use_default>,
604 is_planar<pixel_t>,
605 IsPlanar
606 >::value;
607
608public:
609 using type = typename pixel_reference_type<channel_t, layout_t, planar, mut>::type;
610};
611
615template
616<
617 typename Iterator,
618 typename T = use_default,
619 typename L = use_default,
620 typename IsPlanar = use_default,
621 typename IsStep = use_default,
622 typename IsMutable = use_default
623>
624 class derived_iterator_type
625{
626 using channel_t = typename mp11::mp_if
627 <
628 std::is_same<T, use_default>,
629 typename channel_type<Iterator>::type,
630 T
631 >::type;
632
633 using layout_t = typename mp11::mp_if
634 <
635 std::is_same<L, use_default>,
636 layout
637 <
638 typename color_space_type<Iterator>::type,
639 typename channel_mapping_type<Iterator>::type
640 >,
641 L
642 >::type;
643
644 static const bool mut = mp11::mp_if
645 <
646 std::is_same<IsMutable, use_default>,
647 iterator_is_mutable<Iterator>,
648 IsMutable
649 >::value;
650
651 static bool const planar = mp11::mp_if
652 <
653 std::is_same<IsPlanar, use_default>,
654 is_planar<Iterator>,
655 IsPlanar
656 >::value;
657
658 static bool const step = mp11::mp_if
659 <
660 std::is_same<IsStep, use_default>,
661 iterator_is_step<Iterator>,
662 IsStep
663 >::type::value;
664
665public:
666 using type = typename iterator_type<channel_t, layout_t, planar, step, mut>::type;
667};
668
672template <typename View, typename T = use_default, typename L = use_default, typename IsPlanar = use_default, typename StepX = use_default, typename IsMutable = use_default>
673 class derived_view_type
674{
675 using channel_t = typename mp11::mp_if
676 <
677 std::is_same<T, use_default>,
678 typename channel_type<View>::type,
679 T
680 >;
681
682 using layout_t = typename mp11::mp_if
683 <
684 std::is_same<L, use_default>,
685 layout
686 <
687 typename color_space_type<View>::type,
688 typename channel_mapping_type<View>::type
689 >,
690 L
691 >;
692
693 static bool const mut = mp11::mp_if
694 <
695 std::is_same<IsMutable, use_default>,
696 view_is_mutable<View>,
697 IsMutable
698 >::value;
699
700 static bool const planar = mp11::mp_if
701 <
702 std::is_same<IsPlanar, use_default>,
703 is_planar<View>,
704 IsPlanar
705 >::value;
706
707 static bool const step = mp11::mp_if
708 <
709 std::is_same<StepX, use_default>,
710 view_is_step_in_x<View>,
711 StepX
712 >::value;
713
714public:
715 using type = typename view_type<channel_t, layout_t, planar, step, mut>::type;
716};
717
721template <typename Image, typename T = use_default, typename L = use_default, typename IsPlanar = use_default>
722 class derived_image_type
723{
724 using channel_t = typename mp11::mp_if
725 <
726 std::is_same<T, use_default>,
727 typename channel_type<Image>::type,
728 T
729 >::type;
730
731 using layout_t = typename mp11::mp_if
732 <
733 std::is_same<L, use_default>,
734 layout
735 <
736 typename color_space_type<Image>::type,
737 typename channel_mapping_type<Image>::type>,
738 L
739 >::type;
740
741 static bool const planar = mp11::mp_if
742 <
743 std::is_same<IsPlanar, use_default>,
744 is_planar<Image>,
745 IsPlanar
746 >::value;
747
748public:
749 using type = typename image_type<channel_t, layout_t, planar>::type;
750};
751
752}} // namespace boost::gil
753
754#endif
boost::gil::derived_image_type
Constructs a homogeneous image type from a source image type by changing some of the properties....
Definition metafunctions.hpp:723
boost::gil::derived_iterator_type
Constructs a pixel iterator type from a source pixel iterator type by changing some of the properties...
Definition metafunctions.hpp:625
boost::gil::derived_pixel_reference_type
Constructs a pixel reference type from a source pixel reference type by changing some of the properti...
Definition metafunctions.hpp:573
boost::gil::derived_view_type
Constructs an image view type from a source view type by changing some of the properties....
Definition metafunctions.hpp:674
boost::gil::image_view
A lightweight object that interprets memory as a 2D array of pixels. Models ImageViewConcept,...
Definition metafunctions.hpp:30
boost::gil::image
container interface over image view. Models ImageConcept, PixelBasedConcept
Definition metafunctions.hpp:31
boost::gil::memory_based_2d_locator
Memory-based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,...
Definition metafunctions.hpp:29
boost::gil::memory_based_step_iterator
MEMORY-BASED STEP ITERATOR.
Definition step_iterator.hpp:149
boost
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36
boost::gil::bit_aligned_image1_type
Returns the type of a single-channel bit-aligned image given the bit size of its channel and its layo...
Definition metafunctions.hpp:466
boost::gil::bit_aligned_image2_type
Returns the type of a two channel bit-aligned image given the bit size of its channels and its layout...
Definition metafunctions.hpp:471
boost::gil::bit_aligned_image3_type
Returns the type of a three channel bit-aligned image given the bit size of its channels and its layo...
Definition metafunctions.hpp:476
boost::gil::bit_aligned_image4_type
Returns the type of a four channel bit-aligned image given the bit size of its channels and its layou...
Definition metafunctions.hpp:481
boost::gil::bit_aligned_image5_type
Returns the type of a five channel bit-aligned image given the bit size of its channels and its layou...
Definition metafunctions.hpp:486
boost::gil::bit_aligned_image_type
Returns the type of a packed image whose pixels may not be byte aligned. For example,...
Definition metafunctions.hpp:445
boost::gil::channel_type
Definition fwd.hpp:25
boost::gil::image_is_basic
Basic images must use basic views and std::allocator.
Definition metafunctions.hpp:138
boost::gil::image_type
Returns the type of a homogeneous image given the channel type, layout, and whether it operates on pl...
Definition metafunctions.hpp:550
boost::gil::is_iterator_adaptor
metafunction predicate determining whether the given iterator is a plain one or an adaptor over anoth...
Definition concepts/pixel_iterator.hpp:40
boost::gil::iterator_adaptor_get_base
returns the base iterator for a given iterator adaptor. Provide an specialization when introducing ne...
Definition concepts/pixel_iterator.hpp:42
boost::gil::iterator_is_basic
Determines if a given pixel iterator is basic Basic iterators must use gil::pixel (if interleaved),...
Definition metafunctions.hpp:76
boost::gil::iterator_is_mutable
Metafunction predicate returning whether the given iterator allows for changing its values.
Definition concepts/pixel_iterator.hpp:39
boost::gil::iterator_is_step
Determines if the given iterator has a step that could be set dynamically.
Definition metafunctions.hpp:182
boost::gil::iterator_type_from_pixel
Returns the type of a pixel iterator given the pixel type, whether it operates on planar data,...
Definition metafunctions.hpp:275
boost::gil::iterator_type
Returns the type of a homogeneous iterator given the channel type, layout, whether it operates on pla...
Definition metafunctions.hpp:290
boost::gil::layout
Represents a color space and ordering of channels in memory.
Definition utilities.hpp:268
boost::gil::locator_is_basic
Determines if a given locator is basic. A basic locator is memory-based and has basic x_iterator and ...
Definition metafunctions.hpp:118
boost::gil::locator_is_mutable
Determines if the given locator is mutable (i.e. its pixels can be changed)
Definition metafunctions.hpp:240
boost::gil::locator_is_step_in_x
Determines if the given locator has a horizontal step that could be set dynamically.
Definition metafunctions.hpp:186
boost::gil::locator_is_step_in_y
Determines if the given locator has a vertical step that could be set dynamically.
Definition metafunctions.hpp:190
boost::gil::locator_type
Returns the type of a homogeneous locator given the channel type, layout, whether it operates on plan...
Definition metafunctions.hpp:528
boost::gil::packed_image1_type
Returns the type of a single-channel image given its bitfield type, the bit size of its channel and i...
Definition metafunctions.hpp:402
boost::gil::packed_image2_type
Returns the type of a two channel image given its bitfield type, the bit size of its channels and its...
Definition metafunctions.hpp:409
boost::gil::packed_image3_type
Returns the type of a three channel image given its bitfield type, the bit size of its channels and i...
Definition metafunctions.hpp:416
boost::gil::packed_image4_type
Returns the type of a four channel image given its bitfield type, the bit size of its channels and it...
Definition metafunctions.hpp:423
boost::gil::packed_image5_type
Returns the type of a five channel image given its bitfield type, the bit size of its channels and it...
Definition metafunctions.hpp:429
boost::gil::packed_image_type
Returns the type of an interleaved packed image: an image whose channels may not be byte-aligned,...
Definition metafunctions.hpp:393
boost::gil::packed_pixel_type
Returns the type of a packed pixel given its bitfield type, the bit size of its channels and its layo...
Definition metafunctions.hpp:368
boost::gil::packed_pixel
Heterogeneous pixel value whose channel references can be constructed from the pixel bitfield and the...
Definition concepts/color_base.hpp:49
boost::gil::pixel_is_reference
Given a model of a pixel, determines whether the model represents a pixel reference (as opposed to pi...
Definition metafunctions.hpp:218
boost::gil::pixel_reference_is_basic
Determines if a given pixel reference is basic Basic references must use gil::pixel& (if interleaved)...
Definition metafunctions.hpp:58
boost::gil::pixel_reference_is_mutable
Determines if the given pixel reference is mutable (i.e. its channels can be changed)
Definition metafunctions.hpp:231
boost::gil::pixel_reference_is_proxy
Determines whether the given pixel reference is a proxy class or a native C++ reference.
Definition metafunctions.hpp:212
boost::gil::pixel_reference_type
Returns the type of a homogeneous pixel reference given the channel type, layout, whether it operates...
Definition metafunctions.hpp:267
boost::gil::pixel_value_type
Returns the type of a homogeneous pixel given the channel type and layout.
Definition metafunctions.hpp:493
boost::gil::pixel
Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept,...
Definition pixel.hpp:106
boost::gil::planar_pixel_iterator
An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept,...
Definition planar_pixel_iterator.hpp:58
boost::gil::type_from_x_iterator
Given a pixel iterator defining access to pixels along a row, returns the types of the corresponding ...
Definition metafunctions.hpp:303
boost::gil::view_is_basic
Basic views must be over basic locators.
Definition metafunctions.hpp:130
boost::gil::view_is_mutable
Determines if the given view is mutable (i.e. its pixels can be changed)
Definition metafunctions.hpp:243
boost::gil::view_is_step_in_x
Determines if the given view has a horizontal step that could be set dynamically.
Definition metafunctions.hpp:194
boost::gil::view_is_step_in_y
Determines if the given view has a vertical step that could be set dynamically.
Definition metafunctions.hpp:198
boost::gil::view_type_from_pixel
Returns the type of a view the pixel type, whether it operates on planar data and whether it has a st...
Definition metafunctions.hpp:557
boost::gil::view_type
Returns the type of a homogeneous view given the channel type, layout, whether it operates on planar ...
Definition metafunctions.hpp:539