Nuke binary plugins 15.0.5
 
Loading...
Searching...
No Matches
DD::Image::DeepOp Class Referenceabstract

#include <DeepOp.h>

Inheritance diagram for DD::Image::DeepOp:
DD::Image::ConvertibleToIop DD::Image::DeepOnlyOp DD::Image::DeepFilterOp DD::Image::DeepPixelOp DD::Image::DeepAccumPixelOp

Public Member Functions

virtual Opop ()=0
 
const DeepInfodeepInfo () const
 
void validate (bool forReal)
 
void deepRequest (DD::Image::Box box, const DD::Image::ChannelSet &channels, int count=1)
 
bool deepEngine (DD::Image::Box box, const DD::Image::ChannelSet &channels, DeepPlane &plane)
 
bool deepEngine (int y, int x, int r, const DD::Image::ChannelSet &channels, DeepPlane &plane)
 
void fillCache ()
 
bool fillCache (bool cancellable, Op::PrevalidateResult *cancelReason)
 
const char * conversionHelperNodeClass () const override
 
const FormatconvertibleFormat () const override
 
- Public Member Functions inherited from DD::Image::ConvertibleToIop
virtual const char * conversionHelperNodeClass () const =0
 
virtual const FormatconvertibleFormat () const =0
 
virtual IopconversionPassThroughIop () const
 if it is possible just to view another Iop in place of this one in 2D then return it
 

Static Public Member Functions

static const char * DeepNodeShape ()
 return the node shape to be used by Deep & related operators
 

Protected Member Functions

virtual bool doDeepEngine (DD::Image::Box box, const DD::Image::ChannelSet &channels, DeepOutputPlane &plane)=0
 
virtual void getDeepRequests (DD::Image::Box box, const DD::Image::ChannelSet &channels, int count, std::vector< RequestData > &reqData)=0
 
virtual void _validate (bool forReal)=0
 

Protected Attributes

DeepInfo _deepInfo
 

Detailed Description

Deep Operator interface.

This is analogous to Iop, except that rows are replaced with deepdata tiles (DeepPlane). Subclasses need to implement three phases

_validate, which should fill in the _deepInfo

getDeepRequests(), which should calculate the region of interest and channels needed on the inputs given a region of interest and channels requested on the deep op.

doDeepEngine(), which should do the actual calculation.

Is an interface so that there can be dual DeepOp/Iops.

Member Function Documentation

◆ doDeepEngine()

virtual bool DD::Image::DeepOp::doDeepEngine ( DD::Image::Box  box,
const DD::Image::ChannelSet channels,
DeepOutputPlane plane 
)
protectedpure virtual

Calculate the actual deep image data for the given box and channels, and place it in plane. Plane is not yet initialised, and the implementation should fill it in. It is permitted to return a plane which is larger or has more channels than the specified area. Also, it permitted to not assign plane at all, in which case an empty (0-sample) plane will be returned to the caller.

Returns false if processing was halted due to an abort.

Referenced by deepEngine().

◆ getDeepRequests()

virtual void DD::Image::DeepOp::getDeepRequests ( DD::Image::Box  box,
const DD::Image::ChannelSet channels,
int  count,
std::vector< RequestData > &  reqData 
)
protectedpure virtual

rather then have a DeepOp::_request() function that recursively calls request() on its inputs, this function, the DeepOp version of _request, should place the regions to be requested into the vector passed in. This will be used for more complex render management in future.

Implementations of this function should have no side-effects other than filling in reqData.

Implemented in DD::Image::DeepFilterOp.

Referenced by deepRequest().

◆ _validate()

virtual void DD::Image::DeepOp::_validate ( bool  forReal)
protectedpure virtual

Validate the op, which should result in a valid bbox and channelset being placed in _deepInfo. n.b. if you are an Iop you should make sure to call the Iop::_validate function too. If you copy your deepInfo from an input, call Op::validate on that input.

The forReal parameter specifies whether exact information is required. If forReal is false, then it is permitted to not open the file to find out what bbox/channels are present, and rely on expected values from knobs.

Implemented in DD::Image::DeepFilterOp.

◆ op()

virtual Op * DD::Image::DeepOp::op ( )
pure virtual

Return the actual Op that this DeepOp interface is on. Implementations should just "return this;"

Referenced by deepEngine(), and deepRequest().

◆ deepInfo()

const DeepInfo & DD::Image::DeepOp::deepInfo ( ) const
inline

Get the current info (bbox/channelset)

◆ validate()

void DD::Image::DeepOp::validate ( bool  forReal)
inline

Validate the op, setting the DeepInfo as a side-effect.

◆ deepRequest()

void DD::Image::DeepOp::deepRequest ( DD::Image::Box  box,
const DD::Image::ChannelSet channels,
int  count = 1 
)

Request a given area. This should only be used by code requesting deep data for conversion into some other form: getDeepRequests() should be used for the requests of deep data or Iop data by deep nodes.

References _deepInfo, DD::Image::DeepInfo::channels(), getDeepRequests(), DD::Image::Op::hash(), DD::Image::Box::merge(), and op().

◆ deepEngine() [1/2]

bool DD::Image::DeepOp::deepEngine ( DD::Image::Box  box,
const DD::Image::ChannelSet channels,
DeepPlane plane 
)

◆ deepEngine() [2/2]

bool DD::Image::DeepOp::deepEngine ( int  y,
int  x,
int  r,
const DD::Image::ChannelSet channels,
DeepPlane plane 
)
inline

Get a given row

Returns false if processing was halted due to an abort.

◆ fillCache() [1/2]

void DD::Image::DeepOp::fillCache ( )

This pre-fills the cache, spawning threads to do its work. Only call this if you are in the main thread, or have a lock against the other threads.

References fillCache().

Referenced by fillCache().

◆ fillCache() [2/2]

bool DD::Image::DeepOp::fillCache ( bool  cancellable,
Op::PrevalidateResult cancelReason 
)

This pre-fills the cache, spawning threads to do its work. Only call this if you are in the main thread, or have a lock against the other threads.

If you want the code to pop up a cancellable non-modal progress dialog, set /cancellable/ to true, and then the function will return false if cancelled or aborted, cancelReason (if specified) will be set to either eAborted or eCancelled, depending upon what happened.

◆ conversionHelperNodeClass()

const char * DD::Image::DeepOp::conversionHelperNodeClass ( ) const
overridevirtual

◆ convertibleFormat()

const Format * DD::Image::DeepOp::convertibleFormat ( ) const
overridevirtual

Member Data Documentation

◆ _deepInfo

DeepInfo DD::Image::DeepOp::_deepInfo
protected

The deep info. Analogous to Iop::info_, but rather simpler at present, consisting only of a channelset and a bounding box.

Referenced by deepEngine(), and deepRequest().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com