eLynx SDK v3.3.0
C++ image processing API reference
Public Member Functions | Friends

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

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

#include <PixelIterator.h>

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

List of all members.

Public Member Functions

Pixel & operator[] (int32 iIndex)
 Subscript operator.
uint32 getWidth () const
 Returns image's width.
uint32 getHorizontal () const
 Returns current horizontal coordinate.
uint32 getVertical () const
 Returns current vertical coordinate.
const Pixel * getData () const
 Returns the raw pointer to the current pixel.
const Pixel * getFirst () const
 Returns the raw pointer to the first pixel.
const void * getMap () const
 Returns the raw pointer to the current pixel.
void * getMap ()
 Returns the raw pointer to the current pixel.
Constructors, destructor and assignment
 PixelIterator ()
 Default constructor.
template<class PixelU >
 PixelIterator (const PixelIterator< PixelU > &iOther)
 Copy Constructor.
 PixelIterator (Pixel *iprPixel, uint32 iWidth)
 Constructor.
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
 Compares two iterators.
Pixel & dereference () const
 Returns reference to the current pixel.
void advance (int32 iDist)
 Moves iterator forward by iDist pixels.
void 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.
void moveto (int32 iWidth, int32 iHeight)
 Move iterator to the specified position (iWidth, iHeight) in the image.
uint32 distance_to (const PixelIterator &iOther) const
 Returns the distance from current position to a specified one.

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.


Constructor & Destructor Documentation

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

Copy Constructor.

PixelU * must be convertable to Pixel *.

Parameters:
iOtherthe pixel iterator to copy.
template<class Pixel>
eLynx::Image::PixelIterator< Pixel >::PixelIterator ( Pixel *  iprPixel,
uint32  iWidth 
) [explicit]

Constructor.

Iterator is valid.

Parameters:
iprPixelreference pointer to the pixel map.
iWidthimage width.

Member Function Documentation

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

Moves iterator forward by iDist pixels.

Parameters:
iDistnumber 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:
iWidthhorizontal shift.
iHeightvertical shift.
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:
iOtherthe pixel we want to measure distance to.
template<class Pixel>
bool eLynx::Image::PixelIterator< Pixel >::equal ( const PixelIterator< Pixel > &  iOther ) const

Compares two iterators.

Parameters:
iOtherother PixelIterator.
Returns:
true if both iterators point to the same pixel.
template<class Pixel>
const Pixel* 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* 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>
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>
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.

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>
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>
uint32 eLynx::Image::PixelIterator< Pixel >::getWidth (  ) const

Returns image's width.

Returns:
the width of the image this iterator points to.
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:
iWidthhorizontal position.
iHeightvertical position.
template<class Pixel>
Pixel& eLynx::Image::PixelIterator< Pixel >::operator[] ( int32  iIndex )

Subscript operator.

Parameters:
iIndexthe pixel's index we want to access.

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

Generated on Thu Dec 9 2010 by doxygen 1.7.2