8 #ifndef BOOST_GIL_CONCEPTS_CHANNEL_HPP 9 #define BOOST_GIL_CONCEPTS_CHANNEL_HPP 11 #include <boost/gil/concepts/basic.hpp> 12 #include <boost/gil/concepts/concept_check.hpp> 13 #include <boost/gil/concepts/fwd.hpp> 15 #include <boost/concept_check.hpp> 18 #include <type_traits> 20 #if defined(BOOST_CLANG) 21 #pragma clang diagnostic push 22 #pragma clang diagnostic ignored "-Wunknown-pragmas" 23 #pragma clang diagnostic ignored "-Wunused-local-typedefs" 26 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 27 #pragma GCC diagnostic push 28 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 31 namespace boost {
namespace gil {
35 struct channel_traits;
37 template <
typename DstT,
typename SrcT>
39 ->
typename channel_traits<DstT>::value_type;
78 gil_function_requires<boost::EqualityComparableConcept<T>>();
80 using v =
typename channel_traits<T>::value_type;
81 using r =
typename channel_traits<T>::reference;
82 using p =
typename channel_traits<T>::pointer;
83 using cr =
typename channel_traits<T>::const_reference;
84 using cp =
typename channel_traits<T>::const_pointer;
86 channel_traits<T>::min_value();
87 channel_traits<T>::max_value();
117 template <
typename T>
122 gil_function_requires<ChannelConcept<T>>();
123 gil_function_requires<detail::ChannelIsMutableConcept<T>>();
132 template <
typename T>
137 gil_function_requires<ChannelConcept<T>>();
138 gil_function_requires<Regular<T>>();
153 template <
typename T1,
typename T2>
157 typename channel_traits<T1>::value_type,
158 typename channel_traits<T2>::value_type
172 template <
typename Channel1,
typename Channel2>
192 template <
typename SrcChannel,
typename DstChannel>
197 gil_function_requires<ChannelConcept<SrcChannel>>();
198 gil_function_requires<MutableChannelConcept<DstChannel>>();
199 dst = channel_convert<DstChannel, SrcChannel>(src);
200 ignore_unused_variable_warning(dst);
208 #if defined(BOOST_CLANG) 209 #pragma clang diagnostic pop 212 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 213 #pragma GCC diagnostic pop Definition: concepts/channel.hpp:98
channel_traits< DstChannel >::value_type channel_convert(const SrcChannel &src)
Converting from one channel type to another.
Definition: channel_algorithm.hpp:451
A channel is convertible to another one if the channel_convert algorithm is defined for the two chann...
Definition: concepts/channel.hpp:193
A channel is the building block of a color. Color is defined as a mixture of primary colors and a cha...
Definition: concepts/channel.hpp:74
A channel that supports default construction.
Definition: concepts/channel.hpp:133
Predicate metafunction returning whether two channels are compatible.
Definition: concepts/channel.hpp:154
void swap(boost::gil::packed_channel_reference< BF, FB, NB, M > const x, R &y)
swap for packed_channel_reference
Definition: channel.hpp:529
Channels are compatible if their associated value types (ignoring constness and references) are the s...
Definition: concepts/channel.hpp:173
A channel that allows for modifying its value.
Definition: concepts/channel.hpp:118