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

#include <OpenColorTransforms.h>

+ Inheritance diagram for OCIO_NAMESPACE::MatrixTransform:

Public Member Functions

TransformType getTransformType () const noexceptoverride
 
virtual const FormatMetadatagetFormatMetadata () const noexcept=0
 
virtual FormatMetadatagetFormatMetadata () noexcept=0
 
virtual bool equals (const MatrixTransform &other) const noexcept=0
 Checks if this exactly equals other. More...
 
virtual void getMatrix (double *m44) const =0
 
virtual void setMatrix (const double *m44)=0
 
virtual void getOffset (double *offset4) const =0
 
virtual void setOffset (const double *offset4)=0
 
virtual BitDepth getFileInputBitDepth () const noexcept=0
 
virtual void setFileInputBitDepth (BitDepth bitDepth) noexcept=0
 
virtual BitDepth getFileOutputBitDepth () const noexcept=0
 
virtual void setFileOutputBitDepth (BitDepth bitDepth) noexcept=0
 
 MatrixTransform (const MatrixTransform &)=delete
 
MatrixTransformoperator= (const MatrixTransform &)=delete
 
virtual ~MatrixTransform ()=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 MatrixTransformRcPtr Create ()
 
static void Fit (double *m44, double *offset4, const double *oldmin4, const double *oldmax4, const double *newmin4, const double *newmax4)
 
static void Identity (double *m44, double *offset4)
 
static void Sat (double *m44, double *offset4, double sat, const double *lumaCoef3)
 
static void Scale (double *m44, double *offset4, const double *scale4)
 
static void View (double *m44, double *offset4, int *channelHot4, const double *lumaCoef3)
 

Protected Member Functions

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

Detailed Description

Represents an MX+B Matrix transform.

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

Definition at line 1779 of file OpenColorTransforms.h.

Constructor & Destructor Documentation

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

Do not use (needed only for pybind11).

OCIO_NAMESPACE::MatrixTransform::MatrixTransform ( )
protecteddefault

Member Function Documentation

static MatrixTransformRcPtr OCIO_NAMESPACE::MatrixTransform::Create ( )
static
virtual bool OCIO_NAMESPACE::MatrixTransform::equals ( const MatrixTransform other) const
pure virtualnoexcept

Checks if this exactly equals other.

static void OCIO_NAMESPACE::MatrixTransform::Fit ( double *  m44,
double *  offset4,
const double *  oldmin4,
const double *  oldmax4,
const double *  newmin4,
const double *  newmax4 
)
static

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)
virtual BitDepth OCIO_NAMESPACE::MatrixTransform::getFileInputBitDepth ( ) const
pure virtualnoexcept

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.

virtual BitDepth OCIO_NAMESPACE::MatrixTransform::getFileOutputBitDepth ( ) const
pure virtualnoexcept
virtual const FormatMetadata& OCIO_NAMESPACE::MatrixTransform::getFormatMetadata ( ) const
pure virtualnoexcept
virtual FormatMetadata& OCIO_NAMESPACE::MatrixTransform::getFormatMetadata ( )
pure virtualnoexcept
virtual void OCIO_NAMESPACE::MatrixTransform::getMatrix ( double *  m44) const
pure virtual
virtual void OCIO_NAMESPACE::MatrixTransform::getOffset ( double *  offset4) const
pure virtual
TransformType OCIO_NAMESPACE::MatrixTransform::getTransformType ( ) const
inlineoverridevirtualnoexcept

Implements OCIO_NAMESPACE::Transform.

Definition at line 1784 of file OpenColorTransforms.h.

static void OCIO_NAMESPACE::MatrixTransform::Identity ( double *  m44,
double *  offset4 
)
static
MatrixTransform& OCIO_NAMESPACE::MatrixTransform::operator= ( const MatrixTransform )
delete
static void OCIO_NAMESPACE::MatrixTransform::Sat ( double *  m44,
double *  offset4,
double  sat,
const double *  lumaCoef3 
)
static
static void OCIO_NAMESPACE::MatrixTransform::Scale ( double *  m44,
double *  offset4,
const double *  scale4 
)
static
virtual void OCIO_NAMESPACE::MatrixTransform::setFileInputBitDepth ( BitDepth  bitDepth)
pure virtualnoexcept
virtual void OCIO_NAMESPACE::MatrixTransform::setFileOutputBitDepth ( BitDepth  bitDepth)
pure virtualnoexcept
virtual void OCIO_NAMESPACE::MatrixTransform::setMatrix ( const double *  m44)
pure virtual

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].

virtual void OCIO_NAMESPACE::MatrixTransform::setOffset ( const double *  offset4)
pure virtual

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].

static void OCIO_NAMESPACE::MatrixTransform::View ( double *  m44,
double *  offset4,
int channelHot4,
const double *  lumaCoef3 
)
static

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