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

#include <OpenColorIO.h>

Public Member Functions

ColorSpaceSetRcPtr createEditableCopy () const
 Create a set containing a copy of all the color spaces. More...
 
bool operator== (const ColorSpaceSet &css) const
 Return true if the two sets are equal. More...
 
bool operator!= (const ColorSpaceSet &css) const
 Return true if the two sets are different. More...
 
int getNumColorSpaces () const
 Return the number of color spaces. More...
 
const char * getColorSpaceNameByIndex (int index) const
 
ConstColorSpaceRcPtr getColorSpaceByIndex (int index) const
 
ConstColorSpaceRcPtr getColorSpace (const char *name) const
 
int getColorSpaceIndex (const char *name) const
 
bool hasColorSpace (const char *name) const
 
void addColorSpace (const ConstColorSpaceRcPtr &cs)
 Add color space(s). More...
 
void addColorSpaces (const ConstColorSpaceSetRcPtr &cs)
 
void removeColorSpace (const char *name)
 Remove color space(s) using color space names (i.e. no role name). More...
 
void removeColorSpaces (const ConstColorSpaceSetRcPtr &cs)
 
void clearColorSpaces ()
 Clear all color spaces. More...
 
 ~ColorSpaceSet ()
 Do not use (needed only for pybind11). More...
 

Static Public Member Functions

static ColorSpaceSetRcPtr Create ()
 Create an empty set of color spaces. More...
 

Detailed Description

The ColorSpaceSet is a set of color spaces (i.e. no color space duplication) which could be the result of Config::getColorSpaces or built from scratch.

Note
The color spaces are decoupled from the config ones, i.e., any changes to the set itself or to its color spaces do not affect the original color spaces from the configuration. If needed, use Config::addColorSpace to update the configuration.

Definition at line 1933 of file OpenColorIO.h.

Constructor & Destructor Documentation

OCIO_NAMESPACE::ColorSpaceSet::~ColorSpaceSet ( )

Do not use (needed only for pybind11).

Member Function Documentation

void OCIO_NAMESPACE::ColorSpaceSet::addColorSpace ( const ConstColorSpaceRcPtr cs)

Add color space(s).

Note
If another color space is already registered with the same name, this will overwrite it. This stores a copy of the specified color space(s). Throws if one of the aliases is already assigned as a name or alias to an existing color space.
void OCIO_NAMESPACE::ColorSpaceSet::addColorSpaces ( const ConstColorSpaceSetRcPtr cs)
void OCIO_NAMESPACE::ColorSpaceSet::clearColorSpaces ( )

Clear all color spaces.

static ColorSpaceSetRcPtr OCIO_NAMESPACE::ColorSpaceSet::Create ( )
static

Create an empty set of color spaces.

ColorSpaceSetRcPtr OCIO_NAMESPACE::ColorSpaceSet::createEditableCopy ( ) const

Create a set containing a copy of all the color spaces.

ConstColorSpaceRcPtr OCIO_NAMESPACE::ColorSpaceSet::getColorSpace ( const char *  name) const
Note
Only accepts color space names (i.e. no role name).

Will return null if the name is not found.

ConstColorSpaceRcPtr OCIO_NAMESPACE::ColorSpaceSet::getColorSpaceByIndex ( int  index) const

Return the color space using its index. This will be empty if an invalid index is specified.

int OCIO_NAMESPACE::ColorSpaceSet::getColorSpaceIndex ( const char *  name) const

Will return -1 if the name is not found.

Note
Only accepts color space names (i.e. no role name).
const char* OCIO_NAMESPACE::ColorSpaceSet::getColorSpaceNameByIndex ( int  index) const

Return the color space name using its index. This will be null if an invalid index is specified.

int OCIO_NAMESPACE::ColorSpaceSet::getNumColorSpaces ( ) const

Return the number of color spaces.

bool OCIO_NAMESPACE::ColorSpaceSet::hasColorSpace ( const char *  name) const
Note
Only accepts color space names (i.e. no role name)
Parameters
name
Returns
true
false

Return true if the two sets are different.

bool OCIO_NAMESPACE::ColorSpaceSet::operator== ( const ColorSpaceSet css) const

Return true if the two sets are equal.

Note
The comparison is done on the color space names (not a deep comparison).
void OCIO_NAMESPACE::ColorSpaceSet::removeColorSpace ( const char *  name)

Remove color space(s) using color space names (i.e. no role name).

Note
The removal of a missing color space does nothing.
void OCIO_NAMESPACE::ColorSpaceSet::removeColorSpaces ( const ConstColorSpaceSetRcPtr cs)

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