DD::Image::DeepPlane Class Reference

Inherited by DD::Image::DeepOutputPlane.

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

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
bool DD::Image::DeepPlane::covers ( int  y,
int  x 
) const
inline

Returns true if this DeepPlane covers a particular pixel

References DD::Image::Box::r(), DD::Image::Box::t(), DD::Image::Box::x(), and DD::Image::Box::y().

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

Member Data Documentation

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



©2019 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk