Boost GIL


kth_channel_deref_fn< K, SrcP > Struct Template Reference

Function object that returns a grayscale reference of the K-th channel (specified as a template parameter) of a given reference. Models: PixelDereferenceAdaptorConcept. More...

#include <image_view_factory.hpp>

Public Types

using const_t = kth_channel_deref_fn<K,const_ref_t>
using value_type = typename pixel_value_type<channel_t,gray_layout_t>::type
using const_reference = typename pixel_reference_type<channel_t,gray_layout_t,false,false>::type
using argument_type = SrcP
using reference = mp11::mp_if_c<is_mutable, ref_t, value_type>
using result_type = reference

Public Member Functions

template<typename P>
 kth_channel_deref_fn (const kth_channel_deref_fn< K, P > &)
result_type operator() (argument_type srcP) const

Static Public Attributes

static constexpr bool is_mutable

Detailed Description

template<int K, typename SrcP>
struct boost::gil::detail::kth_channel_deref_fn< K, SrcP >

Function object that returns a grayscale reference of the K-th channel (specified as a template parameter) of a given reference. Models: PixelDereferenceAdaptorConcept.

If the input is a pixel value or constant reference, the function object is immutable. Otherwise it is mutable (and returns non-const reference to the k-th channel)

Template Parameters
SrcPreference to PixelConcept (could be pixel value or const/non-const reference) Examples: pixel<T,L>, pixel<T,L>&, const pixel<T,L>&, planar_pixel_reference<T&,L>, planar_pixel_reference<const T&,L>

Member Data Documentation

◆ is_mutable

template<int K, typename SrcP>
bool is_mutable
staticconstexpr
Initial value:
=
Given a model of a pixel, determines whether the model represents a pixel reference (as opposed to pi...
Definition metafunctions.hpp:218
Determines if the given pixel reference is mutable (i.e. its channels can be changed)
Definition metafunctions.hpp:231

The documentation for this struct was generated from the following file: