pub struct Processor { /* private fields */ }Expand description
A color processor.
Implementations§
Source§impl Processor
impl Processor
Sourcepub fn from_transform(
config: &Config,
context: &Context,
transform: &Transform,
dir: TransformDirection,
) -> Result<Self>
pub fn from_transform( config: &Config, context: &Context, transform: &Transform, dir: TransformDirection, ) -> Result<Self>
Build a processor for transform in dir, using config and context
to resolve color spaces, looks and files.
Sourcepub fn has_channel_crosstalk(&self) -> bool
pub fn has_channel_crosstalk(&self) -> bool
True if an output channel depends on other input channels.
Sourcepub fn cache_id(&self) -> String
pub fn cache_id(&self) -> String
Cache identifier: a hash of the op cache ids. As in OCIO, it is computed even for a no-op processor, so that different lists of identity ops do not share the same id (the config processor cache reuses a processor having the same id).
Sourcepub fn processor_metadata(&self) -> &ProcessorMetadata
pub fn processor_metadata(&self) -> &ProcessorMetadata
Files and looks used to build the processor.
Sourcepub fn format_metadata(&self) -> &FormatMetadata
pub fn format_metadata(&self) -> &FormatMetadata
Metadata of the group transform the processor was built from.
Sourcepub fn num_transforms(&self) -> usize
pub fn num_transforms(&self) -> usize
Number of transforms of the source group transform (0 if not a group).
Sourcepub fn transform_format_metadata(&self, index: usize) -> Option<&FormatMetadata>
pub fn transform_format_metadata(&self, index: usize) -> Option<&FormatMetadata>
Metadata of the transform at index of the source group transform.
Sourcepub fn create_group_transform(&self) -> GroupTransform
pub fn create_group_transform(&self) -> GroupTransform
Convert the ops back to transforms.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
True if any op has a dynamic property.
Sourcepub fn has_dynamic_property(&self, ty: DynamicPropertyType) -> bool
pub fn has_dynamic_property(&self, ty: DynamicPropertyType) -> bool
True if an op has a dynamic property of the given type.
Sourcepub fn dynamic_property(
&self,
ty: DynamicPropertyType,
) -> Option<DynamicProperty>
pub fn dynamic_property( &self, ty: DynamicPropertyType, ) -> Option<DynamicProperty>
The dynamic property of the given type (shared by all ops using it).
Sourcepub fn optimized(&self, flags: OptimizationFlags) -> Processor
pub fn optimized(&self, flags: OptimizationFlags) -> Processor
Processor with optimized ops.
Sourcepub fn default_cpu_processor(&self) -> CpuProcessor
pub fn default_cpu_processor(&self) -> CpuProcessor
CPU processor with the default optimization.
Sourcepub fn optimized_cpu_processor(&self, flags: OptimizationFlags) -> CpuProcessor
pub fn optimized_cpu_processor(&self, flags: OptimizationFlags) -> CpuProcessor
CPU processor with the given optimization.
Sourcepub fn optimized_cpu_processor_with_bit_depths(
&self,
input: BitDepth,
output: BitDepth,
flags: OptimizationFlags,
) -> CpuProcessor
pub fn optimized_cpu_processor_with_bit_depths( &self, input: BitDepth, output: BitDepth, flags: OptimizationFlags, ) -> CpuProcessor
CPU processor with bit depths. Images are converted according to their
own bit depth in apply; when they have the processor bit depths, the
first / last 1D LUTs are rendered as OCIO does for these bit depths
(look-up of the input code values, rounding of the scaled output).
Source§impl Processor
impl Processor
Sourcepub fn default_gpu_processor(&self) -> Result<Arc<GpuProcessor>>
pub fn default_gpu_processor(&self) -> Result<Arc<GpuProcessor>>
GPU processor with the default optimization.
Sourcepub fn optimized_gpu_processor(
&self,
flags: OptimizationFlags,
) -> Result<Arc<GpuProcessor>>
pub fn optimized_gpu_processor( &self, flags: OptimizationFlags, ) -> Result<Arc<GpuProcessor>>
GPU processor with the given optimization (the processors are cached by optimization flags).
Sourcepub fn optimized_legacy_gpu_processor(
&self,
flags: OptimizationFlags,
edgelen: u32,
) -> Result<Arc<GpuProcessor>>
pub fn optimized_legacy_gpu_processor( &self, flags: OptimizationFlags, edgelen: u32, ) -> Result<Arc<GpuProcessor>>
Legacy GPU processor (OCIO v1 approach): the ops not supported by the
legacy shaders (the 1D and 3D LUTs and the ops in between) are baked
into a single 3D LUT of edge length edgelen.