Boost GIL


deprecated.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3 
4  Use, modification and distribution are subject to the Boost Software License,
5  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6  http://www.boost.org/LICENSE_1_0.txt).
7 
8  See http://opensource.adobe.com/gil for most recent version including documentation.
9 */
10 
11 /*************************************************************************************************/
12 
13 #ifndef GIL_DEPRECATED_HPP
14 #define GIL_DEPRECATED_HPP
15 
27 
28 #include <cstddef>
29 
30 #define planar_ptr planar_pixel_iterator
31 #define planar_ref planar_pixel_reference
32 #define membased_2d_locator memory_based_2d_locator
33 #define pixel_step_iterator memory_based_step_iterator
34 #define pixel_image_iterator iterator_from_2d
35 
36 #define equal_channels static_equal
37 #define copy_channels static_copy
38 #define fill_channels static_fill
39 #define generate_channels static_generate
40 #define for_each_channel static_for_each
41 #define transform_channels static_transform
42 #define max_channel static_max
43 #define min_channel static_min
44 
45 #define semantic_channel semantic_at_c
46 
47 template <typename Img>
48 void resize_clobber_image(Img& img, const typename Img::point_t& new_dims) {
49  img.recreate(new_dims);
50 }
51 
52 template <typename Img>
53 void resize_clobber_image(Img& img, const typename Img::x_coord_t& width, const typename Img::y_coord_t& height) {
54  img.recreate(width,height);
55 }
56 
57 template <typename T> typename T::x_coord_t get_width(const T& a) { return a.width(); }
58 template <typename T> typename T::y_coord_t get_height(const T& a) { return a.height(); }
59 template <typename T> typename T::point_t get_dimensions(const T& a) { return a.dimensions(); }
60 template <typename T> std::size_t get_num_channels(const T& a) { return a.num_channels(); }
61 
62 #define GIL boost::gil
63 #define ADOBE_GIL_NAMESPACE_BEGIN namespace boost { namespace gil {
64 #define ADOBE_GIL_NAMESPACE_END } }
65 
66 #define ByteAdvancableIteratorConcept MemoryBasedIteratorConcept
67 #define byte_advance memunit_advance
68 #define byte_advanced memunit_advanced
69 #define byte_step memunit_step
70 #define byte_distance memunit_distance
71 
72 #define byte_addressable_step_iterator memory_based_step_iterator
73 #define byte_addressable_2d_locator memory_based_2d_locator
74 
75 // These are members of memory-based locators
76 //#define row_bytes row_size // commented out because row_bytes is commonly used
77 #define pix_bytestep pixel_size
78 
79 #endif