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/extension/dynamic_image/variant.hpp>
13 #include <boost/gil/image.hpp>
14 #include <boost/gil/image_view.hpp>
15 #include <boost/gil/point.hpp>
17 namespace boost {
namespace gil {
20 template <
typename View>
struct get_const_t {
typedef typename View::const_t type; };
21 template <
typename Views>
struct views_get_const_t :
public mpl::transform<Views, get_const_t<mpl::_1> > {};
23 template <
typename View>
struct dynamic_xy_step_type;
24 template <
typename View>
struct dynamic_xy_step_transposed_type;
29 struct any_type_get_num_channels
31 typedef int result_type;
33 result_type operator()(
const T&)
const {
return num_channels<T>::value; }
37 struct any_type_get_dimensions
39 using result_type = point<std::ptrdiff_t>;
41 result_type operator()(
const T& v)
const {
return v.dimensions(); }
59 template <
typename ImageViewTypes>
64 typedef std::ptrdiff_t x_coord_t;
65 typedef std::ptrdiff_t y_coord_t;
73 template <
typename T>
any_image_view& operator=(
const T& obj) { parent_t::operator=(obj);
return *
this; }
79 x_coord_t width()
const {
return dimensions().x; }
80 y_coord_t height()
const {
return dimensions().y; }
87 template <
typename IVTypes>
96 template <
typename IVTypes>
97 struct dynamic_y_step_type<any_image_view<IVTypes> > {
98 typedef any_image_view<typename mpl::transform<IVTypes, dynamic_y_step_type<mpl::_1> >::type> type;
101 template <
typename IVTypes>
102 struct dynamic_xy_step_type<any_image_view<IVTypes> > {
103 typedef any_image_view<typename mpl::transform<IVTypes, dynamic_xy_step_type<mpl::_1> >::type> type;
106 template <
typename IVTypes>
107 struct dynamic_xy_step_transposed_type<any_image_view<IVTypes> > {
108 typedef any_image_view<typename mpl::transform<IVTypes, dynamic_xy_step_transposed_type<mpl::_1> >::type> type;
BOOST_FORCEINLINE UnaryOp::result_type 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:31
Represents a concrete instance of a run-time specified type from a set of typesA concept is typically...
Definition: variant.hpp:80
Represents a run-time specified image view. Models HasDynamicXStepTypeConcept, HasDynamicYStepTypeCon...
Definition: any_image_view.hpp:60
Returns the number of channels of a pixel-based GIL construct.
Definition: concepts.hpp:56