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

#include <OpenColorIO.h>

Public Member Functions

bool isNoOp () const
 
bool hasChannelCrosstalk () const
 
const char * getCacheID () const
 
ConstProcessorMetadataRcPtr getProcessorMetadata () const
 
const FormatMetadatagetFormatMetadata () const
 
int getNumTransforms () const
 
const FormatMetadatagetTransformFormatMetadata (int index) const
 
GroupTransformRcPtr createGroupTransform () const
 
DynamicPropertyRcPtr getDynamicProperty (DynamicPropertyType type) const
 
bool hasDynamicProperty (DynamicPropertyType type) const noexcept
 True if at least one dynamic property of that type exists. More...
 
bool isDynamic () const noexcept
 True if at least one dynamic property of any type exists and is dynamic. More...
 
ConstProcessorRcPtr getOptimizedProcessor (OptimizationFlags oFlags) const
 
ConstProcessorRcPtr getOptimizedProcessor (BitDepth inBD, BitDepth outBD, OptimizationFlags oFlags) const
 
ConstGPUProcessorRcPtr getDefaultGPUProcessor () const
 Get an optimized GPUProcessor instance. More...
 
ConstGPUProcessorRcPtr getOptimizedGPUProcessor (OptimizationFlags oFlags) const
 
ConstGPUProcessorRcPtr getOptimizedLegacyGPUProcessor (OptimizationFlags oFlags, unsigned edgelen) const
 
ConstCPUProcessorRcPtr getDefaultCPUProcessor () const
 
ConstCPUProcessorRcPtr getOptimizedCPUProcessor (OptimizationFlags oFlags) const
 
ConstCPUProcessorRcPtr getOptimizedCPUProcessor (BitDepth inBitDepth, BitDepth outBitDepth, OptimizationFlags oFlags) const
 
 Processor (const Processor &)=delete
 
Processoroperator= (const Processor &)=delete
 
 ~Processor ()
 Do not use (needed only for pybind11). More...
 

Friends

class Config
 

Detailed Description

The Processor represents a specific color transformation which is the result of Config::getProcessor.

Definition at line 2300 of file OpenColorIO.h.

Constructor & Destructor Documentation

OCIO_NAMESPACE::Processor::Processor ( const Processor )
delete
OCIO_NAMESPACE::Processor::~Processor ( )

Do not use (needed only for pybind11).

Member Function Documentation

GroupTransformRcPtr OCIO_NAMESPACE::Processor::createGroupTransform ( ) const

Return a GroupTransform that contains a copy of the transforms that comprise the processor. (Changes to it will not modify the original processor.) Note that the GroupTransform::write method may be used to serialize a Processor. Serializing to CTF format is a useful technique for debugging Processor contents.

const char* OCIO_NAMESPACE::Processor::getCacheID ( ) const
ConstCPUProcessorRcPtr OCIO_NAMESPACE::Processor::getDefaultCPUProcessor ( ) const

Get an optimized CPUProcessor instance.

Note
This may provide higher fidelity than anticipated due to internal optimizations. For example, if the inputColorSpace and the outputColorSpace are members of the same equalitygroup, no conversion will be applied, even though strictly speaking quantization should be added.
The typical use case to apply color processing to an image is:
= config->getProcessor(colorSpace1, colorSpace2);
= processor->getDefaultCPUProcessor();
OCIO::PackedImageDesc img(imgDataPtr, imgWidth, imgHeight, imgChannels);
cpuProcessor->apply(img);
ConstGPUProcessorRcPtr OCIO_NAMESPACE::Processor::getDefaultGPUProcessor ( ) const

Get an optimized GPUProcessor instance.

DynamicPropertyRcPtr OCIO_NAMESPACE::Processor::getDynamicProperty ( DynamicPropertyType  type) const

The returned pointer may be used to set the default value of any dynamic properties of the requested type. Throws if the requested property is not found. Note that if the processor contains several ops that support the requested property, only one can be dynamic and only this one will be controlled.

Note
The dynamic properties are a convenient way to change on-the-fly values without generating again and again a CPU or GPU processor instance. Color transformations can contain dynamic properties from a ExposureContrastTransform for example. So, Processor, CPUProcessor and GpuShaderCreator all have ways to manage dynamic properties. However, the transform dynamic properties are decoupled between the types of processor instances so that the same Processor can generate several independent CPU and/or GPU processor instances i.e. changing the value of the exposure dynamic property from a CPU processor instance does not affect the corresponding GPU processor instance. Processor creation will log a warning if there are more than one property of a given type. There may be more than one property of a given type, but only one will respond to parameter updates, the others will use their original parameter values.
const FormatMetadata& OCIO_NAMESPACE::Processor::getFormatMetadata ( ) const

Get a FormatMetadata containing the top level metadata for the processor. For a processor from a CLF file, this corresponds to the ProcessList metadata.

int OCIO_NAMESPACE::Processor::getNumTransforms ( ) const

Get the number of transforms that comprise the processor. Each transform has a (potentially empty) FormatMetadata.

ConstCPUProcessorRcPtr OCIO_NAMESPACE::Processor::getOptimizedCPUProcessor ( OptimizationFlags  oFlags) const
ConstCPUProcessorRcPtr OCIO_NAMESPACE::Processor::getOptimizedCPUProcessor ( BitDepth  inBitDepth,
BitDepth  outBitDepth,
OptimizationFlags  oFlags 
) const
ConstGPUProcessorRcPtr OCIO_NAMESPACE::Processor::getOptimizedGPUProcessor ( OptimizationFlags  oFlags) const
ConstGPUProcessorRcPtr OCIO_NAMESPACE::Processor::getOptimizedLegacyGPUProcessor ( OptimizationFlags  oFlags,
unsigned  edgelen 
) const

Get an optimized GPUProcessor instance that will emulate the OCIO v1 GPU path. This approach bakes some of the ops into a single Lut3D and so is less accurate than the current GPU processing methods.

ConstProcessorRcPtr OCIO_NAMESPACE::Processor::getOptimizedProcessor ( OptimizationFlags  oFlags) const

Run the optimizer on a Processor to create a new Processor. It is usually not necessary to call this since getting a CPUProcessor or GPUProcessor will also optimize. However if you need both, calling this method first makes getting a CPU and GPU Processor faster since the optimization is effectively only done once.

ConstProcessorRcPtr OCIO_NAMESPACE::Processor::getOptimizedProcessor ( BitDepth  inBD,
BitDepth  outBD,
OptimizationFlags  oFlags 
) const

Create a Processor that is optimized for a specific in and out bit-depth (as CPUProcessor would do). This method is provided primarily for diagnostic purposes.

ConstProcessorMetadataRcPtr OCIO_NAMESPACE::Processor::getProcessorMetadata ( ) const

The ProcessorMetadata contains technical information such as the number of files and looks used in the processor.

const FormatMetadata& OCIO_NAMESPACE::Processor::getTransformFormatMetadata ( int  index) const

Get a FormatMetadata containing the metadata for a transform within the processor. For a processor from a CLF file, this corresponds to the metadata associated with an individual process node.

bool OCIO_NAMESPACE::Processor::hasChannelCrosstalk ( ) const

True if the image transformation is non-separable. For example, if a change in red may also cause a change in green or blue.

bool OCIO_NAMESPACE::Processor::hasDynamicProperty ( DynamicPropertyType  type) const
noexcept

True if at least one dynamic property of that type exists.

bool OCIO_NAMESPACE::Processor::isDynamic ( ) const
noexcept

True if at least one dynamic property of any type exists and is dynamic.

bool OCIO_NAMESPACE::Processor::isNoOp ( ) const
Processor& OCIO_NAMESPACE::Processor::operator= ( const Processor )
delete

Friends And Related Function Documentation

friend class Config
friend

Definition at line 2451 of file OpenColorIO.h.


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