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>
143 template <
typename T>
150 template <
typename Views>
158 template <
typename T>
165 template <
typename Views>
173 template <
typename T>
Returns the type of a transposed view that has a dynamic step along both X and Y. ...
Definition: image_view_factory.hpp:51
Definition: algorithm.hpp:30
Returns the type of a view that has a dynamic step along both X and Y.
Definition: dynamic_step.hpp:27
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