Public Member Functions | |
Tile (Iop &iop, ChannelMask channels, bool mt=false, InterestRatchet *ir=0) | |
Tile (Iop &iop, DD::Image::Box box, ChannelMask channels, bool mt=false, InterestRatchet *ir=0) | |
Tile (Iop &iop, int x, int Y, int r, int T, ChannelMask channels, bool mt=false, InterestRatchet *ir=0) | |
void | at (int x, int y, ChannelMask, float *) |
float | at (int x, int y, Channel) |
Friends | |
std::ostream & | operator<< (std::ostream &, const Tile &) |
The data is locked into the cache by the existence of the Tile, just like Interest does, but the constructor also calculates any lines that are not there yet. If you are running multithreaded then there is a good chance that other threads are calculating the same or overlapping tiles, so the filling of this tile is in fact multithreaded. (I may change this in the future so the constructor actually lauches threads to try to fill the tile in as fast as possible).
The absolute fastest way to get data is to use operator[], but you will have to do boundary and channel mask checking yourself.
You can also use at(), which match the same-named methods on Iop, but are significantly faster.
void Tile::at | ( | int | x, | |
int | y, | |||
ChannelMask | channels, | |||
float * | out | |||
) |
Return several channels of a pixel in the tile.
This is the same as the Interest::at() but is faster because it can assume the line is already loaded.
Reimplemented from DD::Image::Interest.
References DD::Image::Box::clampx(), and DD::Image::Box::clampy().
float Tile::at | ( | int | x, | |
int | y, | |||
Channel | channel | |||
) |
Return a single channel of a pixel in the tile.
This is the same as the Interest::at() but is faster because it can assume the line is already loaded.
Reimplemented from DD::Image::Interest.
References DD::Image::Box::clampx(), and DD::Image::Box::clampy().
std::ostream& operator<< | ( | std::ostream & | , | |
const Tile & | ||||
) | [friend] |
Not implemented in the library but you can define it.
©2009 The Foundry Visionmongers, Ltd. All Rights Reserved. |