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 "-Wunused-local-typedefs" 25 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 26 #pragma GCC diagnostic push 27 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 30 namespace boost {
namespace gil {
34 struct channel_traits;
36 template <
typename DstT,
typename SrcT>
38 ->
typename channel_traits<DstT>::value_type;
77 gil_function_requires<boost::EqualityComparableConcept<T>>();
79 using v =
typename channel_traits<T>::value_type;
80 using r =
typename channel_traits<T>::reference;
81 using p =
typename channel_traits<T>::pointer;
82 using cr =
typename channel_traits<T>::const_reference;
83 using cp =
typename channel_traits<T>::const_pointer;
85 channel_traits<T>::min_value();
86 channel_traits<T>::max_value();
116 template <
typename T>
121 gil_function_requires<ChannelConcept<T>>();
122 gil_function_requires<detail::ChannelIsMutableConcept<T>>();
131 template <
typename T>
136 gil_function_requires<ChannelConcept<T>>();
137 gil_function_requires<Regular<T>>();
152 template <
typename T1,
typename T2>
156 typename channel_traits<T1>::value_type,
157 typename channel_traits<T2>::value_type
171 template <
typename Channel1,
typename Channel2>
191 template <
typename SrcChannel,
typename DstChannel>
196 gil_function_requires<ChannelConcept<SrcChannel>>();
197 gil_function_requires<MutableChannelConcept<DstChannel>>();
198 dst = channel_convert<DstChannel, SrcChannel>(src);
199 ignore_unused_variable_warning(dst);
207 #if defined(BOOST_CLANG) 208 #pragma clang diagnostic pop 211 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 212 #pragma GCC diagnostic pop Definition: concepts/channel.hpp:97
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:192
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:73
A channel that supports default construction.
Definition: concepts/channel.hpp:132
Predicate metafunction returning whether two channels are compatible.
Definition: concepts/channel.hpp:153
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:172
A channel that allows for modifying its value.
Definition: concepts/channel.hpp:117