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

Represents a 1D-LUT transform. More...

#include <OpenColorTransforms.h>

+ Inheritance diagram for OCIO_NAMESPACE::Lut1DTransform:

Public Member Functions

TransformType getTransformType () const noexceptoverride
virtual BitDepth getFileOutputBitDepth () const noexcept=0
virtual void setFileOutputBitDepth (BitDepth bitDepth) noexcept=0
virtual const FormatMetadatagetFormatMetadata () const noexcept=0
virtual FormatMetadatagetFormatMetadata () noexcept=0
virtual bool equals (const Lut1DTransform &other) const noexcept=0
 Checks if this exactly equals other. More...
virtual unsigned long getLength () const =0
virtual void setLength (unsigned long length)=0
virtual void getValue (unsigned long index, float &r, float &g, float &b) const =0
virtual void setValue (unsigned long index, float r, float g, float b)=0
virtual bool getInputHalfDomain () const noexcept=0
virtual void setInputHalfDomain (bool isHalfDomain) noexcept=0
virtual bool getOutputRawHalfs () const noexcept=0
virtual void setOutputRawHalfs (bool isRawHalfs) noexcept=0
virtual Lut1DHueAdjust getHueAdjust () const noexcept=0
virtual void setHueAdjust (Lut1DHueAdjust algo)=0
virtual Interpolation getInterpolation () const =0
virtual void setInterpolation (Interpolation algo)=0
 Lut1DTransform (const Lut1DTransform &)=delete
Lut1DTransformoperator= (const Lut1DTransform &)=delete
virtual ~Lut1DTransform ()=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 Lut1DTransformRcPtr Create ()
 Create an identity 1D-LUT of length two. More...
static Lut1DTransformRcPtr Create (unsigned long length, bool isHalfDomain)

Protected Member Functions

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

Detailed Description

Represents a 1D-LUT transform.

Definition at line 1592 of file OpenColorTransforms.h.

Constructor & Destructor Documentation

OCIO_NAMESPACE::Lut1DTransform::Lut1DTransform ( const Lut1DTransform )
virtual OCIO_NAMESPACE::Lut1DTransform::~Lut1DTransform ( )

Do not use (needed only for pybind11).

OCIO_NAMESPACE::Lut1DTransform::Lut1DTransform ( )

Member Function Documentation

static Lut1DTransformRcPtr OCIO_NAMESPACE::Lut1DTransform::Create ( )

Create an identity 1D-LUT of length two.

static Lut1DTransformRcPtr OCIO_NAMESPACE::Lut1DTransform::Create ( unsigned long  length,
bool  isHalfDomain 

Create an identity 1D-LUT with specific length and half-domain setting. Will throw for lengths longer than 1024x1024.

virtual bool OCIO_NAMESPACE::Lut1DTransform::equals ( const Lut1DTransform other) const
pure virtualnoexcept

Checks if this exactly equals other.

virtual BitDepth OCIO_NAMESPACE::Lut1DTransform::getFileOutputBitDepth ( ) const
pure virtualnoexcept
virtual const FormatMetadata& OCIO_NAMESPACE::Lut1DTransform::getFormatMetadata ( ) const
pure virtualnoexcept
virtual FormatMetadata& OCIO_NAMESPACE::Lut1DTransform::getFormatMetadata ( )
pure virtualnoexcept
virtual Lut1DHueAdjust OCIO_NAMESPACE::Lut1DTransform::getHueAdjust ( ) const
pure virtualnoexcept
virtual bool OCIO_NAMESPACE::Lut1DTransform::getInputHalfDomain ( ) const
pure virtualnoexcept
virtual Interpolation OCIO_NAMESPACE::Lut1DTransform::getInterpolation ( ) const
pure virtual
virtual unsigned long OCIO_NAMESPACE::Lut1DTransform::getLength ( ) const
pure virtual
virtual bool OCIO_NAMESPACE::Lut1DTransform::getOutputRawHalfs ( ) const
pure virtualnoexcept
TransformType OCIO_NAMESPACE::Lut1DTransform::getTransformType ( ) const

Implements OCIO_NAMESPACE::Transform.

Definition at line 1605 of file OpenColorTransforms.h.

virtual void OCIO_NAMESPACE::Lut1DTransform::getValue ( unsigned long  index,
float r,
float g,
float b 
) const
pure virtual
Lut1DTransform& OCIO_NAMESPACE::Lut1DTransform::operator= ( const Lut1DTransform )
virtual void OCIO_NAMESPACE::Lut1DTransform::setFileOutputBitDepth ( BitDepth  bitDepth)
pure virtualnoexcept

Get the bit-depth associated with the LUT values read from a file or set the bit-depth of values to be written to a file (for file formats such as CLF that support multiple bit-depths). However, note that the values stored in the object are always normalized.

virtual void OCIO_NAMESPACE::Lut1DTransform::setHueAdjust ( Lut1DHueAdjust  algo)
pure virtual

The 1D-LUT transform optionally supports a hue adjustment feature that was used in some versions of ACES. This adjusts the hue of the result to approximately match the input.

virtual void OCIO_NAMESPACE::Lut1DTransform::setInputHalfDomain ( bool  isHalfDomain)
pure virtualnoexcept

In a half-domain LUT, the contents of the LUT specify the desired value of the function for each half-float value. Therefore, the length of the LUT must be 65536 entries or else validate() will throw.

virtual void OCIO_NAMESPACE::Lut1DTransform::setInterpolation ( Interpolation  algo)
pure virtual
virtual void OCIO_NAMESPACE::Lut1DTransform::setLength ( unsigned long  length)
pure virtual

Changing the length will reset the LUT to identity. Will throw for lengths longer than 1024x1024.

virtual void OCIO_NAMESPACE::Lut1DTransform::setOutputRawHalfs ( bool  isRawHalfs)
pure virtualnoexcept

Set OutputRawHalfs to true if you want to output the LUT contents as 16-bit floating point values expressed as unsigned 16-bit integers representing the equivalent bit pattern. For example, the value 1.0 would be written as the integer 15360 because it has the same bit-pattern. Note that this implies the values will be quantized to a 16-bit float. Note that this setting only controls the output formatting (where supported) and not the values for getValue/setValue. The only file formats that currently support this are CLF and CTF.

virtual void OCIO_NAMESPACE::Lut1DTransform::setValue ( unsigned long  index,
float  r,
float  g,
float  b 
pure virtual

Set the values of a LUT1D. Will throw if the index is outside of the range from 0 to (length-1).

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

These values are normalized relative to what may be stored in any given LUT files. 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].

LUTs in various file formats may only provide values for one channel where R, G, B are the same. Even in that case, you should provide three equal values to the setter.

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