OpenColorIO

Open Source Color Management

OpenColorIO 1.0.6 documentation

Python: CDLTransform

Examples of Use

import PyOpenColorIO as OCIO

cdl = OCIO.CDLTransform()

# Set the slope, offset, power, and saturation for each channel.
cdl.setSOP([, , , , , , , , ])
cdl.setSat([, , ])

cdl.getSatLumaCoefs()

Description

Used to define a transform based on a color decision list (CDL), based on the 9 numbers defined in SOP (slope, offset, and power) and Sat (saturation). Each element in SOP and Sat are characterized by three floats (for RGB).
Config.setSlope(pyData)

Sets the slope (‘S’ part of SOP) in CDLTransform.

Parameters:pyData (object) –
Config.setOffset(pyData)

Sets the offset (‘O’ part of SOP) in CDLTransform.

Parameters:pyData (object) – list of three floats
Config.setPower(pyData)

Sets the power (‘P’ part of SOP) in CDLTransform.

Parameters:pyData (object) – list of three floats
Config.setSOP(pyData)

Sets SOP in CDLTransform.

Parameters:pyData (object) – list of nine floats
Config.setSAT(pyData)

Sets SAT (saturation) in CDLTransform.

Parameters:pyData (float) – saturation
Config.getSatLumaCoefs(pyData)

Returns the SAT (saturation) and luma coefficients in CDLTransform.

Returns:saturation and luma coefficients
Return type:list of floats
Config.getID()

Returns the ID from CDLTransform.

Returns:ID
Return type:string
Config.setID(str)

Sets the ID in CDLTransform.

Parameters:str (string) – ID
Config.getDescription()

Returns the description of CDLTransform.

Returns:description
Return type:string
Config.setDescription(str)

Sets the description of CDLTransform.

Parameters:str (string) – description