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) |
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.
DD::Image::DeepOutputPlane::DeepOutputPlane | ( | DD::Image::ChannelSet | channels, |
DD::Image::Box | box, | ||
DeepPixel::Ordering | ordering = DeepPixel::eUnordered |
||
) | [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::DeepOutPixel::size(), and DD::Image::ChannelMap::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().