8 #ifndef BOOST_GIL_EXTENSION_DYNAMIC_IMAGE_ANY_IMAGE_VIEW_HPP     9 #define BOOST_GIL_EXTENSION_DYNAMIC_IMAGE_ANY_IMAGE_VIEW_HPP    11 #include <boost/gil/dynamic_step.hpp>    12 #include <boost/gil/image.hpp>    13 #include <boost/gil/image_view.hpp>    14 #include <boost/gil/point.hpp>    15 #include <boost/gil/detail/mp11.hpp>    17 #include <boost/variant.hpp>    19 namespace boost { 
namespace gil {
    21 template <
typename View>
    22 struct dynamic_xy_step_transposed_type;
    26 template <
typename View>
    27 struct get_const_t { 
using type = 
typename View::const_t; };
    29 template <
typename Views>
    30 struct views_get_const_t : mp11::mp_transform<get_const_t, Views> {};
    33 struct any_type_get_num_channels
    35     using result_type = int;
    37     result_type operator()(
const T&)
 const { 
return num_channels<T>::value; }
    41 struct any_type_get_dimensions
    43     using result_type = point<std::ptrdiff_t>;
    45     result_type operator()(
const T& v)
 const { 
return v.dimensions(); }
    65 template <
typename Views>
    68     using parent_t = 
typename make_variant_over<Views>::type;
    71     using x_coord_t = std::ptrdiff_t;
    72     using y_coord_t = std::ptrdiff_t;
    78     template <
typename View>
    81     template <
typename OtherViews>
    83         : parent_t((
typename make_variant_over<OtherViews>::type 
const&)
view)
    88         parent_t::operator=((parent_t 
const&)
view);
    92     template <
typename View>
    95         parent_t::operator=(
view);
    99     template <
typename OtherViews>
   102         parent_t::operator=((
typename make_variant_over<OtherViews>::type 
const&)
view);
   108     x_coord_t   width()
         const { 
return dimensions().x; }
   109     y_coord_t   height()
        const { 
return dimensions().y; }
   116 template <
typename Views>
   124     template <
typename T>
   135 template <
typename Views>
   136 struct dynamic_y_step_type<any_image_view<Views>>
   143     template <
typename T>
   147     using type = any_image_view<mp11::mp_transform<dynamic_step_view, Views>>;
   150 template <
typename Views>
   151 struct dynamic_xy_step_type<any_image_view<Views>>
   158     template <
typename T>
   159     using dynamic_step_view = 
typename gil::dynamic_xy_step_type<T>::type;
   162     using type = any_image_view<mp11::mp_transform<dynamic_step_view, Views>>;
   165 template <
typename Views>
   166 struct dynamic_xy_step_transposed_type<any_image_view<Views>>
   173     template <
typename T>
   174     using dynamic_step_view = 
typename gil::dynamic_xy_step_type<T>::type;
   177     using type = any_image_view<mp11::mp_transform<dynamic_step_view, Views>>;
 BOOST_FORCEINLINE auto apply_operation(variant< Types > &arg, UnaryOp op)
Invokes a generic mutable operation (represented as a unary function object) on a variant.
Definition: apply_operation.hpp:33
Base template for types that model HasDynamicYStepTypeConcept.
Definition: dynamic_step.hpp:21
Represents a run-time specified image view. Models HasDynamicXStepTypeConcept, HasDynamicYStepTypeCon...
Definition: any_image_view.hpp:66
const image< Pixel, IsPlanar, Alloc >::view_t & view(image< Pixel, IsPlanar, Alloc > &img)
Returns the non-constant-pixel view of an image.
Definition: image.hpp:443
Returns the number of channels of a pixel-based GIL construct.
Definition: locator.hpp:38
Base template for types that model HasDynamicXStepTypeConcept.
Definition: dynamic_step.hpp:17