OpenImageIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ImageBuf::ConstIterator< BUFT, USERT > Class Template Reference

#include <imagebuf.h>

Inheritance diagram for ImageBuf::ConstIterator< BUFT, USERT >:
ImageBuf::IteratorBase

Public Member Functions

 ConstIterator (const ImageBuf &ib, WrapMode wrap=WrapDefault)
 
 ConstIterator (const ImageBuf &ib, int x_, int y_, int z_=0, WrapMode wrap=WrapDefault)
 
 ConstIterator (const ImageBuf &ib, const ROI &roi, WrapMode wrap=WrapDefault)
 Construct read-only iteration region from ImageBuf and ROI.
 
 ConstIterator (const ImageBuf &ib, int xbegin, int xend, int ybegin, int yend, int zbegin=0, int zend=1, WrapMode wrap=WrapDefault)
 
 ConstIterator (const ConstIterator &i)
 
const ConstIteratoroperator= (const ConstIterator &i)
 
ConstDataArrayProxy< BUFT,
USERT > & 
operator* () const
 
USERT operator[] (int i) const
 
const void * rawptr () const
 
USERT deep_value (int c, int s) const
 Retrieve the deep data value of sample s of channel c.
 
- Public Member Functions inherited from ImageBuf::IteratorBase
 IteratorBase (const ImageBuf &ib, WrapMode wrap)
 
 IteratorBase (const ImageBuf &ib, const ROI &roi, WrapMode wrap)
 Construct valid iteration region from ImageBuf and ROI.
 
 IteratorBase (const ImageBuf &ib, int xbegin, int xend, int ybegin, int yend, int zbegin, int zend, WrapMode wrap)
 
 IteratorBase (const IteratorBase &i)
 
const IteratorBaseassign_base (const IteratorBase &i)
 
int x () const
 
int y () const
 
int z () const
 
bool valid () const
 Is the current location within the designated iteration range?
 
bool valid (int x_, int y_, int z_=0) const
 
bool exists (int x_, int y_, int z_=0) const
 
bool exists () const
 
bool done () const
 Are we finished iterating over the region?
 
int deep_samples ()
 Retrieve the number of deep data samples at this pixel.
 
WrapMode wrap () const
 Return the wrap mode.
 
void pos (int x_, int y_, int z_=0)
 
void operator++ ()
 
void operator++ (int)
 
ROI range () const
 Return the iteration range.
 

Additional Inherited Members

- Protected Member Functions inherited from ImageBuf::IteratorBase
void init_ib (WrapMode wrap)
 
void range_is_image ()
 
void pos_xincr ()
 
- Protected Attributes inherited from ImageBuf::IteratorBase
const ImageBufm_ib
 
bool m_valid
 
bool m_exists
 
bool m_deep
 
bool m_localpixels
 
int m_img_xbegin
 
int m_img_xend
 
int m_img_ybegin
 
int m_img_yend
 
int m_img_zbegin
 
int m_img_zend
 
int m_rng_xbegin
 
int m_rng_xend
 
int m_rng_ybegin
 
int m_rng_yend
 
int m_rng_zbegin
 
int m_rng_zend
 
int m_x
 
int m_y
 
int m_z
 
ImageCache::Tile * m_tile
 
int m_tilexbegin
 
int m_tileybegin
 
int m_tilezbegin
 
int m_tilexend
 
int m_nchannels
 
size_t m_pixel_bytes
 
char * m_proxydata
 
WrapMode m_wrap
 

Detailed Description

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

Just like an ImageBuf::Iterator, except that it refers to a const ImageBuf.

Constructor & Destructor Documentation

template<typename BUFT , typename USERT = float>
ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib,
WrapMode  wrap = WrapDefault 
)
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>
ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib,
int  x_,
int  y_,
int  z_ = 0,
WrapMode  wrap = WrapDefault 
)
inline

Construct from an ImageBuf and a specific pixel index. The iteration range is the full image.

template<typename BUFT , typename USERT = float>
ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib,
const ROI roi,
WrapMode  wrap = WrapDefault 
)
inline

Construct read-only iteration region from ImageBuf and ROI.

template<typename BUFT , typename USERT = float>
ImageBuf::ConstIterator< BUFT, USERT >::ConstIterator ( const ImageBuf ib,
int  xbegin,
int  xend,
int  ybegin,
int  yend,
int  zbegin = 0,
int  zend = 1,
WrapMode  wrap = WrapDefault 
)
inline

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

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

Copy constructor.

Member Function Documentation

template<typename BUFT , typename USERT = float>
USERT ImageBuf::ConstIterator< BUFT, USERT >::deep_value ( int  c,
int  s 
) const
inline

Retrieve the deep data value of sample s of channel c.

template<typename BUFT , typename USERT = float>
ConstDataArrayProxy<BUFT,USERT>& 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>
const ConstIterator& ImageBuf::ConstIterator< BUFT, USERT >::operator= ( const ConstIterator< BUFT, USERT > &  i)
inline

Assign one ConstIterator to another

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

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


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