..
  SPDX-License-Identifier: CC-BY-4.0
  Copyright Contributors to the OpenColorIO Project.
  Do not edit! This file was automatically generated by share/docs/frozendoc.py.

.. py:class:: MatrixTransform
   :module: PyOpenColorIO

   Represents an MX+B Matrix transform.

   .. note::
      For singular matrices, an inverse direction will throw an exception during finalization.


   .. py:method:: MatrixTransform.Fit(oldMin: List[float[4]] = [0.0, 0.0, 0.0, 0.0], oldMax: List[float[4]] = [1.0, 1.0, 1.0, 1.0], newMin: List[float[4]] = [0.0, 0.0, 0.0, 0.0], newMax: List[float[4]] = [1.0, 1.0, 1.0, 1.0]) -> PyOpenColorIO.MatrixTransform
      :module: PyOpenColorIO
      :staticmethod:

      **Convenience functions**

      Build the matrix and offset corresponding to higher-level concepts.

      .. note::
         These can throw an exception if for any component `oldmin == oldmax. (divide by 0)`


   .. py:method:: MatrixTransform.Identity() -> PyOpenColorIO.MatrixTransform
      :module: PyOpenColorIO
      :staticmethod:


   .. py:method:: MatrixTransform.Sat(sat: float, lumaCoef: List[float[3]]) -> PyOpenColorIO.MatrixTransform
      :module: PyOpenColorIO
      :staticmethod:


   .. py:method:: MatrixTransform.Scale(scale: List[float[4]]) -> PyOpenColorIO.MatrixTransform
      :module: PyOpenColorIO
      :staticmethod:


   .. py:method:: MatrixTransform.View(channelHot: List[int[4]], lumaCoef: List[float[3]]) -> PyOpenColorIO.MatrixTransform
      :module: PyOpenColorIO
      :staticmethod:


   .. py:method:: MatrixTransform.__init__(*args, **kwargs)
      :module: PyOpenColorIO

      Overloaded function.

      1. __init__(self: PyOpenColorIO.MatrixTransform) -> None

      2. __init__(self: PyOpenColorIO.MatrixTransform, matrix: List[float[16]] = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0], offset: List[float[4]] = [0.0, 0.0, 0.0, 0.0], direction: PyOpenColorIO.TransformDirection = <TransformDirection.TRANSFORM_DIR_FORWARD: 0>) -> None


   .. py:method:: MatrixTransform.equals(self: PyOpenColorIO.MatrixTransform, other: PyOpenColorIO.MatrixTransform) -> bool
      :module: PyOpenColorIO

      Checks if this exactly equals other.


   .. py:method:: MatrixTransform.getDirection(self: PyOpenColorIO.Transform) -> PyOpenColorIO.TransformDirection
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.getFileInputBitDepth(self: PyOpenColorIO.MatrixTransform) -> PyOpenColorIO.BitDepth
      :module: PyOpenColorIO

      Get the bit-depths associated with the matrix values read from a file or set the bit-depths of values to be written to a file (for file formats such as CLF that support multiple bit-depths).

      In a format such as CLF, the matrix values are scaled to take pixels at the specified inBitDepth to pixels at the specified outBitDepth. This complicates the interpretation of the matrix values and so this object always holds normalized values and scaling is done on the way from or to file formats such as CLF.


   .. py:method:: MatrixTransform.getFileOutputBitDepth(self: PyOpenColorIO.MatrixTransform) -> PyOpenColorIO.BitDepth
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.getFormatMetadata(self: PyOpenColorIO.MatrixTransform) -> PyOpenColorIO.FormatMetadata
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.getMatrix(self: PyOpenColorIO.MatrixTransform) -> List[float[16]]
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.getOffset(self: PyOpenColorIO.MatrixTransform) -> List[float[4]]
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.getTransformType(self: PyOpenColorIO.Transform) -> PyOpenColorIO.TransformType
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.setDirection(self: PyOpenColorIO.Transform, direction: PyOpenColorIO.TransformDirection) -> None
      :module: PyOpenColorIO

      Note that this only affects the evaluation and not the values stored in the object.


   .. py:method:: MatrixTransform.setFileInputBitDepth(self: PyOpenColorIO.MatrixTransform, bitDepth: PyOpenColorIO.BitDepth) -> None
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.setFileOutputBitDepth(self: PyOpenColorIO.MatrixTransform, bitDepth: PyOpenColorIO.BitDepth) -> None
      :module: PyOpenColorIO


   .. py:method:: MatrixTransform.setMatrix(self: PyOpenColorIO.MatrixTransform, matrix: List[float[16]]) -> None
      :module: PyOpenColorIO

      Get or set the values of a Matrix. Expects 16 values, where the first four are the coefficients to generate the R output channel from R, G, B, A input channels.

      The Matrix values are always for the "forward" Matrix, regardless of how the transform direction is set.

      These values are normalized relative to what may be stored in file formats such as CLF. For example in a CLF file using a "32f" input depth and "10i" output depth, a value of 1023 in the file is normalized to 1.0. The values here are unclamped and may extend outside [0,1].


   .. py:method:: MatrixTransform.setOffset(self: PyOpenColorIO.MatrixTransform, offset: List[float[4]]) -> None
      :module: PyOpenColorIO

      Get or set the R, G, B, A offsets to be applied after the matrix.

      These values are normalized relative to what may be stored in file formats such as CLF. For example, in a CLF file using a "10i" output depth, a value of 1023 in the file is normalized to 1.0. The values here are unclamped and may extend outside [0,1].


   .. py:method:: MatrixTransform.validate(self: PyOpenColorIO.Transform) -> None
      :module: PyOpenColorIO

      Will throw if data is not valid.

