HDK
|
Abstract interface to OpenColorIO. More...
Classes | |
struct | PHandle |
Functions | |
PXL_API const UT_StringRef & | configFilePath () |
The path and filename of the config file being used. More... | |
PXL_API bool | isOCIOEnvSet (bool check_for_active_vars=true) |
PXL_API const char * | getDefaultDisplay () |
Returns the current color space name. More... | |
PXL_API const char * | getDefaultView (const char *display=NULL) |
Returns the current color space name. More... | |
PXL_API bool | getViewsForDisplay (const char *display, UT_StringArray &view_names) |
Return the list of views for a given display. More... | |
PXL_API void | getActiveDisplays (UT_StringArray &names) |
Returns the list of active displays. More... | |
PXL_API void | getActiveViews (UT_StringArray &names) |
Returns the list of active views. More... | |
PXL_API void | getColorSpaces (UT_StringArray &names) |
Returns a list of the supported color spaces. More... | |
PXL_API void | getLooks (UT_StringArray &looks) |
Returns a list of looks (color transforms) More... | |
PXL_API void | getRoles (UT_StringArray &names) |
Returns a list of the supported roles. More... | |
PXL_API void | reload () |
Reload the configuration. More... | |
PXL_API const char * | getDefaultRole () |
PXL_API const char * | getReferenceRole () |
PXL_API const char * | getDataRole () |
PXL_API const char * | getSceneLinearRole () |
PXL_API const char * | getCompLogRole () |
PXL_API const char * | getColorPickingRole () |
PXL_API const UT_StringHolder & | getsRGBColorSpace () |
PXL_API UT_StringHolder | getsRGBColorSpace (const char *display) |
PXL_API const UT_StringHolder & | getRec709ColorSpace () |
PXL_API const UT_StringHolder & | getLinearRec709ColorSpace () |
PXL_API const UT_StringHolder & | getRawColorSpace () |
PXL_API const char * | getColorSpaceForDisplayView (const char *display_name, const char *view_name) |
Return the colorspace defined by the view for a given display. More... | |
PXL_API const char * | getTransformNameForDisplayView (const char *display_name, const char *view_name) |
Return the colorspace defined by the view for a given display. More... | |
PXL_API const char * | getLooksForDisplayView (const char *display_name, const char *view_name) |
Return the looks attached to the view for a given display. More... | |
PXL_API const char * | parseColorSpaceFromString (const char *string) |
PXL_API UT_StringHolder | parseColorSpaceFromHolder (const UT_StringHolder &s) |
PXL_API const UT_StringHolder & | pxlImageColorSpace (PXL_ColorSpace cs, const UT_StringHolder &ocioname) |
Convert a PXL_ColorSpace to roughly the OCIO equivalent. More... | |
PXL_API const ColorSpace * | lookupSpace (const UT_StringHolder &name) |
PXL_API const char * | getName (const ColorSpace *space) |
Return the name of the color space. More... | |
PXL_API const char * | getDescription (const ColorSpace *space) |
Return the description of the color space. More... | |
PXL_API bool | getAllocationVars (const ColorSpace *space, bool &uniform, fpreal &min, fpreal &max, fpreal &offset) |
Return the allocation variable meta data about the color space. More... | |
PXL_API bool | isFloatPointSpace (const ColorSpace *space, bool &fp) |
Set 'fp' to true if the color space is defined for FP, false for uint. More... | |
PXL_API bool | getInfo (const ColorSpace *space, UT_Options &info) |
PXL_API void | viewingRuleNames (UT_StringArray &names) |
Get the viewing rule names. More... | |
PXL_API const UT_Options & | viewingRule (const UT_StringRef &name) |
Lookup a viewing rule by the name. More... | |
PXL_API bool | transform (const PHandle &processor, fpreal32 *data, int npixels, int nchannels) |
Transform pixels by a processor. More... | |
PXL_API bool | transform (const PHandle &processor, void *src, void *dst, int width, int height, int nchannels) |
PXL_API bool | transform (const PHandle &processor, fpreal32 *src, int width, int height, int nchannels) |
bool | is3DTransform (const UT_StringHolder &view_transform) |
bool | transformToView (const UT_StringHolder &src, const UT_StringHolder &display, const UT_StringHolder &view, fpreal32 *data, int npixels, int nchannels, bool forward_xform=true) |
Transform from a colorspace to a display/view, including looks. More... | |
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... | |
PXL_API bool | issRGB (const ColorSpace *s) |
PXL_API bool | isSceneLinear (const ColorSpace *s) |
PXL_API PXL_ColorSpace | pxlImageColorSpace (const ColorSpace *cs, UT_StringHolder &name) |
PXL_API PXL_ColorSpace | pxlImageColorSpace (const UT_StringHolder &csname, UT_StringHolder &name) |
PXL_API PHandle | lookupProcessor (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, bool forward_transform=true) |
PXL_API PHandle | lookupProcessor (const ColorSpace *src, const ColorSpace *dest, const UT_StringHolder &looks, bool forward_transform=true) |
PXL_API PHandle | lookupViewProcessor (const UT_StringHolder &src, const UT_StringHolder &display, const UT_StringHolder &view, bool forward_transform) |
PXL_API PHandle | lookupViewProcessor (const UT_StringHolder &view_transform, bool forward_transform) |
bool | isValidTransform (const ColorSpace *src, const ColorSpace *dest, const UT_StringHolder &looks, bool forward_transform=true) |
bool | isValidTransform (const UT_StringHolder &transform, bool forward) |
bool | isNoOpTransform (const ColorSpace *src, const ColorSpace *dest, const UT_StringHolder &looks, bool forward_transform=true) |
bool | is3DTransform (const ColorSpace *src, const ColorSpace *dest, const UT_StringHolder &looks, bool forward_transform=true) |
bool | transform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, fpreal32 *data, int npixels, int nchannels, bool forward_transform=true) |
bool | transform (const ColorSpace *src, const ColorSpace *dest, const UT_StringHolder &looks, fpreal32 *data, int npixels, int nchannels, bool forward_transform=true) |
bool | transform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, void *src_data, void *dst_data, int width, int height, int nchannels, bool forward_transform=true) |
bool | transform (const UT_StringHolder &src, const UT_StringHolder &dest, const UT_StringHolder &looks, fpreal32 *src_data, int width, int height, int nchannels, bool forward_transform=true) |
PXL_API int | addConfigChangeCB (UT_Functor< void > callback) |
PXL_API void | removeConfigChangeCB (int id) |
Abstract interface to OpenColorIO.
PXL_API int PXL_OCIO::addConfigChangeCB | ( | UT_Functor< void > | callback | ) |
When the OCIO config is reloaded, all processor and color space pointers become invalid. You can register a callback (and remove it) to be notified of reloads.
PXL_API const UT_StringRef& PXL_OCIO::configFilePath | ( | ) |
The path and filename of the config file being used.
PXL_API void PXL_OCIO::getActiveDisplays | ( | UT_StringArray & | names | ) |
Returns the list of active displays.
PXL_API void PXL_OCIO::getActiveViews | ( | UT_StringArray & | names | ) |
Returns the list of active views.
PXL_API bool PXL_OCIO::getAllocationVars | ( | const ColorSpace * | space, |
bool & | uniform, | ||
fpreal & | min, | ||
fpreal & | max, | ||
fpreal & | offset | ||
) |
Return the allocation variable meta data about the color space.
PXL_API const char* PXL_OCIO::getColorPickingRole | ( | ) |
PXL_API const char* PXL_OCIO::getColorSpaceForDisplayView | ( | const char * | display_name, |
const char * | view_name | ||
) |
Return the colorspace defined by the view for a given display.
PXL_API void PXL_OCIO::getColorSpaces | ( | UT_StringArray & | names | ) |
Returns a list of the supported color spaces.
PXL_API const char* PXL_OCIO::getCompLogRole | ( | ) |
PXL_API const char* PXL_OCIO::getDataRole | ( | ) |
PXL_API const char* PXL_OCIO::getDefaultDisplay | ( | ) |
Returns the current color space name.
PXL_API const char* PXL_OCIO::getDefaultRole | ( | ) |
PXL_API const char* PXL_OCIO::getDefaultView | ( | const char * | display = NULL | ) |
Returns the current color space name.
PXL_API const char* PXL_OCIO::getDescription | ( | const ColorSpace * | space | ) |
Return the description of the color space.
PXL_API bool PXL_OCIO::getInfo | ( | const ColorSpace * | space, |
UT_Options & | info | ||
) |
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
PXL_API const UT_StringHolder& PXL_OCIO::getLinearRec709ColorSpace | ( | ) |
PXL_API void PXL_OCIO::getLooks | ( | UT_StringArray & | looks | ) |
Returns a list of looks (color transforms)
PXL_API const char* PXL_OCIO::getLooksForDisplayView | ( | const char * | display_name, |
const char * | view_name | ||
) |
Return the looks attached to the view for a given display.
PXL_API const char* PXL_OCIO::getName | ( | const ColorSpace * | space | ) |
Return the name of the color space.
PXL_API const UT_StringHolder& PXL_OCIO::getRawColorSpace | ( | ) |
PXL_API const UT_StringHolder& PXL_OCIO::getRec709ColorSpace | ( | ) |
PXL_API const char* PXL_OCIO::getReferenceRole | ( | ) |
PXL_API void PXL_OCIO::getRoles | ( | UT_StringArray & | names | ) |
Returns a list of the supported roles.
PXL_API const char* PXL_OCIO::getSceneLinearRole | ( | ) |
PXL_API const UT_StringHolder& PXL_OCIO::getsRGBColorSpace | ( | ) |
PXL_API UT_StringHolder PXL_OCIO::getsRGBColorSpace | ( | const char * | display | ) |
PXL_API const char* PXL_OCIO::getTransformNameForDisplayView | ( | const char * | display_name, |
const char * | view_name | ||
) |
Return the colorspace defined by the view for a given display.
PXL_API bool PXL_OCIO::getViewsForDisplay | ( | const char * | display, |
UT_StringArray & | view_names | ||
) |
Return the list of views for a given display.
|
inline |
Does the transform from src->dest with applied looks require a 3D LUT.
Definition at line 254 of file PXL_OCIO.h.
|
inline |
Definition at line 271 of file PXL_OCIO.h.
PXL_API bool PXL_OCIO::isFloatPointSpace | ( | const ColorSpace * | space, |
bool & | fp | ||
) |
Set 'fp' to true if the color space is defined for FP, false for uint.
|
inline |
Valid transform, but does nothing. This is true if the src and dest color spaces are equal, but also handles special cases like transforming from "raw" spaces. So, this is more correct than an operator==() or isEqual() method.
Definition at line 235 of file PXL_OCIO.h.
PXL_API bool PXL_OCIO::isOCIOEnvSet | ( | bool | check_for_active_vars = true | ) |
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
.
PXL_API bool PXL_OCIO::isSceneLinear | ( | const ColorSpace * | s | ) |
Test whether a color space is one of the well-known color spaces
PXL_API bool PXL_OCIO::issRGB | ( | const ColorSpace * | s | ) |
Test whether a color space is one of the well-known color spaces
|
inline |
Is there a transform from src->dest with the applied looks.
Definition at line 208 of file PXL_OCIO.h.
|
inline |
Is there a transform from src->dest with the applied looks.
Definition at line 223 of file PXL_OCIO.h.
PXL_API PHandle PXL_OCIO::lookupProcessor | ( | const UT_StringHolder & | src, |
const UT_StringHolder & | dest, | ||
const UT_StringHolder & | looks, | ||
bool | forward_transform = true |
||
) |
Lookup processors which can be used to transform colors efficiently.
PXL_API PHandle PXL_OCIO::lookupProcessor | ( | const ColorSpace * | src, |
const ColorSpace * | dest, | ||
const UT_StringHolder & | looks, | ||
bool | forward_transform = true |
||
) |
Lookup processors which can be used to transform colors efficiently.
PXL_API const ColorSpace* PXL_OCIO::lookupSpace | ( | const UT_StringHolder & | name | ) |
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.
PXL_API PHandle PXL_OCIO::lookupViewProcessor | ( | const UT_StringHolder & | src, |
const UT_StringHolder & | display, | ||
const UT_StringHolder & | view, | ||
bool | forward_transform | ||
) |
Lookup processors which can be used to transform colors efficiently.
PXL_API PHandle PXL_OCIO::lookupViewProcessor | ( | const UT_StringHolder & | view_transform, |
bool | forward_transform | ||
) |
Lookup processors which can be used to transform colors efficiently.
PXL_API UT_StringHolder PXL_OCIO::parseColorSpaceFromHolder | ( | const UT_StringHolder & | s | ) |
PXL_API const char* PXL_OCIO::parseColorSpaceFromString | ( | const char * | string | ) |
Guess at the colorspace using the rightmost colorspace found, or NULL if none are found.
PXL_API const UT_StringHolder& PXL_OCIO::pxlImageColorSpace | ( | PXL_ColorSpace | cs, |
const UT_StringHolder & | ocioname | ||
) |
Convert a PXL_ColorSpace to roughly the OCIO equivalent.
PXL_API PXL_ColorSpace PXL_OCIO::pxlImageColorSpace | ( | const ColorSpace * | cs, |
UT_StringHolder & | name | ||
) |
Get the best approximation for the PXL_ColorSpace from the OCIO color space. The name
will be filled out with the full name of the space. The return value will be PXL_CS_OCIO, unless it's a well known space.
PXL_API PXL_ColorSpace PXL_OCIO::pxlImageColorSpace | ( | const UT_StringHolder & | csname, |
UT_StringHolder & | name | ||
) |
Get the best approximation for the PXL_ColorSpace from the OCIO color space. The name
will be filled out with the full name of the space. The return value will be PXL_CS_OCIO, unless it's a well known space.
When the OCIO config is reloaded, all processor and color space pointers become invalid. You can register a callback (and remove it) to be notified of reloads.
PXL_API bool PXL_OCIO::transform | ( | const PHandle & | processor, |
fpreal32 * | data, | ||
int | npixels, | ||
int | nchannels | ||
) |
Transform pixels by a processor.
PXL_API bool PXL_OCIO::transform | ( | const PHandle & | processor, |
void * | src, | ||
void * | dst, | ||
int | width, | ||
int | height, | ||
int | nchannels | ||
) |
PXL_API bool PXL_OCIO::transform | ( | const PHandle & | processor, |
fpreal32 * | src, | ||
int | width, | ||
int | height, | ||
int | nchannels | ||
) |
|
inline |
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)
Definition at line 281 of file PXL_OCIO.h.
|
inline |
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)
Definition at line 290 of file PXL_OCIO.h.
|
inline |
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)
Definition at line 300 of file PXL_OCIO.h.
|
inline |
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)
Definition at line 310 of file PXL_OCIO.h.
|
inline |
Transform with the given view transform, which must exist in the config.
Definition at line 334 of file PXL_OCIO.h.
|
inline |
Transform from a colorspace to a display/view, including looks.
Definition at line 323 of file PXL_OCIO.h.
PXL_API const UT_Options& PXL_OCIO::viewingRule | ( | const UT_StringRef & | name | ) |
Lookup a viewing rule by the name.
PXL_API void PXL_OCIO::viewingRuleNames | ( | UT_StringArray & | names | ) |
Get the viewing rule names.