Classes | |
class | LinePointers |
Public Types | |
typedef const float * | RowPtr |
Public Member Functions | |
BufferIopTile (Iop &input, const Box &box, const ChannelSet &chans, bool forceUnpacked=false, bool mt=false, InterestRatchet *ir=nullptr) | |
BufferIopTile (Iop &input, int x, int y, int r, int t, const ChannelSet &chans, bool mt=false, InterestRatchet *ir=nullptr) | |
BufferIopTile (Iop &input, const ChannelSet &chans, bool mt=false, InterestRatchet *ir=nullptr) | |
~BufferIopTile () | |
int | x () const |
int | y () const |
int | r () const |
int | t () const |
int | w () const |
int | h () const |
int | clampy (int y) const |
int | clampx (int x) const |
operator const Box & () const | |
const DD::Image::Box & | box () const |
const ChannelSet & | channels () const |
bool | valid () const |
float | at (int x, int y, Channel z) const |
LinePointers | operator[] (Channel z) const |
bool | is_zero (Channel z, int y) const |
Static Public Member Functions | |
static const float * | NilRow () |
Protected Member Functions | |
void | makeTile (Iop &input, const Box &box, const ChannelSet &chans) |
Protected Attributes | |
BufferIop * | _bufferIop |
Box | _box |
ChannelSet | _channels |
bool | _valid |
BufferIopTile is a Tile-like API for access to image data, that can use both the traditional row-based Tile API and can access ImagePlane data stored inside a BufferIop.
Accessing the Tile will return data from from inside the ImagePlane, to avoid this data being duplicated inside the row cache. Since BufferIops are utilised to provide top-down execution, it is assumed that the ImagePlane already contains data when the Tile is created. If this is not the case, the returned Tile will not be valid. If there is any doubt about whether the data is available, you should check the valid() state before attempting to access the tile.
Unlike Interest/Tile this isn't a Box. Some Box methods are provided for source-compatibility, but it's probably best to use getBox() to get the box instead.
typedef const float* DD::Image::BufferIopTile::RowPtr |
pointer to within an individual row
DD::Image::BufferIopTile::BufferIopTile | ( | Iop & | input, |
const Box & | box, | ||
const ChannelSet & | chans, | ||
bool | forceUnpacked = false , |
||
bool | mt = false , |
||
InterestRatchet * | ir = nullptr |
||
) |
Construct. All image data will be available after this call, unless the BufferIop did not contain an image plane with valid data. Please check the valid() state after construction and do not use the pixel data if this is set.
These constructors are provided for compatibility with other Tiles. Note that the values of forceUnpacked, mt and InterestRatchet will be ignored for this tile type.
References makeTile().
DD::Image::BufferIopTile::~BufferIopTile | ( | ) |
destructor
|
inline |
accessor for the box's x value (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
accessor for the box's y value (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
accessor for the box's r value (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
accessor for the box's t value (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
accessor for the box's width (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
accessor for the box's height (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
clamp a y value to within the box (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
clamp a x value to within the box (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
cast operator for the box (provided for compatibility with DD::Image::RowCacheTile)
|
inline |
return the box for the tile
Referenced by makeTile().
|
inline |
get the channels for the tile
|
inline |
whether the BufferIopTile is accessible, or could not be created (e.g. because the BufferIop's image plane has not been set yet)
float DD::Image::BufferIopTile::at | ( | int | x, |
int | y, | ||
Channel | z | ||
) | const |
get the data at a particular pixel. Clamps to the tile bounds.
References _box, _bufferIop, _valid, DD::Image::Box::clampx(), DD::Image::Box::clampy(), and DD::Image::BufferIop::getReadableAddress().
|
inline |
given a channel, return something that acts like an array of pointers to all the loaded lines.
|
inlinestatic |
return an empty row pointer
|
inline |
is this channel/row pair 'zero' (i.e. is it mapped to no data, rather than checking explicitly whether it is full of zeroes)
this is here for compatibility with RowCacheTile; it returns false always to match the behaviour of GeneralTile for non-row-cache tiles.
|
protected |
shared portion of the Tile constructors
References _box, _bufferIop, _channels, _valid, box(), DD::Image::Box::intersect(), DD::Image::ChannelSet::intersection(), DD::Image::Iop::requested_channels(), DD::Image::Iop::requestedBox(), and DD::Image::ChannelSet::size().
Referenced by BufferIopTile().
|
protected |
the BufferIop for this tile
Referenced by at(), makeTile(), and DD::Image::BufferIopTile::LinePointers::operator[]().
|
protected |
bounding box for the available data in the tile
Referenced by at(), and makeTile().
|
protected |
channels available from this tile
Referenced by makeTile().
|
protected |
whether or not this Tile contains valid data
Referenced by at(), and makeTile().
©2021 The Foundry Visionmongers, Ltd. All Rights Reserved. |