Nuke binary plugins 15.1.3
 
Loading...
Searching...
No Matches
DD::Image::GeneralTile Class Reference

#include <GeneralTile.h>

Inheritance diagram for DD::Image::GeneralTile:
DD::Image::DirectGeneralTile 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::Boxbox () const
 
const ChannelSetchannels () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GeneralTile() [1/2]

DD::Image::GeneralTile::GeneralTile ( Iop input,
const Box box,
const ChannelSet chans,
bool  forceUnpacked = false,
bool  mt = false,
InterestRatchet ir = nullptr 
)

Constructor. 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.

References channels().

◆ ~GeneralTile()

DD::Image::GeneralTile::~GeneralTile ( )

destructor

◆ GeneralTile() [2/2]

DD::Image::GeneralTile::GeneralTile ( bool  loadOnDemand,
Iop input,
const Box box,
const ChannelSet chans,
bool  forceUnpacked = false,
bool  mt = false,
InterestRatchet ir = nullptr 
)
protected

Constructor. This version expects an additional loadOnDemand argument. If set to True, the tile properties will be initialised but image data will not be available immediately after this call. It will instead be provided on demand as pixels are read from the tile. This can be useful for cases such as sampling where the tile defines a possible area that may be read from but the exact pixels which are needed are not known when the tile is constructed.

References channels().

Member Function Documentation

◆ x()

int DD::Image::GeneralTile::x ( ) const
inline

accessor for the box's x value (provided for compatibility with DD::Image::RowCacheTile)

Referenced by at(), and DD::Image::Transform::sample().

◆ y()

int DD::Image::GeneralTile::y ( ) const
inline

accessor for the box's y value (provided for compatibility with DD::Image::RowCacheTile)

Referenced by at(), is_zero(), load_range(), and DD::Image::Transform::sample().

◆ r()

int DD::Image::GeneralTile::r ( ) const
inline

accessor for the box's r value (provided for compatibility with DD::Image::RowCacheTile)

Referenced by DD::Image::Transform::sample().

◆ t()

int DD::Image::GeneralTile::t ( ) const
inline

accessor for the box's t value (provided for compatibility with DD::Image::RowCacheTile)

Referenced by load_range(), and DD::Image::Transform::sample().

◆ w()

int DD::Image::GeneralTile::w ( ) const
inline

accessor for the box's width (provided for compatibility with DD::Image::RowCacheTile)

◆ h()

int DD::Image::GeneralTile::h ( ) const
inline

accessor for the box's height (provided for compatibility with DD::Image::RowCacheTile)

◆ clampy()

int DD::Image::GeneralTile::clampy ( int  y) const
inline

clamp a y value to within the box (provided for compatibility with DD::Image::RowCacheTile)

Referenced by DD::Image::Transform::sample().

◆ clampx()

int DD::Image::GeneralTile::clampx ( int  x) const
inline

clamp a x value to within the box (provided for compatibility with DD::Image::RowCacheTile)

Referenced by DD::Image::Transform::sample().

◆ operator const Box &()

DD::Image::GeneralTile::operator const Box & ( ) const
inline

cast operator for the box (provided for compatibility with DD::Image::RowCacheTile)

◆ box()

const DD::Image::Box & DD::Image::GeneralTile::box ( ) const
inline

return the box for the tile

◆ channels()

const ChannelSet & DD::Image::GeneralTile::channels ( ) const
inline

get the channels for the tile

Referenced by GeneralTile(), and DD::Image::Transform::sample().

◆ is_zero()

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(), and y().

◆ valid()

bool DD::Image::GeneralTile::valid ( ) const

whether the GeneralTile is accessible, or had it aborted during construction.

References DD::Image::Interest::valid().

Referenced by DD::Image::Transform::sample().

◆ at()

float DD::Image::GeneralTile::at ( int  x,
int  y,
Channel  z 
)

◆ aborted()

bool DD::Image::GeneralTile::aborted ( ) const

whether this Tile was aborted during construction.

References DD::Image::Op::aborted().

Referenced by load_range().

◆ load_range()

void DD::Image::GeneralTile::load_range ( int  y,
int  t 
)

◆ getRequestBox()

Box DD::Image::GeneralTile::getRequestBox ( Iop input)
staticprotected

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().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com