colour.io.read_LUT_IridasCube#
- colour.io.read_LUT_IridasCube(path: str | PathLike) LUT3x1D | LUT3D[source]#
Read the specified Iridas .cube LUT file.
Parse an Iridas .cube Look-Up Table file and return the corresponding LUT object. The function automatically detects whether the file contains a 3x1D or 3D LUT based on the presence of LUT_1D_SIZE or LUT_3D_SIZE declarations.
- Parameters:
- Returns:
LUT3x1DorLUT3Dclass instance.- Return type:
LUT3x1DorLUT3D
References
Examples
Reading a 3x1D Iridas .cube LUT:
>>> import os >>> path = os.path.join( ... os.path.dirname(__file__), ... "tests", ... "resources", ... "iridas_cube", ... "ACES_Proxy_10_to_ACES.cube", ... ) >>> print(read_LUT_IridasCube(path)) LUT3x1D - ACES Proxy 10 to ACES ------------------------------- Dimensions : 2 Domain : [[ 0. 0. 0.] [ 1. 1. 1.]] Size : (32, 3)
Reading a 3D Iridas .cube LUT:
>>> path = os.path.join( ... os.path.dirname(__file__), ... "tests", ... "resources", ... "iridas_cube", ... "Colour_Correct.cube", ... ) >>> print(read_LUT_IridasCube(path)) LUT3D - Generated by Foundry::LUT --------------------------------- Dimensions : 3 Domain : [[ 0. 0. 0.] [ 1. 1. 1.]] Size : (4, 4, 4, 3)
Reading a 3D Iridas .cube LUT with comments:
>>> path = os.path.join( ... os.path.dirname(__file__), ... "tests", ... "resources", ... "iridas_cube", ... "Demo.cube", ... ) >>> print(read_LUT_IridasCube(path)) LUT3x1D - Demo -------------- Dimensions : 2 Domain : [[ 0. 0. 0.] [ 1. 2. 3.]] Size : (3, 3) Comment 01 : Comments can go anywhere