Boost GIL


Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nth_channel_deref_fn< SrcP > Struct Template Reference

Function object that returns a grayscale reference of the N-th channel of a given reference. Models: PixelDereferenceAdaptorConcept. More...

#include <image_view_factory.hpp>

Public Types

using const_t = nth_channel_deref_fn< 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

 nth_channel_deref_fn (int n=0)
 
template<typename P >
 nth_channel_deref_fn (const nth_channel_deref_fn< P > &d)
 
auto operator() (argument_type srcP) const -> result_type
 

Public Attributes

int _n
 

Static Public Attributes

static constexpr bool is_mutable
 

Detailed Description

template<typename SrcP>
struct boost::gil::detail::nth_channel_deref_fn< SrcP >

Function object that returns a grayscale reference of the N-th channel 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 n-th channel)

Member Data Documentation

◆ is_mutable

constexpr bool is_mutable
staticconstexpr
Initial value:
=
pixel_is_reference<SrcP>::value && pixel_reference_is_mutable<SrcP>::value

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