OcioProcessorInterface Class Reference

#include <gfx_image_ocio.h>

Detailed Description

This class allows to deal with color profiles. Color profiles are used to map colors from a given color space (e.g. image color space) into a destination color space (e.g. calibrated monitor). @MAXON_ANNOTATION{nullimpl=true,dependencies=false} Private.

Public Member Functions

MAXON_METHOD Bool IsEqual (const OcioProcessorInterface *other) const
 
MAXON_METHOD Bool SupportsReverse () const
 
MAXON_METHOD Result< void > ConvertPixels (Float32 *pixelBuffer, Int inc, Int pixelCnt, Bool reverse) const
 
MAXON_METHOD Result< void > ConvertPixels (UChar *pixelBuffer, Int inc, Int pixelCnt, Bool reverse) const
 
MAXON_METHOD Result< void > ConvertPixels (const Float32 *srcPixelBuffer, Float32 *dstPixelBuffer, Int inc, Int pixelCnt, Bool reverse) const
 
MAXON_METHOD Color32 TransformColor (const Color32 &color) const
 
MAXON_METHOD Result< ForwardRef< ColorProfileGpuHandlerRef > > GetGpuHandler () const
 
Block< const CStringGetColorSpaces () const
 

Static Public Member Functions

static MAXON_METHOD Result< OcioProcessor > OpenLUTFromFile (const Url &fn, Bool tryToCreateReverse)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (OcioProcessorInterface, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE, "net.maxon.image.interface.ocioprocessor")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( OcioProcessorInterface  ,
MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE  ,
"net.maxon.image.interface.ocioprocessor"   
)
private

◆ IsEqual()

MAXON_METHOD Bool IsEqual ( const OcioProcessorInterface other) const

◆ OpenLUTFromFile()

static MAXON_METHOD Result<OcioProcessor> OpenLUTFromFile ( const Url fn,
Bool  tryToCreateReverse 
)
static

Opens a LUT from a Url.

Parameters
[in]fnUrl to load.
[in]tryToCreateReverseIf true then the loader tries to create the reverse direction (not all luts provide the reverse operation).
Returns
OK on success.

◆ SupportsReverse()

MAXON_METHOD Bool SupportsReverse ( ) const

Returns true if the OcioProcessor supports the reverse operation. If this is given ConvertPixels can be called with reverse = true.

◆ ConvertPixels() [1/3]

MAXON_METHOD Result<void> ConvertPixels ( Float32 pixelBuffer,
Int  inc,
Int  pixelCnt,
Bool  reverse 
) const

ConvertPixels description.

Parameters
[in]pixelBufferRGB values with Float32 buffer to convert.
[in]incIncrement in bytes from one pixel to the next.
[in]pixelCntNumber of pixels to convert.
Returns
OK on success.

◆ ConvertPixels() [2/3]

MAXON_METHOD Result<void> ConvertPixels ( UChar pixelBuffer,
Int  inc,
Int  pixelCnt,
Bool  reverse 
) const

◆ ConvertPixels() [3/3]

MAXON_METHOD Result<void> ConvertPixels ( const Float32 srcPixelBuffer,
Float32 dstPixelBuffer,
Int  inc,
Int  pixelCnt,
Bool  reverse 
) const

◆ TransformColor()

MAXON_METHOD Color32 TransformColor ( const Color32 color) const

Transforms a color according to the loaded LUT.

Parameters
[in]colorThe color to transform.
Returns
The resulting color after application of the LUT transform.

◆ GetGpuHandler()

MAXON_METHOD Result<ForwardRef<ColorProfileGpuHandlerRef> > GetGpuHandler ( ) const

Gets the GPU handler for the processor.

Returns
The GPU handler.

◆ GetColorSpaces()

Block<const CString> GetColorSpaces ( ) const

Gets the color spaces that are used in this processor.

Returns
The color spaces.