HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageBuf::IteratorBase Class Reference

#include <imagebuf.h>

+ Inheritance diagram for ImageBuf::IteratorBase:

Public Member Functions

int x () const
 Retrieve the current x location of the iterator. More...
 
int y () const
 Retrieve the current y location of the iterator. More...
 
int z () const
 Retrieve the current z location of the iterator. More...
 
bool valid () const
 Is the current location within the designated iteration range? More...
 
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? More...
 
int deep_samples () const
 Retrieve the number of deep data samples at this pixel. More...
 
WrapMode wrap () const
 Return the wrap mode. More...
 
void OIIO_API pos (int x_, int y_, int z_=0)
 
void operator++ ()
 
void operator++ (int)
 Increment to the next pixel in the region. More...
 
ROI range () const
 Return the iteration range. More...
 
void OIIO_API rerange (int xbegin, int xend, int ybegin, int yend, int zbegin, int zend, WrapMode wrap=WrapDefault)
 
const voidrawptr () const
 
float deep_value (int c, int s) const
 Retrieve the deep data value of sample s of channel c. More...
 
uint32_t deep_value_uint (int c, int s) const
 
bool localpixels () const
 
bool has_error () const
 
void clear_error ()
 

Protected Member Functions

OIIO_API IteratorBase (const ImageBuf &ib, WrapMode wrap, bool write=false)
 
OIIO_API IteratorBase (const ImageBuf &ib, int x, int y, int z, WrapMode wrap, bool write=false)
 
OIIO_API IteratorBase (const ImageBuf &ib, const ROI &roi, WrapMode wrap, bool write=false)
 Construct valid iteration region from ImageBuf and ROI. More...
 
OIIO_API IteratorBase (const ImageBuf &ib, int xbegin, int xend, int ybegin, int yend, int zbegin, int zend, WrapMode wrap, bool write=false)
 
OIIO_API IteratorBase (const IteratorBase &i)
 Copy constructor. More...
 
OIIO_API const IteratorBaseoperator= (const IteratorBase &i)
 Assign one IteratorBase to another. More...
 
 ~IteratorBase ()
 
void OIIO_API init_ib (WrapMode wrap, bool write)
 
void OIIO_API range_is_image ()
 
void pos_xincr ()
 
void OIIO_API pos_xincr_local_past_end ()
 
void OIIO_API pos_done ()
 
void OIIO_API release_tile ()
 

Protected Attributes

const ImageBufm_ib = nullptr
 
bool m_valid = false
 
bool m_exists = false
 
bool m_deep = false
 
bool m_localpixels = false
 
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
 
pvt::ImageCacheTile * m_tile = nullptr
 
int m_tilexbegin
 
int m_tileybegin
 
int m_tilezbegin
 
int m_tilexend
 
int m_nchannels
 
stride_t m_pixel_stride
 
char * m_proxydata = nullptr
 
WrapMode m_wrap = WrapBlack
 
bool m_readerror = false
 

Friends

class ImageBuf
 
class ImageBufImpl
 

Detailed Description

Base class for Iterator and ConstIterator – this contains all the common functionality.

Definition at line 1196 of file imagebuf.h.

Constructor & Destructor Documentation

OIIO_API ImageBuf::IteratorBase::IteratorBase ( const ImageBuf ib,
WrapMode  wrap,
bool  write = false 
)
protected
OIIO_API ImageBuf::IteratorBase::IteratorBase ( const ImageBuf ib,
int  x,
int  y,
int  z,
WrapMode  wrap,
bool  write = false 
)
protected
OIIO_API ImageBuf::IteratorBase::IteratorBase ( const ImageBuf ib,
const ROI roi,
WrapMode  wrap,
bool  write = false 
)
protected

Construct valid iteration region from ImageBuf and ROI.

OIIO_API ImageBuf::IteratorBase::IteratorBase ( const ImageBuf ib,
int  xbegin,
int  xend,
int  ybegin,
int  yend,
int  zbegin,
int  zend,
WrapMode  wrap,
bool  write = false 
)
protected

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

OIIO_API ImageBuf::IteratorBase::IteratorBase ( const IteratorBase i)
protected

Copy constructor.

ImageBuf::IteratorBase::~IteratorBase ( )
inlineprotected

Definition at line 1220 of file imagebuf.h.

Member Function Documentation

void ImageBuf::IteratorBase::clear_error ( )
inline

Definition at line 1340 of file imagebuf.h.

int ImageBuf::IteratorBase::deep_samples ( ) const
inline

Retrieve the number of deep data samples at this pixel.

Definition at line 1270 of file imagebuf.h.

float ImageBuf::IteratorBase::deep_value ( int  c,
int  s 
) const
inline

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

Definition at line 1324 of file imagebuf.h.

uint32_t ImageBuf::IteratorBase::deep_value_uint ( int  c,
int  s 
) const
inline

Definition at line 1329 of file imagebuf.h.

bool ImageBuf::IteratorBase::done ( ) const
inline

Are we finished iterating over the region?

Definition at line 1259 of file imagebuf.h.

bool ImageBuf::IteratorBase::exists ( int  x_,
int  y_,
int  z_ = 0 
) const
inline

Is the location (x,y[,z]) within the region of the ImageBuf that contains pixel values (sometimes called the "data window")?

Definition at line 1248 of file imagebuf.h.

bool ImageBuf::IteratorBase::exists ( ) const
inline

Does the current location exist within the ImageBuf's data window?

Definition at line 1256 of file imagebuf.h.

bool ImageBuf::IteratorBase::has_error ( void  ) const
inline

Definition at line 1337 of file imagebuf.h.

void OIIO_API ImageBuf::IteratorBase::init_ib ( WrapMode  wrap,
bool  write 
)
protected
bool ImageBuf::IteratorBase::localpixels ( ) const
inline

Definition at line 1334 of file imagebuf.h.

void ImageBuf::IteratorBase::operator++ ( )
inline

Increment to the next pixel in the region.

Definition at line 1281 of file imagebuf.h.

void ImageBuf::IteratorBase::operator++ ( int  )
inline

Increment to the next pixel in the region.

Definition at line 1305 of file imagebuf.h.

OIIO_API const IteratorBase& ImageBuf::IteratorBase::operator= ( const IteratorBase i)
protected

Assign one IteratorBase to another.

void OIIO_API ImageBuf::IteratorBase::pos ( int  x_,
int  y_,
int  z_ = 0 
)

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

void OIIO_API ImageBuf::IteratorBase::pos_done ( )
protected
void ImageBuf::IteratorBase::pos_xincr ( )
inlineprotected

Definition at line 1376 of file imagebuf.h.

void OIIO_API ImageBuf::IteratorBase::pos_xincr_local_past_end ( )
protected
ROI ImageBuf::IteratorBase::range ( ) const
inline

Return the iteration range.

Definition at line 1308 of file imagebuf.h.

void OIIO_API ImageBuf::IteratorBase::range_is_image ( )
protected
const void* ImageBuf::IteratorBase::rawptr ( ) const
inline

Definition at line 1321 of file imagebuf.h.

void OIIO_API ImageBuf::IteratorBase::release_tile ( )
protected
void OIIO_API ImageBuf::IteratorBase::rerange ( int  xbegin,
int  xend,
int  ybegin,
int  yend,
int  zbegin,
int  zend,
WrapMode  wrap = WrapDefault 
)

Reset the iteration range for this iterator and reposition to the beginning of the range, but keep referring to the same image.

bool ImageBuf::IteratorBase::valid ( ) const
inline

Is the current location within the designated iteration range?

Definition at line 1235 of file imagebuf.h.

bool ImageBuf::IteratorBase::valid ( int  x_,
int  y_,
int  z_ = 0 
) const
inline

Is the location (x,y[,z]) within the designated iteration range?

Definition at line 1239 of file imagebuf.h.

WrapMode ImageBuf::IteratorBase::wrap ( ) const
inline

Return the wrap mode.

Definition at line 1273 of file imagebuf.h.

int ImageBuf::IteratorBase::x ( ) const
inline

Retrieve the current x location of the iterator.

Definition at line 1228 of file imagebuf.h.

int ImageBuf::IteratorBase::y ( ) const
inline

Retrieve the current y location of the iterator.

Definition at line 1230 of file imagebuf.h.

int ImageBuf::IteratorBase::z ( ) const
inline

Retrieve the current z location of the iterator.

Definition at line 1232 of file imagebuf.h.

Friends And Related Function Documentation

friend class ImageBuf
friend

Definition at line 1343 of file imagebuf.h.

friend class ImageBufImpl
friend

Definition at line 1344 of file imagebuf.h.

Member Data Documentation

bool ImageBuf::IteratorBase::m_deep = false
protected

Definition at line 1347 of file imagebuf.h.

bool ImageBuf::IteratorBase::m_exists = false
protected

Definition at line 1346 of file imagebuf.h.

const ImageBuf* ImageBuf::IteratorBase::m_ib = nullptr
protected

Definition at line 1345 of file imagebuf.h.

int ImageBuf::IteratorBase::m_img_xbegin
protected

Definition at line 1350 of file imagebuf.h.

int ImageBuf::IteratorBase::m_img_xend
protected

Definition at line 1350 of file imagebuf.h.

int ImageBuf::IteratorBase::m_img_ybegin
protected

Definition at line 1350 of file imagebuf.h.

int ImageBuf::IteratorBase::m_img_yend
protected

Definition at line 1350 of file imagebuf.h.

int ImageBuf::IteratorBase::m_img_zbegin
protected

Definition at line 1350 of file imagebuf.h.

int ImageBuf::IteratorBase::m_img_zend
protected

Definition at line 1350 of file imagebuf.h.

bool ImageBuf::IteratorBase::m_localpixels = false
protected

Definition at line 1348 of file imagebuf.h.

int ImageBuf::IteratorBase::m_nchannels
protected

Definition at line 1359 of file imagebuf.h.

stride_t ImageBuf::IteratorBase::m_pixel_stride
protected

Definition at line 1360 of file imagebuf.h.

char* ImageBuf::IteratorBase::m_proxydata = nullptr
protected

Definition at line 1361 of file imagebuf.h.

bool ImageBuf::IteratorBase::m_readerror = false
protected

Definition at line 1363 of file imagebuf.h.

int ImageBuf::IteratorBase::m_rng_xbegin
protected

Definition at line 1353 of file imagebuf.h.

int ImageBuf::IteratorBase::m_rng_xend
protected

Definition at line 1353 of file imagebuf.h.

int ImageBuf::IteratorBase::m_rng_ybegin
protected

Definition at line 1353 of file imagebuf.h.

int ImageBuf::IteratorBase::m_rng_yend
protected

Definition at line 1353 of file imagebuf.h.

int ImageBuf::IteratorBase::m_rng_zbegin
protected

Definition at line 1353 of file imagebuf.h.

int ImageBuf::IteratorBase::m_rng_zend
protected

Definition at line 1353 of file imagebuf.h.

pvt::ImageCacheTile* ImageBuf::IteratorBase::m_tile = nullptr
protected

Definition at line 1356 of file imagebuf.h.

int ImageBuf::IteratorBase::m_tilexbegin
protected

Definition at line 1357 of file imagebuf.h.

int ImageBuf::IteratorBase::m_tilexend
protected

Definition at line 1358 of file imagebuf.h.

int ImageBuf::IteratorBase::m_tileybegin
protected

Definition at line 1357 of file imagebuf.h.

int ImageBuf::IteratorBase::m_tilezbegin
protected

Definition at line 1357 of file imagebuf.h.

bool ImageBuf::IteratorBase::m_valid = false
protected

Definition at line 1346 of file imagebuf.h.

WrapMode ImageBuf::IteratorBase::m_wrap = WrapBlack
protected

Definition at line 1362 of file imagebuf.h.

int ImageBuf::IteratorBase::m_x
protected

Definition at line 1355 of file imagebuf.h.

int ImageBuf::IteratorBase::m_y
protected

Definition at line 1355 of file imagebuf.h.

int ImageBuf::IteratorBase::m_z
protected

Definition at line 1355 of file imagebuf.h.


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