eLynx SDK v3.0.1
C++ image processing API reference

eLynx::Image::PixelIterator< Pixel > Class Template Reference

#include <PixelIterator.h>

Inheritance diagram for eLynx::Image::PixelIterator< Pixel >:

eLynx::Image::IPixelIterator

List of all members.


Public Types

typedef Pixel Pixel_t

Public Member Functions

Pixel & operator[] (int32 iIndex)
uint32 getWidth () const
uint32 getHorizontal () const
uint32 getVertical () const
const Pixel_tgetData () const
const Pixel_tgetFirst () const
const void * getMap () const
void * getMap ()
Constructors, destructor and assignment
 PixelIterator ()
 Default constructor.
template<class PixelU >
 PixelIterator (const PixelIterator< PixelU > &iOther)
 PixelIterator (Pixel_t *iprPixel, uint32 iWidth)
Core Random access iterator operations
void increment ()
 Moves iterator to the next pixel.
void decrement ()
 Moves iterator to the previous pixel.
bool equal (const PixelIterator &iOther) const
Pixel_tdereference () const
 Returns reference to the current pixel.
void advance (int32 iDist)
void advance (int32 iWidth, int32 iHeight)
void moveto (int32 iWidth, int32 iHeight)
uint32 distance_to (const PixelIterator &iOther) const

Friends

class boost::iterator_core_access
 "back-door" that iterator_facade uses to get access to the core operations.

Detailed Description

template<class Pixel>
class eLynx::Image::PixelIterator< Pixel >

ImageImpl is the template class that defines an iterator over the Pixels in the ImageImpl class.

The methods naming convention breaks eLynx one (method name starts in lower case but we can't change method's names because it is how boost::iterator_facade expects them to be.

Definition at line 41 of file PixelIterator.h.


Member Typedef Documentation

template<class Pixel>
typedef Pixel eLynx::Image::PixelIterator< Pixel >::Pixel_t

Definition at line 46 of file PixelIterator.h.


Constructor & Destructor Documentation

template<class Pixel>
eLynx::Image::PixelIterator< Pixel >::PixelIterator (  )  [explicit]

Default constructor.

template<class Pixel>
template<class PixelU >
eLynx::Image::PixelIterator< Pixel >::PixelIterator ( const PixelIterator< PixelU > &  iOther  )  [inline]

Copy Constructor. PixelU * must be convertable to Pixel *.

Parameters:
iOther the pixel iterator to copy.

template<class Pixel>
eLynx::Image::PixelIterator< Pixel >::PixelIterator ( Pixel_t iprPixel,
uint32  iWidth 
) [explicit]

Constructor. Iterator is valid.

Parameters:
iprPixel reference pointer to the pixel map.
iWidth image width.


Member Function Documentation

template<class Pixel>
void eLynx::Image::PixelIterator< Pixel >::increment (  ) 

Moves iterator to the next pixel.

template<class Pixel>
void eLynx::Image::PixelIterator< Pixel >::decrement (  ) 

Moves iterator to the previous pixel.

template<class Pixel>
bool eLynx::Image::PixelIterator< Pixel >::equal ( const PixelIterator< Pixel > &  iOther  )  const

Compares two iterators.

Parameters:
iOther other PixelIterator.
Returns:
true if both iterators point to the same pixel.

template<class Pixel>
Pixel_t& eLynx::Image::PixelIterator< Pixel >::dereference (  )  const

Returns reference to the current pixel.

template<class Pixel>
void eLynx::Image::PixelIterator< Pixel >::advance ( int32  iDist  ) 

Moves iterator forward by iDist pixels.

Parameters:
iDist number of pixels to advance.

template<class Pixel>
void eLynx::Image::PixelIterator< Pixel >::advance ( int32  iWidth,
int32  iHeight 
)

Advance iterator from current position to the new one by moving it iWidth pixels in horizontal direction and iHeight in vertical in the image.

Parameters:
iWidth horizontal shift.
iHeight vertical shift.

template<class Pixel>
void eLynx::Image::PixelIterator< Pixel >::moveto ( int32  iWidth,
int32  iHeight 
)

Move iterator to the specified position (iWidth, iHeight) in the image.

Parameters:
iWidth horizontal position.
iHeight vertical position.

template<class Pixel>
uint32 eLynx::Image::PixelIterator< Pixel >::distance_to ( const PixelIterator< Pixel > &  iOther  )  const

Returns the distance from current position to a specified one.

Parameters:
iOther the pixel we want to measure distance to.

template<class Pixel>
Pixel& eLynx::Image::PixelIterator< Pixel >::operator[] ( int32  iIndex  ) 

Subscript operator

Parameters:
iIndex the pixel's index we want to access.

template<class Pixel>
uint32 eLynx::Image::PixelIterator< Pixel >::getWidth (  )  const

Returns image's width.

Returns:
the width of the image this iterator points to.

template<class Pixel>
uint32 eLynx::Image::PixelIterator< Pixel >::getHorizontal (  )  const

Returns current horizontal coordinate.

Returns:
current horizontal coordinate of the pixel this iterator points to.

template<class Pixel>
uint32 eLynx::Image::PixelIterator< Pixel >::getVertical (  )  const

Returns current vertical coordinate.

Returns:
current vertical coordinate of the pixel this iterator points to.

template<class Pixel>
const Pixel_t* eLynx::Image::PixelIterator< Pixel >::getData (  )  const

Returns the raw pointer to the current pixel.

Returns:
the raw pointer to the current pixel.

template<class Pixel>
const Pixel_t* eLynx::Image::PixelIterator< Pixel >::getFirst (  )  const

Returns the raw pointer to the first pixel.

Returns:
the raw pointer to the first pixel.

template<class Pixel>
const void* eLynx::Image::PixelIterator< Pixel >::getMap (  )  const [virtual]

Returns the raw pointer to the current pixel.
Don't use this method. It's for internal usage.

Returns:
the raw pointer to the current pixel.

Implements eLynx::Image::IPixelIterator.

template<class Pixel>
void* eLynx::Image::PixelIterator< Pixel >::getMap (  )  [virtual]

Returns the raw pointer to the current pixel.
Don't use this method. It's for internal usage.

Returns:
the raw pointer to the current pixel.

Implements eLynx::Image::IPixelIterator.


Friends And Related Function Documentation

template<class Pixel>
friend class boost::iterator_core_access [friend]

"back-door" that iterator_facade uses to get access to the core operations.

Definition at line 49 of file PixelIterator.h.


The documentation for this class was generated from the following file:

Generated on 14 Apr 2009 by doxygen 1.5.8