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

An implementation of the ASC Color Decision List (CDL), based on the ASC v1.2 specification. More...

#include <OpenColorTransforms.h>

+ Inheritance diagram for OCIO_NAMESPACE::CDLTransform:

Public Member Functions

TransformType getTransformType () const noexceptoverride
 
virtual FormatMetadatagetFormatMetadata () noexcept=0
 
virtual const FormatMetadatagetFormatMetadata () const noexcept=0
 
virtual bool equals (const CDLTransform &other) const noexcept=0
 
virtual CDLStyle getStyle () const =0
 
virtual void setStyle (CDLStyle style)=0
 
virtual void getSlope (double *rgb) const =0
 
virtual void setSlope (const double *rgb)=0
 
virtual void getOffset (double *rgb) const =0
 
virtual void setOffset (const double *rgb)=0
 
virtual void getPower (double *rgb) const =0
 
virtual void setPower (const double *rgb)=0
 
virtual void getSOP (double *vec9) const =0
 
virtual void setSOP (const double *vec9)=0
 
virtual double getSat () const =0
 
virtual void setSat (double sat)=0
 
virtual void getSatLumaCoefs (double *rgb) const =0
 These are hard-coded, by spec, to r709. More...
 
virtual const char * getID () const =0
 
virtual void setID (const char *id)=0
 
virtual const char * getFirstSOPDescription () const =0
 
virtual void setFirstSOPDescription (const char *description)=0
 
 CDLTransform (const CDLTransform &)=delete
 
CDLTransformoperator= (const CDLTransform &)=delete
 
virtual ~CDLTransform ()=default
 Do not use (needed only for pybind11). More...
 
- Public Member Functions inherited from OCIO_NAMESPACE::Transform
virtual TransformRcPtr createEditableCopy () const =0
 
virtual TransformDirection getDirection () const noexcept=0
 
virtual void setDirection (TransformDirection dir) noexcept=0
 Note that this only affects the evaluation and not the values stored in the object. More...
 
virtual void validate () const
 Will throw if data is not valid. More...
 
 Transform (const Transform &)=delete
 
Transformoperator= (const Transform &)=delete
 
virtual ~Transform ()=default
 Do not use (needed only for pybind11). More...
 

Static Public Member Functions

static CDLTransformRcPtr Create ()
 
static CDLTransformRcPtr CreateFromFile (const char *src, const char *cccid)
 Load the CDL from the src .cdl, .cc, or .ccc file. More...
 
static GroupTransformRcPtr CreateGroupFromFile (const char *src)
 Load all of the CDLs in a .cdl or .ccc file into a single GroupTransform. More...
 

Protected Member Functions

 CDLTransform ()=default
 
- Protected Member Functions inherited from OCIO_NAMESPACE::Transform
 Transform ()=default
 

Detailed Description

An implementation of the ASC Color Decision List (CDL), based on the ASC v1.2 specification.

ASC_SOP

Slope, offset, power:: out = clamp( (in * slope) + offset ) ^ power

Note
‚Äč If the config version is 1, negative values are clamped if the power is not 1.0. For config version 2 and higher, the negative handling is controlled by the CDL style.

Definition at line 244 of file OpenColorTransforms.h.

Constructor & Destructor Documentation

OCIO_NAMESPACE::CDLTransform::CDLTransform ( const CDLTransform )
delete
virtual OCIO_NAMESPACE::CDLTransform::~CDLTransform ( )
virtualdefault

Do not use (needed only for pybind11).

OCIO_NAMESPACE::CDLTransform::CDLTransform ( )
protecteddefault

Member Function Documentation

static CDLTransformRcPtr OCIO_NAMESPACE::CDLTransform::Create ( )
static
static CDLTransformRcPtr OCIO_NAMESPACE::CDLTransform::CreateFromFile ( const char *  src,
const char *  cccid 
)
static

Load the CDL from the src .cdl, .cc, or .ccc file.

Note
The cccid can be the ID of a CDL or the index of the CDL (as string). If cccid is NULL or empty the first CDL is returned. The cccid is case-sensitive. The src must be an absolute path reference, no relative directory or envvar resolution is performed. Throws if file does not contain any CDL or if the specified cccid is not found.
static GroupTransformRcPtr OCIO_NAMESPACE::CDLTransform::CreateGroupFromFile ( const char *  src)
static

Load all of the CDLs in a .cdl or .ccc file into a single GroupTransform.

Note
This may be useful as a quicker way for applications to check the contents of each of the CDLs. The src must be an absolute path reference, no relative directory or envvar resolution is performed.
virtual bool OCIO_NAMESPACE::CDLTransform::equals ( const CDLTransform other) const
pure virtualnoexcept
virtual const char* OCIO_NAMESPACE::CDLTransform::getFirstSOPDescription ( ) const
pure virtual
virtual FormatMetadata& OCIO_NAMESPACE::CDLTransform::getFormatMetadata ( )
pure virtualnoexcept
virtual const FormatMetadata& OCIO_NAMESPACE::CDLTransform::getFormatMetadata ( ) const
pure virtualnoexcept
virtual const char* OCIO_NAMESPACE::CDLTransform::getID ( ) const
pure virtual

The get/setID methods are now deprecated. The preferred way of interacting with the ID is now via the transform's formatMetadata.

virtual void OCIO_NAMESPACE::CDLTransform::getOffset ( double *  rgb) const
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::getPower ( double *  rgb) const
pure virtual
virtual double OCIO_NAMESPACE::CDLTransform::getSat ( ) const
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::getSatLumaCoefs ( double *  rgb) const
pure virtual

These are hard-coded, by spec, to r709.

virtual void OCIO_NAMESPACE::CDLTransform::getSlope ( double *  rgb) const
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::getSOP ( double *  vec9) const
pure virtual
virtual CDLStyle OCIO_NAMESPACE::CDLTransform::getStyle ( ) const
pure virtual
TransformType OCIO_NAMESPACE::CDLTransform::getTransformType ( ) const
inlineoverridevirtualnoexcept

Implements OCIO_NAMESPACE::Transform.

Definition at line 270 of file OpenColorTransforms.h.

CDLTransform& OCIO_NAMESPACE::CDLTransform::operator= ( const CDLTransform )
delete
virtual void OCIO_NAMESPACE::CDLTransform::setFirstSOPDescription ( const char *  description)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setID ( const char *  id)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setOffset ( const double *  rgb)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setPower ( const double *  rgb)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setSat ( double  sat)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setSlope ( const double *  rgb)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setSOP ( const double *  vec9)
pure virtual
virtual void OCIO_NAMESPACE::CDLTransform::setStyle ( CDLStyle  style)
pure virtual

Use CDL_ASC to clamp values to [0,1] per the ASC spec. Use NO_CLAMP to never clamp values (regardless of whether power is 1.0). The NO_CLAMP option passes negatives through unchanged (like the NEGATIVE_PASS_THRU style of ExponentTransform). The default style is CDL_NO_CLAMP.


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