HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PXL_OCIO Class Reference

Abstract interface to OpenColorIO. More...

#include <PXL_OCIO.h>

Classes

struct  PHandle
 

Static Public Member Functions

static const UT_StringRefconfigFilePath ()
 The path and filename of the config file being used. More...
 
static bool isOCIOEnvSet (bool check_for_active_vars=true)
 
static const char * getDefaultDisplay ()
 Returns the current color space name. More...
 
static const char * getDefaultView (const char *display=NULL)
 Returns the current color space name. More...
 
static bool getViewsForDisplay (const char *display, UT_StringArray &view_names)
 Return the list of views for a given display. More...
 
static void getActiveDisplays (UT_StringArray &names)
 Returns the list of active displays. More...
 
static void getActiveViews (UT_StringArray &names)
 Returns the list of active views. More...
 
static void getColorSpaces (UT_StringArray &names)
 Returns a list of the supported color spaces. More...
 
static void getLooks (UT_StringArray &looks)
 Returns a list of looks (color transforms) More...
 
static void getRoles (UT_StringArray &names)
 Returns a list of the supported roles. More...
 
static void reload ()
 Reload the configuration. More...
 
static const char * getDefaultRole ()
 
static const char * getReferenceRole ()
 
static const char * getDataRole ()
 
static const char * getSceneLinearRole ()
 
static const char * getCompLogRole ()
 
static const char * getColorPickingRole ()
 
static const char * getsRGBColorSpace (const char *display=nullptr)
 
static const char * getColorSpaceForDisplayView (const char *display_name, const char *view_name)
 Return the colorspace defined by the view for a given display. More...
 
static const char * getTransformNameForDisplayView (const char *display_name, const char *view_name)
 Return the colorspace defined by the view for a given display. More...
 
static const char * getLooksForDisplayView (const char *display_name, const char *view_name)
 Return the looks attached to the view for a given display. More...
 
static const char * parseColorSpaceFromString (const char *string)
 
static UT_StringHolder parseColorSpaceFromHolder (const UT_StringHolder &s)
 
static const ColorSpace * lookupSpace (const UT_StringHolder &name)
 
static const char * getName (const ColorSpace *space)
 Return the name of the color space. More...
 
static const char * getDescription (const ColorSpace *space)
 Return the description of the color space. More...
 
static bool getAllocationVars (const ColorSpace *space, bool &uniform, fpreal &min, fpreal &max, fpreal &offset)
 Return the allocation variable meta data about the color space. More...
 
static bool isFloatPointSpace (const ColorSpace *space, bool &fp)
 Set 'fp' to true if the color space is defined for FP, false for uint. More...
 
static bool getInfo (const ColorSpace *space, UT_Options &info)
 
static bool isValidTransform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, bool forward_transform=true)
 Is there a transform from src->dest with the applied looks. More...
 
static bool isValidTransform (const UT_StringHolder &transform, bool forward)
 
static bool isNoOpTransform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, bool forward_transform=true)
 Valid transform, but does nothing. More...
 
static bool is3DTransform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, bool forward_transform=true)
 Does the transform from src->dest with applied looks require a 3D LUT. More...
 
static bool is3DTransform (const UT_StringHolder &view_transform)
 
static bool isSceneReferenceTransform (const UT_StringHolder &view_transform)
 
static bool transformView (const UT_StringHolder &src_cs, const UT_StringHolder &display, const UT_StringHolder &view, fpreal32 *data, int npixels, int nchannels, bool forward)
 
static bool transformToView (const UT_StringHolder &src, const UT_StringHolder &display, const UT_StringHolder &view, fpreal32 *data, int npixels, int nchannels, bool forward_transform=true)
 Transform from a colorspace to a display/view, including looks. More...
 
static bool transform (const UT_StringHolder &view_transform, fpreal32 *data, int npixels, int nchannels, bool forward_transform=true)
 Transform with the given view transform, which must exist in the config. More...
 
static int addConfigChangeCB (UT_Functor< void > callback)
 
static void removeConfigChangeCB (int id)
 
static bool transform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, fpreal32 *data, int npixels, int nchannels, bool forward_transform=true)
 
static bool transform (const ColorSpace *src, const ColorSpace *dest, const UT_StringHolder &looks, fpreal32 *data, int npixels, int nchannels, bool forward_transform=true)
 
static PHandle transformCache (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, bool forward_transform=true)
 
static bool transform (const PHandle &processor, fpreal32 *data, int npixels, int nchannels)
 

Detailed Description

Abstract interface to OpenColorIO.

Definition at line 24 of file PXL_OCIO.h.

Member Function Documentation

static int PXL_OCIO::addConfigChangeCB ( UT_Functor< void callback)
static
static const UT_StringRef& PXL_OCIO::configFilePath ( )
static

The path and filename of the config file being used.

static void PXL_OCIO::getActiveDisplays ( UT_StringArray names)
static

Returns the list of active displays.

static void PXL_OCIO::getActiveViews ( UT_StringArray names)
static

Returns the list of active views.

static bool PXL_OCIO::getAllocationVars ( const ColorSpace *  space,
bool &  uniform,
fpreal min,
fpreal max,
fpreal offset 
)
static

Return the allocation variable meta data about the color space.

static const char* PXL_OCIO::getColorPickingRole ( )
static
static const char* PXL_OCIO::getColorSpaceForDisplayView ( const char *  display_name,
const char *  view_name 
)
static

Return the colorspace defined by the view for a given display.

static void PXL_OCIO::getColorSpaces ( UT_StringArray names)
static

Returns a list of the supported color spaces.

static const char* PXL_OCIO::getCompLogRole ( )
static
static const char* PXL_OCIO::getDataRole ( )
static
static const char* PXL_OCIO::getDefaultDisplay ( )
static

Returns the current color space name.

static const char* PXL_OCIO::getDefaultRole ( )
static
static const char* PXL_OCIO::getDefaultView ( const char *  display = NULL)
static

Returns the current color space name.

static const char* PXL_OCIO::getDescription ( const ColorSpace *  space)
static

Return the description of the color space.

static bool PXL_OCIO::getInfo ( const ColorSpace *  space,
UT_Options info 
)
static

Fill out metadata for color space in a UT_Options Keys are the tokens in the config.ocio file:

  • name
  • family
  • equalitygroup
  • bitdepth
  • description
  • isdata
  • allocation
  • allocationvars
static void PXL_OCIO::getLooks ( UT_StringArray looks)
static

Returns a list of looks (color transforms)

static const char* PXL_OCIO::getLooksForDisplayView ( const char *  display_name,
const char *  view_name 
)
static

Return the looks attached to the view for a given display.

static const char* PXL_OCIO::getName ( const ColorSpace *  space)
static

Return the name of the color space.

static const char* PXL_OCIO::getReferenceRole ( )
static
static void PXL_OCIO::getRoles ( UT_StringArray names)
static

Returns a list of the supported roles.

static const char* PXL_OCIO::getSceneLinearRole ( )
static
static const char* PXL_OCIO::getsRGBColorSpace ( const char *  display = nullptr)
static
static const char* PXL_OCIO::getTransformNameForDisplayView ( const char *  display_name,
const char *  view_name 
)
static

Return the colorspace defined by the view for a given display.

static bool PXL_OCIO::getViewsForDisplay ( const char *  display,
UT_StringArray view_names 
)
static

Return the list of views for a given display.

static bool PXL_OCIO::is3DTransform ( const UT_StringHolder src,
const UT_StringHolder dest,
const UT_StringHolder looks,
bool  forward_transform = true 
)
static

Does the transform from src->dest with applied looks require a 3D LUT.

static bool PXL_OCIO::is3DTransform ( const UT_StringHolder view_transform)
static
static bool PXL_OCIO::isFloatPointSpace ( const ColorSpace *  space,
bool &  fp 
)
static

Set 'fp' to true if the color space is defined for FP, false for uint.

static bool PXL_OCIO::isNoOpTransform ( const UT_StringHolder src,
const UT_StringHolder dest,
const UT_StringHolder looks,
bool  forward_transform = true 
)
static

Valid transform, but does nothing.

static bool PXL_OCIO::isOCIOEnvSet ( bool  check_for_active_vars = true)
static

Returns whether the user has set $OCIO, $OCIO_ACTIVE_DISPLAYS or $OCIO_ACTIVE_VIEWS is set. If there's an error loading the configuration, this method will return false.

static bool PXL_OCIO::isSceneReferenceTransform ( const UT_StringHolder view_transform)
static
static bool PXL_OCIO::isValidTransform ( const UT_StringHolder src,
const UT_StringHolder dest,
const UT_StringHolder looks,
bool  forward_transform = true 
)
static

Is there a transform from src->dest with the applied looks.

static bool PXL_OCIO::isValidTransform ( const UT_StringHolder transform,
bool  forward 
)
static
static const ColorSpace* PXL_OCIO::lookupSpace ( const UT_StringHolder name)
static

Return a color space handle given a name. The name may be a color space name or prefixed with "role:" to specify a color space role.

static UT_StringHolder PXL_OCIO::parseColorSpaceFromHolder ( const UT_StringHolder s)
static
static const char* PXL_OCIO::parseColorSpaceFromString ( const char *  string)
static

Guess at the colorspace using the rightmost colorspace found, or NULL if none are found.

static void PXL_OCIO::reload ( )
static

Reload the configuration.

static void PXL_OCIO::removeConfigChangeCB ( int  id)
static
static bool PXL_OCIO::transform ( const UT_StringHolder src,
const UT_StringHolder dest,
const UT_StringHolder looks,
fpreal32 data,
int  npixels,
int  nchannels,
bool  forward_transform = true 
)
static

Transform color data from one color space to another color space. The color space names may either refer to a color space name, or it can also be prefixed with "role:" and refer to a color space role. The 'looks' is a comma separated list of color gradings (aka looks)

static bool PXL_OCIO::transform ( const ColorSpace *  src,
const ColorSpace *  dest,
const UT_StringHolder looks,
fpreal32 data,
int  npixels,
int  nchannels,
bool  forward_transform = true 
)
static

Transform color data from one color space to another color space. The color space names may either refer to a color space name, or it can also be prefixed with "role:" and refer to a color space role. The 'looks' is a comma separated list of color gradings (aka looks)

static bool PXL_OCIO::transform ( const UT_StringHolder view_transform,
fpreal32 data,
int  npixels,
int  nchannels,
bool  forward_transform = true 
)
static

Transform with the given view transform, which must exist in the config.

static bool PXL_OCIO::transform ( const PHandle processor,
fpreal32 data,
int  npixels,
int  nchannels 
)
static
static PHandle PXL_OCIO::transformCache ( const UT_StringHolder src,
const UT_StringHolder dest,
const UT_StringHolder looks,
bool  forward_transform = true 
)
static
static bool PXL_OCIO::transformToView ( const UT_StringHolder src,
const UT_StringHolder display,
const UT_StringHolder view,
fpreal32 data,
int  npixels,
int  nchannels,
bool  forward_transform = true 
)
static

Transform from a colorspace to a display/view, including looks.

static bool PXL_OCIO::transformView ( const UT_StringHolder src_cs,
const UT_StringHolder display,
const UT_StringHolder view,
fpreal32 data,
int  npixels,
int  nchannels,
bool  forward 
)
static

Transform color data using the specified view transform (OCIO v2.0) Always use this method when transforming from a colordpace to a view.


The documentation for this class was generated from the following file: