colour.io.LUT_to_LUT¶
-
colour.io.
LUT_to_LUT
(LUT, cls, force_conversion=False, **kwargs)[source]¶ Converts given LUT to given
cls
class instance.Parameters: Other Parameters: - interpolator (object, optional) – Interpolator class type to use as interpolating function.
- interpolator_args (dict_like, optional) – Arguments to use when instantiating the interpolating function.
- size (int, optional) – Expected table size in case of an upcast to or a downcast from a
LUT3D
class instance. - channel_weights (array_like, optional) – Channel weights in case of a downcast from a
LUT3x1D
orLUT3D
class instance.
Returns: Converted LUT class instance.
Return type: Warning
Some conversions are destructive and raise a
ValueError
exception by default.Raises: ValueError
– If the conversion is destructive.Examples
>>> print(LUT_to_LUT(LUT1D(), LUT3D, force_conversion=True)) LUT3D - Unity 10 - Converted 1D to 3D ------------------------------------- <BLANKLINE> Dimensions : 3 Domain : [[ 0. 0. 0.] [ 1. 1. 1.]] Size : (33, 33, 33, 3) >>> print(LUT_to_LUT(LUT3x1D(), LUT1D, force_conversion=True)) LUT1D - Unity 10 - Converted 3x1D to 1D --------------------------------------- <BLANKLINE> Dimensions : 1 Domain : [ 0. 1.] Size : (10,) >>> print(LUT_to_LUT(LUT3D(), LUT1D, force_conversion=True)) LUT1D - Unity 33 - Converted 3D to 1D ------------------------------------- <BLANKLINE> Dimensions : 1 Domain : [ 0. 1.] Size : (10,)