Inherited by DD::Image::DirectGeneralTile, and DD::Image::RawGeneralTile.
Public Member Functions | |
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 | is_zero (Channel z, int y) const |
bool | valid () const |
GeneralTile (Iop &input, const Box &box, const ChannelSet &chans, bool forceUnpacked=false, bool mt=false, InterestRatchet *ir=nullptr) | |
~GeneralTile () | |
float | at (int x, int y, Channel z) |
bool | aborted () const |
void | load_range (int y, int t) |
Protected Member Functions | |
GeneralTile (bool LoadOnDemand, Iop &input, const Box &box, const ChannelSet &chans, bool forceUnpacked=false, bool mt=false, InterestRatchet *ir=nullptr) | |
Static Protected Member Functions | |
static Box | getRequestBox (Iop &input) |
Protected Attributes | |
Iop & | _input |
PlanarI * | _planarI |
LocalPlaneCache * | _ipc |
ChannelSet | _channels |
Box | _box |
RowCacheTile * | _rowCacheTile |
bool | _ipcIsShared |
bool | _valid |
bool | _wantPacked |
std::set< ChannelSet > | _allPlanes |
GeneralTile 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
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.
DD::Image::GeneralTile::GeneralTile | ( | 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 calculation has been aborted due to user action or an error. Please check the aborted() state after construction and do not use the pixel data if this is set.
DD::Image::GeneralTile::~GeneralTile | ( | ) |
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
|
inline |
get the channels for the tile
bool DD::Image::GeneralTile::is_zero | ( | Channel | z, |
int | y | ||
) | const |
is this channel/row pair 'zero' (ie is it mapped to no data, rather than checking explicitly whether it is full of zeroes
References DD::Image::Interest::is_zero().
bool DD::Image::GeneralTile::valid | ( | ) | const |
whether the GeneralTile is accessible, or had it aborted during construction.
References DD::Image::Interest::valid().
float DD::Image::GeneralTile::at | ( | int | x, |
int | y, | ||
Channel | z | ||
) |
get the data at a particular pixel. with clipping
References DD::Image::RowCacheTile::at(), DD::Image::ImagePlane::at(), DD::Image::ImagePlane::chanNo(), and DD::Image::PlanarI::rowToStripeIndex().
bool DD::Image::GeneralTile::aborted | ( | ) | const |
whether this Tile was aborted during construction.
References DD::Image::Op::aborted().
Referenced by load_range().
void DD::Image::GeneralTile::load_range | ( | int | y, |
int | t | ||
) |
Loads the image data from the specified range. The range should be within bounds passed to the tile at construction time.
References aborted(), DD::Image::Iop::fetchPlane(), DD::Image::PlanarI::getStripeBox(), DD::Image::Box::intersect(), DD::Image::Interest::load_range(), DD::Image::ImagePlane::readable(), DD::Image::Iop::requestedBox(), DD::Image::PlanarI::rowToStripeIndex(), DD::Image::ChannelSet::size(), DD::Image::Box::t(), DD::Image::Interest::valid(), and DD::Image::Box::y().
helper function: get the requested box on an input, bypassing Iops that contribute nothing towards the image
References DD::Image::Interest::inputIop(), and DD::Image::Iop::requestedBox().
©2021 The Foundry Visionmongers, Ltd. All Rights Reserved. |