Adobe Systems, Inc.

pixel_step_iterator< IT > Class Template Reference
[Pixel Iterators]

Pixel iterator with dynamically specified step in bytes. More...

#include <pixel_iterator.hpp>

Inherits adobe::step_iterator_adaptor< pixel_step_iterator< IT >, IT, byte_step_fn< IT > >.

List of all members.


Public Types

typedef pixel_iterator_traits<
IT >::channel_t 
channel_t
typedef pixel_iterator_traits<
IT >::color_space_t 
color_space_t
typedef parent_t::difference_type difference_type
typedef std::random_access_iterator_tag iterator_category
typedef adobe::step_iterator_adaptor<
pixel_step_iterator< IT >,
IT, byte_step_fn< IT > > 
parent_t
typedef parent_t::reference reference
typedef IT x_iterator

Public Member Functions

x_iterator const & base () const
x_iteratorbase ()
reference operator[] (difference_type d) const
template<typename I2>
 pixel_step_iterator (const pixel_step_iterator< I2 > &it)
 pixel_step_iterator (IT it, std::ptrdiff_t byte_step)
 pixel_step_iterator ()
void set_step (std::ptrdiff_t byte_step)

Detailed Description

template<typename IT>
class pixel_step_iterator< IT >

Models PixelStepIteratorConcept

A refinement of step_iterator_adaptor that uses a dynamic parameter for the step which is specified in bytes

Pixel step iterators are used to provide iteration over non-adjacent pixels. Common use is a vertical traversal, where the step is the row stride.

Another application is as a sub-channel view. For example, a red intensity image over interleaved RGB data would use a step iterator adaptor with step sizeof(channel_t)*3 In the latter example the step size could be fixed at compile time for efficiency. Compile-time fixed step can be implemented by providing A_FN that takes the step as a template

Definition at line 179 of file pixel_iterator.hpp.


Member Function Documentation

template<typename IT>
reference pixel_step_iterator< IT >::operator[] difference_type  d  )  const
 

For some reason operator[] provided by boost::iterator_adaptor returns a custom class that is convertible to reference We require our own reference because it is registered in iterator_traits

Definition at line 198 of file pixel_iterator.hpp.

Copyright © 2006 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google