Nuke binary plugins 15.1.5
 
Loading...
Searching...
No Matches
DD::Image::PlanarI Class Referenceabstract

#include <PlanarI.h>

Inheritance diagram for DD::Image::PlanarI:
DD::Image::NukeWrapper DD::Image::PlanarIop DD::Image::Read DD::Image::TimelineRead

Public Types

enum  PackedPreference { ePackedPreferenceNone , ePackedPreferencePacked , ePackedPreferenceUnpacked }
 
typedef ChannelSet PlaneID
 
typedef std::set< PlaneIDPlaneSet
 

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
 

Detailed Description

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.

Member Function Documentation

◆ packedPreference()

virtual PackedPreference DD::Image::PlanarI::packedPreference ( ) const
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.

◆ getStripeCount()

virtual size_t DD::Image::PlanarI::getStripeCount ( ) const
pure virtual

get the number of blocks

Implemented in DD::Image::PlanarIop.

Referenced by getOutputBox().

◆ getStripeBox()

virtual Box DD::Image::PlanarI::getStripeBox ( int  idx) const
pure virtual

get the size of box /idx/

Implemented in DD::Image::PlanarIop.

Referenced by getOutputBox(), and DD::Image::GeneralTile::load_range().

◆ rowToStripeIndex()

virtual size_t DD::Image::PlanarI::rowToStripeIndex ( int  y) const
pure virtual

get the box number that row /y/ is in

Referenced by DD::Image::GeneralTile::at(), and DD::Image::GeneralTile::load_range().

◆ getOutputBox()

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

◆ getRequestedPlaneFromChannel()

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.

◆ getAllPlanes()

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.

◆ getAllChannels()

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.

◆ getCache()

LocalPlaneCache * DD::Image::PlanarI::getCache ( )
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.

◆ stripesCanBeRenderedInParallel()

virtual bool DD::Image::PlanarI::stripesCanBeRenderedInParallel ( )
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.

◆ getPlaneFromChannel()

PlanarI::PlaneID DD::Image::PlanarI::getPlaneFromChannel ( Channel  chan)
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.
www.foundry.com