DD::Image::DeepPlane Class Reference

Inherited by DD::Image::DeepOutputPlane.

List of all members.

Public Member Functions

 DeepPlane ()
 DeepPlane (const DeepPlane &)
void operator= (const DeepPlane &other)
 ~DeepPlane ()
const ChannelMapchannels () const
const DD::Image::Boxbox () 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

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

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

The bounding box this plane is for

Referenced by DD::Image::DeepOutputPlane::addPixel(), DeepPlane(), and operator=().

The ordering in which the samples are stored within the pixels for this plane

Referenced by DeepPlane(), 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(), DeepPlane(), getPixelCount(), memUsage(), operator=(), and ~DeepPlane().