eLynx SDK
v3.3.0 C++ image processing API reference |
ImageImpl is the template class that defines an iterator over the Pixels in the ImageImpl class. More...
#include <PixelIterator.h>
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. |
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.
eLynx::Image::PixelIterator< Pixel >::PixelIterator | ( | const PixelIterator< PixelU > & | iOther ) |
Copy Constructor.
PixelU * must be convertable to Pixel *.
iOther | the pixel iterator to copy. |
eLynx::Image::PixelIterator< Pixel >::PixelIterator | ( | Pixel * | iprPixel, |
uint32 | iWidth | ||
) | [explicit] |
Constructor.
Iterator is valid.
iprPixel | reference pointer to the pixel map. |
iWidth | image width. |
void eLynx::Image::PixelIterator< Pixel >::advance | ( | int32 | iDist ) |
Moves iterator forward by iDist pixels.
iDist | number of pixels to advance. |
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.
iWidth | horizontal shift. |
iHeight | vertical shift. |
uint32 eLynx::Image::PixelIterator< Pixel >::distance_to | ( | const PixelIterator< Pixel > & | iOther ) | const |
Returns the distance from current position to a specified one.
iOther | the pixel we want to measure distance to. |
bool eLynx::Image::PixelIterator< Pixel >::equal | ( | const PixelIterator< Pixel > & | iOther ) | const |
Compares two iterators.
iOther | other PixelIterator. |
const Pixel* eLynx::Image::PixelIterator< Pixel >::getData | ( | ) | const |
Returns the raw pointer to the current pixel.
const Pixel* eLynx::Image::PixelIterator< Pixel >::getFirst | ( | ) | const |
Returns the raw pointer to the first pixel.
uint32 eLynx::Image::PixelIterator< Pixel >::getHorizontal | ( | ) | const |
Returns current horizontal coordinate.
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.
Implements eLynx::Image::IPixelIterator.
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.
Implements eLynx::Image::IPixelIterator.
uint32 eLynx::Image::PixelIterator< Pixel >::getVertical | ( | ) | const |
Returns current vertical coordinate.
uint32 eLynx::Image::PixelIterator< Pixel >::getWidth | ( | ) | const |
Returns image's width.
void eLynx::Image::PixelIterator< Pixel >::moveto | ( | int32 | iWidth, |
int32 | iHeight | ||
) |
Move iterator to the specified position (iWidth, iHeight) in the image.
iWidth | horizontal position. |
iHeight | vertical position. |
Pixel& eLynx::Image::PixelIterator< Pixel >::operator[] | ( | int32 | iIndex ) |
Subscript operator.
iIndex | the pixel's index we want to access. |