DD::Image::PlanarIop Class Reference

Inherits DD::Image::Iop, and DD::Image::PlanarI.

Inherited by DD::Image::Read.

List of all members.

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 PlanarIgetPlanarI ()
virtual bool useStripes () const
virtual size_t stripeHeight () const
virtual PackedPreference packedPreference () const
virtual bool renderFullPlanes () const
DD::Image::Box expandToFullTiles (const DD::Image::Box &box) const
DD::Image::ChannelSet expandChannelsToFullPlanes (const DD::Image::ChannelSet &channelSet)
PlanarI::PlaneSet expandToFullPlanes (ChannelSet channelSet)
virtual LocalPlaneCache * getCache ()

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)
virtual ImagePlane renderStripe (size_t stripe, const ChannelSet &m)

Detailed Description

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


Member Function Documentation

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 only 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 overridden by subclasses if they want striping

Reimplemented in DD::Image::Read.

virtual size_t DD::Image::PlanarIop::stripeHeight ( ) const [inline, virtual]

this should be overridden by subclasses to return the desired stripe height

Reimplemented in DD::Image::Read.

virtual bool DD::Image::PlanarIop::renderFullPlanes ( ) const [inline, virtual]

whether this PlanarIop needs to render in full planes.

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

DD::Image::ChannelSet DD::Image::PlanarIop::expandChannelsToFullPlanes ( const DD::Image::ChannelSet channelSet)

this expands a channel set to include all channels in the planes that contain any of the channels passed in, not just those that have been requested.

DD::Image::PlanarI::PlaneSet DD::Image::PlanarIop::expandToFullPlanes ( ChannelSet  channelSet)

this expands a channel set to include all channels in the planes that contain any of the channels passed in, not just those that have been requested, and returns them as a plane set.

DD::Image::LocalPlaneCache * DD::Image::PlanarIop::getCache ( ) [virtual]

return the planar cache for this iop

Reimplemented from DD::Image::PlanarI.

void DD::Image::PlanarIop::_open ( ) [protected, virtual]

protected: implementation of this Iop function. Will initialise the planar cache as necessary.

Reimplemented from DD::Image::Iop.

Reimplemented in DD::Image::Read.

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

DD::Image::ImagePlane DD::Image::PlanarIop::renderStripe ( size_t  stripe,
const ChannelSet m 
) [protected, virtual]

render the given stripe and plane and return the ImagePlane

References DD::Image::ChannelSet::size().