Inherits DD::Image::Iop, and DD::Image::PlanarI.
Inherited by DD::Image::Read.
Public Member Functions | |
PlanarIop (Node *node) | |
virtual void | getRequests (const Box &box, const ChannelSet &channels, int count, RequestOutput &reqData) const |
virtual void | renderStripe (ImagePlane &plane)=0 |
virtual PlanarI * | getPlanarI () |
virtual bool | useStripes () const |
virtual size_t | stripeHeight () const |
virtual PackedPreference | packedPreference () const |
DD::Image::Box | expandToFullTiles (const DD::Image::Box &box) const |
Protected Member Functions | |
virtual void | _open () |
void | engine (int y, int x, int r, ChannelMask m, Row &row) |
virtual void | _request (int x, int y, int r, int t, ChannelMask chans, int count) |
virtual void | doFetchPlane (ImagePlane &plane) |
base class for an Iop which strongly wishes to output planar data, possibly with striping. This implements PlanarI to hint as to how the data should be accessed, and adds ImagePlaneCache (privately) to provide a cache
virtual void DD::Image::PlanarIop::renderStripe | ( | ImagePlane & | plane | ) | [pure virtual] |
This is the actual rendering function that subclasses should implement.
The subclass is responsible for filling plane to the extent of its bbox and channels. It is guaranteed that the plane will never have more than 4 channels, and that its bounding box will be one of those that getStripeBox() returns. The ChannelSet will be a full layer, but no more than one layer. It might be packed or not depending upon the results of negotiation.
It will never be called for channels in the out_channels as set by _validate.
Implemented in DD::Image::Read.
virtual bool DD::Image::PlanarIop::useStripes | ( | ) | const [inline, virtual] |
this should be overriden by subclasses if they want striping
Reimplemented in DD::Image::Read.
virtual size_t DD::Image::PlanarIop::stripeHeight | ( | ) | const [inline, virtual] |
this should be overriden by subclasses to return the desired stripe height
Reimplemented in DD::Image::Read.
DD::Image::Box DD::Image::PlanarIop::expandToFullTiles | ( | const DD::Image::Box & | box | ) | const |
this expands the bounding box so as to cover the full extent of all overlapping tiles.
References DD::Image::Box::t(), and DD::Image::Box::y().
void DD::Image::PlanarIop::_open | ( | ) | [protected, virtual] |
protected: implementation of this Iop function. will initialise the output planes vector as necessary.
Reimplemented from DD::Image::Iop.
Reimplemented in DD::Image::Read.
References DD::Image::ImagePlaneCache::initPlanes().
void DD::Image::PlanarIop::engine | ( | int | y, |
int | x, | ||
int | r, | ||
ChannelMask | m, | ||
Row & | row | ||
) | [protected, virtual] |
protected: implementation of engine(). should not be overriden further
Implements DD::Image::Iop.
Reimplemented in DD::Image::Read.
void DD::Image::PlanarIop::_request | ( | int | x, |
int | y, | ||
int | r, | ||
int | t, | ||
ChannelMask | chans, | ||
int | count | ||
) | [protected, virtual] |
this should not be overriden by subclasses
if there are no further channels we can just return
we are going to end up calling engine for full tile and all the channels for this plane, so we need to call getRequests() with that
Reimplemented from DD::Image::Iop.
References DD::Image::RequestOutput::doRequest().
void DD::Image::PlanarIop::doFetchPlane | ( | ImagePlane & | plane | ) | [protected, virtual] |
private: implementation of this Iop function. calls renderStripe to do actual work, which is the one that subclasses should implement
Reimplemented from DD::Image::Iop.
Reimplemented in DD::Image::Read.
References DD::Image::ImagePlane::copyIntersectionFrom(), DD::Image::ImagePlane::fillChannel(), DD::Image::ImagePlane::makeWritable(), DD::Image::ChannelSet::size(), DD::Image::Box::t(), and DD::Image::Box::y().