OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT > Class Template Reference

#include <imagebuf.h>

List of all members.

Public Member Functions

 ConstIterator (const ImageBuf &ib)
 ConstIterator (const ImageBuf &ib, int x, int y)
 ConstIterator (const ImageBuf &ib, int xbegin, int xend, int ybegin, int yend)
 ConstIterator (const ConstIterator &i)
void pos (int x, int y)
void operator++ ()
void operator++ (int)
const ConstIteratoroperator= (const ConstIterator &i)
int x () const
int y () const
bool valid () const
bool valid (int x, int y) const
ConstDataArrayProxy< BUFT,
USERT > & 
operator* () const
USERT operator[] (int i) const
const void * rawptr () const

Detailed Description

template<typename BUFT, typename USERT = float>
class OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >

Just like an ImageBuf::Iterator, except that it refers to a const ImageBuf. If BUFT == void,


Constructor & Destructor Documentation

template<typename BUFT , typename USERT = float>
OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib  )  [inline]

Construct from just an ImageBuf -- iterate over the whole region, starting with the upper left pixel of the region.

template<typename BUFT , typename USERT = float>
OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib,
int  x,
int  y 
) [inline]

Construct from an ImageBuf and a specific pixel index..

template<typename BUFT , typename USERT = float>
OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib,
int  xbegin,
int  xend,
int  ybegin,
int  yend 
) [inline]

Construct from an ImageBuf and designated region -- iterate over region, starting with the upper left pixel.


Member Function Documentation

template<typename BUFT , typename USERT = float>
ConstDataArrayProxy<BUFT,USERT>& OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::operator* (  )  const [inline]

Dereferencing the iterator gives us a proxy for the pixel, which we can index for reading or assignment.

template<typename BUFT , typename USERT = float>
void OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::operator++ ( int   )  [inline]

Increment to the next pixel in the region.

template<typename BUFT , typename USERT = float>
void OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::operator++ (  )  [inline]

Increment to the next pixel in the region.

template<typename BUFT , typename USERT = float>
const ConstIterator& OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::operator= ( const ConstIterator< BUFT, USERT > &  i  )  [inline]

Assign one ConstIterator to another

template<typename BUFT , typename USERT = float>
USERT OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::operator[] ( int  i  )  const [inline]

Array indexing retrieves the value of the i-th channel of the current pixel.

template<typename BUFT , typename USERT = float>
void OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::pos ( int  x,
int  y 
) [inline]

Explicitly point the iterator. This results in an invalid iterator if outside the previously-designated region.

template<typename BUFT , typename USERT = float>
bool OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::valid ( int  x,
int  y 
) const [inline]

Is the location (x,y) valid? Locations outside the designated region are invalid, as is an iterator that has completed iterating over the whole region.

template<typename BUFT , typename USERT = float>
bool OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::valid (  )  const [inline]

Is the current location valid? Locations outside the designated region are invalid, as is an iterator that has completed iterating over the whole region.

template<typename BUFT , typename USERT = float>
int OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::x (  )  const [inline]

Retrieve the current x location of the iterator.

template<typename BUFT , typename USERT = float>
int OpenImageIO::ImageBuf::ConstIterator< BUFT, USERT >::y (  )  const [inline]

Retrieve the current y location of the iterator.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Oct 27 06:30:41 2009 for OpenImageIO by  doxygen 1.6.1