#include <OpenColorIO.h>
The Processor represents a specific color transformation which is the result of Config::getProcessor.
Definition at line 2300 of file OpenColorIO.h.
OCIO_NAMESPACE::Processor::~Processor |
( |
| ) |
|
Do not use (needed only for pybind11).
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 |
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);
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.
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.
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.
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.
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.
The ProcessorMetadata contains technical information such as the number of files and looks used in the processor.
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.
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 |
The documentation for this class was generated from the following file: