Inherits DD::Image::DeepPlane.
Inherited by DD::Image::DeepInPlaceOutputPlane.
Public Member Functions | |
DeepOutputPlane (DD::Image::ChannelSet channels, DD::Image::Box box, DeepPixel::Ordering ordering=DeepPixel::eUnordered) | |
void | addHole () |
void | addPixel (const DeepOutPixel &f) |
void | addPixel (const DeepPixel &f) |
Public Member Functions inherited from DD::Image::DeepPlane | |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from DD::Image::DeepPlane | |
DeepPlane (DD::Image::ChannelSet channels, DD::Image::Box box, DeepPixel::Ordering ordering=DeepPixel::eUnordered) | |
size_t | getPixelCount () const |
Protected Attributes inherited from DD::Image::DeepPlane | |
DD::Image::ChannelMap | _channels |
DD::Image::Box | _box |
DeepPixel::Ordering | _ordering |
DeepPlaneData * | _sharedData |
DeepOutputPlane is a subclass of DeepPlane that allows the pixel data to be altered. It is used as the output parameter for deepEngine.
Pattern of use should be: create a DeepOutputPlane with the required channels, box and ordering, and then call addHole() or addPixel() for each position within that box. This results in a valid plane that can then be accessed with the accessor methods above.
|
inline |
Create a new output plane
void DD::Image::DeepOutputPlane::addHole | ( | ) |
add a 'hole' (ie zero samples) at the next pixel
References DD::Image::DeepPlane::_sharedData.
Referenced by DD::Image::DeepOp::deepEngine().
void DD::Image::DeepOutputPlane::addPixel | ( | const DeepOutPixel & | f | ) |
add data at the next pixel. The parameter should consist of a number of floats equal to sampleCount * channelCount, and is arranged
sample 0, channel 0 sample 0, channel 1 sample 0, channel 2 sample 1, channel 0 sample 1, channel 1 sample 1, channel 2
addHole and addPixel start at the bottom-left of the box, and should be called left-to-right, bottom-to-top. The box iterator returns the coordinates in the correct order for this.
References DD::Image::DeepPlane::_box, DD::Image::DeepPlane::_channels, DD::Image::DeepPlane::_sharedData, DD::Image::DeepOutPixel::data(), DD::Image::DeepPlane::getPixelCount(), DD::Image::ChannelMap::size(), and DD::Image::DeepOutPixel::size().
void DD::Image::DeepOutputPlane::addPixel | ( | const DeepPixel & | f | ) |
add data at the next pixel, copying from the input pixel.
References DD::Image::DeepPlane::_box, DD::Image::DeepPlane::_channels, DD::Image::DeepPlane::_sharedData, DD::Image::DeepPixel::channels(), DD::Image::DeepPixel::data(), DD::Image::DeepPixel::getDataCount(), DD::Image::DeepPlane::getPixelCount(), and DD::Image::ChannelMap::size().
©2020 The Foundry Visionmongers, Ltd. All Rights Reserved. |