Inherited by DD::Image::DeepOutputPlane.
Public Member Functions | |
DeepPlane () | |
DeepPlane (const DeepPlane &) | |
void | operator= (const DeepPlane &other) |
~DeepPlane () | |
const ChannelMap & | channels () const |
const DD::Image::Box & | box () const |
DeepPixel::Ordering | ordering () const |
int | pixels () const |
int | positionToOffset (int y, int x) const |
DeepPixel | getPixel (int y, int x) const |
DeepPixel | getPixel (DD::Image::Box::iterator it) const |
bool | covers (DD::Image::Box box, DD::Image::ChannelSet cs) const |
bool | covers (int y, int x) const |
size_t | memUsage () const |
size_t | getSampleCount (int y, int x) const |
size_t | getSampleCount (const DD::Image::Box::iterator &it) const |
size_t | getTotalSampleCount () const |
Protected Member Functions | |
DeepPlane (DD::Image::ChannelSet channels, DD::Image::Box box, DeepPixel::Ordering ordering=DeepPixel::eUnordered) | |
size_t | getPixelCount () const |
Protected Attributes | |
DD::Image::ChannelMap | _channels |
DD::Image::Box | _box |
DeepPixel::Ordering | _ordering |
DeepPlaneData * | _sharedData |
Deep image plane class. Represents deep data on certain channels for a certain box. The actual deep data is stored in a separate reference-counted structure, so that copying is cheap. This class is read-only. If you wish to write to a DeepPlane, use the DeepOutputPlane subclass.
DD::Image::DeepPlane::DeepPlane | ( | DD::Image::ChannelSet | channels, |
DD::Image::Box | box, | ||
DeepPixel::Ordering | ordering = DeepPixel::eUnordered |
||
) | [protected] |
Create an empty deep plane for a given set of channels and bounding box. addPixel() or addHole() must be called for each position in the box for the object to be valid for returning from doDeepEngine().
References _sharedData.
DD::Image::DeepPlane::DeepPlane | ( | ) |
Create an uninitialised plane.
References _sharedData.
DD::Image::DeepPlane::DeepPlane | ( | const DeepPlane & | other | ) |
Construct one deep plane based on another. The data is shared.
References _box, _channels, _ordering, and _sharedData.
DD::Image::DeepPlane::~DeepPlane | ( | ) |
Destroy this plane.
References _sharedData.
size_t DD::Image::DeepPlane::getPixelCount | ( | ) | const [protected] |
Get the actual number of pixels in this plane
References _sharedData.
Referenced by DD::Image::DeepOutputPlane::addPixel().
void DD::Image::DeepPlane::operator= | ( | const DeepPlane & | other | ) |
Copy one deep plane to another. The data is shared.
References _box, _channels, _ordering, and _sharedData.
const ChannelMap& DD::Image::DeepPlane::channels | ( | ) | const [inline] |
Get the channels available on this plane
Referenced by DD::Image::DeepOp::deepEngine().
const DD::Image::Box& DD::Image::DeepPlane::box | ( | ) | const [inline] |
Get the bounding box available for this plane
Referenced by DD::Image::DeepOp::deepEngine().
DeepPixel::Ordering DD::Image::DeepPlane::ordering | ( | ) | const [inline] |
Get the ordering of the samples for this plane
bool DD::Image::DeepPlane::covers | ( | DD::Image::Box | box, |
DD::Image::ChannelSet | cs | ||
) | const [inline] |
Returns true if this DeepPlane covers the given box and channels
References DD::Image::Box::merge(), DD::Image::Box::r(), DD::Image::Box::t(), DD::Image::Box::x(), and DD::Image::Box::y().
Referenced by DD::Image::DeepOp::deepEngine().
bool DD::Image::DeepPlane::covers | ( | int | y, |
int | x | ||
) | const [inline] |
Returns true if this DeepPlane covers a particular pixel
size_t DD::Image::DeepPlane::memUsage | ( | ) | const |
return the total memory used for this plane
References _sharedData.
size_t DD::Image::DeepPlane::getSampleCount | ( | int | y, |
int | x | ||
) | const |
return the number of samples at planes[x,y]
References _channels, _sharedData, and DD::Image::ChannelMap::size().
size_t DD::Image::DeepPlane::getSampleCount | ( | const DD::Image::Box::iterator & | it | ) | const [inline] |
return the number of samples at "it"
size_t DD::Image::DeepPlane::getTotalSampleCount | ( | ) | const |
get total sample count
References _channels, _sharedData, and DD::Image::ChannelMap::size().
DD::Image::ChannelMap DD::Image::DeepPlane::_channels [protected] |
The channels this plane is for
Referenced by DD::Image::DeepOutputPlane::addPixel(), DeepPlane(), DD::Image::DeepInPlaceOutputPlane::getPixel(), getSampleCount(), getTotalSampleCount(), operator=(), DD::Image::DeepInPlaceOutputPlane::reserveSamples(), and DD::Image::DeepInPlaceOutputPlane::setSampleCount().
DD::Image::Box DD::Image::DeepPlane::_box [protected] |
The bounding box this plane is for
Referenced by DD::Image::DeepOutputPlane::addPixel(), DD::Image::DeepInPlaceOutputPlane::DeepInPlaceOutputPlane(), DeepPlane(), DD::Image::DeepInPlaceOutputPlane::getPixel(), DD::Image::DeepInPlaceOutputPlane::isComplete(), operator=(), and DD::Image::DeepInPlaceOutputPlane::setSampleCount().
DeepPixel::Ordering DD::Image::DeepPlane::_ordering [protected] |
The ordering in which the samples are stored within the pixels for this plane
Referenced by DeepPlane(), DD::Image::DeepInPlaceOutputPlane::getPixel(), and operator=().
DeepPlaneData* DD::Image::DeepPlane::_sharedData [protected] |
Pointer to a reference-counted object that contains the actual memory allocations
Referenced by DD::Image::DeepOutputPlane::addHole(), DD::Image::DeepOutputPlane::addPixel(), DD::Image::DeepInPlaceOutputPlane::DeepInPlaceOutputPlane(), DeepPlane(), DD::Image::DeepInPlaceOutputPlane::getPixel(), getPixelCount(), getSampleCount(), getTotalSampleCount(), memUsage(), operator=(), DD::Image::DeepInPlaceOutputPlane::reserveSamples(), DD::Image::DeepInPlaceOutputPlane::reviseSamples(), DD::Image::DeepInPlaceOutputPlane::setSampleCount(), and ~DeepPlane().