FnUsdAbstractionLib 0.6.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
usg::ImageInterface Class Reference

#include <ImageInterface.h>

Classes

class  Description
 

Public Member Functions

 ImageInterface (const std::string &nodepath)
 
virtual const std::string & nodepath () const
 Path string identifying a Nuke Node by name and context.
 
virtual int32_t width () const
 
virtual int32_t height () const
 
virtual int32_t numChannels () const
 
virtual bool isValid () const
 Is the image configured and a valid size? Default version tests that W/H/D is non-zero.
 
virtual bool getMetadata (const Token &key, Value *value) const
 
virtual bool read (const fdk::Box2i &active_bbox, int32_t num_chans, int32_t bytes_per_channel, bool signed_type, bool apply_srgb_correction, bool mirrorX, bool mirrorY, void *buffer)
 

Static Public Member Functions

static const Descriptionfind (const char *identifier)
 

Protected Attributes

std::string _nodepath
 Usually assigned in ctor.
 

Detailed Description

Abstract wrapper for a HioImage subclass specifically for Nuke's internal use connecting an in-memory DDImage Op/Iop to a Hydra texture reader.

Image orienation matches Y-up Nuke - lower-left corner = 0,0 and the endpoint-exclusive top-right corner = width(),height().

Only the methods needed for DDImage to interface with this class are exposed.

Member Function Documentation

◆ find()

static const Description * usg::ImageInterface::find ( const char *  identifier)
static

Find an ImageInterface description by image indentifier name. This does not currently support searching for plugin files, it assumes a static Description was compiled into an existing plugin.

◆ width()

virtual int32_t usg::ImageInterface::width ( ) const
inlinevirtual

Total image width with left edge assumed to be at 0 and the endpoint-exclusive right edge equal to width().

◆ height()

virtual int32_t usg::ImageInterface::height ( ) const
inlinevirtual

Total image height with bottom edge assumed to be at 0 and the endpoint-exclusive top edge equal to height().

◆ numChannels()

virtual int32_t usg::ImageInterface::numChannels ( ) const
inlinevirtual

Channel count can be 0,1,2,3 or 4 only. ie max number of channels is 4.

◆ read()

virtual bool usg::ImageInterface::read ( const fdk::Box2i &  active_bbox,
int32_t  num_chans,
int32_t  bytes_per_channel,
bool  signed_type,
bool  apply_srgb_correction,
bool  mirrorX,
bool  mirrorY,
void *  buffer 
)
virtual

Fill the interleaved(packed) image data buffer which is allocated based on the width() Note that 'active_bbox' is in standard Nuke DD::Image::Box notation(endpoint-exclusive) and will be clamped to [0 0 width() height()]. Returns true if no error.



©2025 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk