#include <PlanarI.h>
Public Types | |
enum | PackedPreference { ePackedPreferenceNone , ePackedPreferencePacked , ePackedPreferenceUnpacked } |
typedef ChannelSet | PlaneID |
typedef std::set< PlaneID > | PlaneSet |
Public Member Functions | |
virtual PackedPreference | packedPreference () const =0 |
virtual size_t | getStripeCount () const =0 |
virtual Box | getStripeBox (int idx) const =0 |
virtual size_t | rowToStripeIndex (int y) const =0 |
Box | getOutputBox () const |
PlaneID | getRequestedPlaneFromChannel (Channel channel) |
PlaneSet | getAllPlanes (const ChannelSet &channels) |
ChannelSet | getAllChannels (const ChannelSet &channels) |
virtual LocalPlaneCache * | getCache () |
virtual bool | stripesCanBeRenderedInParallel () |
virtual PlaneID | getPlaneFromChannel (Channel chan) |
Friends | |
class | PlaneCacheI |
PlanarI is a mix-in class to be implemented by Iops which prefer to be accessed in a planar way (i.e. with fetchPlane)
It is not itself an Iop because the subclasses might want to inherit from some other subclass of Iop. However doing so will disable caching and is not recommended; for optimal perfomance always inherit from PlanarIop.
|
pure virtual |
whether the Iop prefers to output packed or unpacked data. If the Iop is neutral it should return ePackedPreferenceNone and then the decision will be made on whether other criteria, such as what the downstream ops prefer to consume
Implemented in DD::Image::Read.
|
pure virtual |
|
pure virtual |
get the size of box /idx/
Implemented in DD::Image::PlanarIop.
Referenced by getOutputBox(), and DD::Image::GeneralTile::load_range().
|
pure virtual |
get the box number that row /y/ is in
Referenced by DD::Image::GeneralTile::at(), and DD::Image::GeneralTile::load_range().
Box DD::Image::PlanarI::getOutputBox | ( | ) | const |
Return the full output box covered by the stripes.
Uses getStripeBox() and getStripeCount().
References getStripeBox(), getStripeCount(), and DD::Image::Box::merge().
PlanarI::PlaneID DD::Image::PlanarI::getRequestedPlaneFromChannel | ( | Channel | channel | ) |
Get the ChannelSet which is the intersection between the the plane containing the channel passed in and the channels that have been requested.
PlanarI::PlaneSet DD::Image::PlanarI::getAllPlanes | ( | const ChannelSet & | channels | ) |
Get the set of ChannelSets which are the intersection between the ChannelSet passed in, the planes containing the channels from that ChannelSet, and the channels that have been requested.
ChannelSet DD::Image::PlanarI::getAllChannels | ( | const ChannelSet & | channels | ) |
Get the ChannelSet which is the intersection between the the ChannelSet passed in, the planes containing the channels from that ChannelSet, and the channels that have been requested.
|
virtual |
Access the cache for this Planar interface the default implementation returns NULL, implying no caching, which can be very slow.
Reimplemented in DD::Image::PlanarIop.
|
inlinevirtual |
Return whether or not the stripes can be rendered on multiple threads in parallel. If threading is done within the stripes, you should return false from this to avoid an explosion in the number of threads being used for the render.
In future, if you return true from this you might be asked to render multiple stripes at once on different threads. You should therefore take care that your rendering function (renderStripe, in the case of a PlanarIop) is thread-safe.
NOTE that this is provided for future compatibility only, and for the time being if you want guaranteed multi-threading you should implement it yourself within renderStripe and return false from this function.
|
virtual |
override this if you want your planes to be different to the default.
by default Nuke will call renderStripe()/doFetchPlane() once for each layer. You define its belief about what a 'layer' is here. for example, if you return info().channels(), it will render all your channels at once; if you return chan it will render each channel separately.
Reimplemented in DD::Image::Read.
References DD::Image::ChannelSet::addBrothers(), DD::Image::Chan_DeepBack, DD::Image::Chan_Mask_PlanarTrack, and DD::Image::Chan_U.
©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |