Skip to main content

Processor

Struct Processor 

Source
pub struct Processor { /* private fields */ }
Expand description

A color processor.

Implementations§

Source§

impl Processor

Source

pub fn from_ops(ops: OpVec) -> Self

Build a processor from an op list.

Source

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.

Source

pub fn ops(&self) -> &[OpRc]

The (unoptimized) ops.

Source

pub fn is_no_op(&self) -> bool

True if the processor does nothing.

Source

pub fn has_channel_crosstalk(&self) -> bool

True if an output channel depends on other input channels.

Source

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).

Source

pub fn processor_metadata(&self) -> &ProcessorMetadata

Files and looks used to build the processor.

Source

pub fn format_metadata(&self) -> &FormatMetadata

Metadata of the group transform the processor was built from.

Source

pub fn num_transforms(&self) -> usize

Number of transforms of the source group transform (0 if not a group).

Source

pub fn transform_format_metadata(&self, index: usize) -> Option<&FormatMetadata>

Metadata of the transform at index of the source group transform.

Source

pub fn create_group_transform(&self) -> GroupTransform

Convert the ops back to transforms.

Source

pub fn is_dynamic(&self) -> bool

True if any op has a dynamic property.

Source

pub fn has_dynamic_property(&self, ty: DynamicPropertyType) -> bool

True if an op has a dynamic property of the given type.

Source

pub fn dynamic_property( &self, ty: DynamicPropertyType, ) -> Option<DynamicProperty>

The dynamic property of the given type (shared by all ops using it).

Source

pub fn optimized(&self, flags: OptimizationFlags) -> Processor

Processor with optimized ops.

Source

pub fn default_cpu_processor(&self) -> CpuProcessor

CPU processor with the default optimization.

Source

pub fn optimized_cpu_processor(&self, flags: OptimizationFlags) -> CpuProcessor

CPU processor with the given optimization.

Source

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

Source

pub fn default_gpu_processor(&self) -> Result<Arc<GpuProcessor>>

GPU processor with the default optimization.

Source

pub fn optimized_gpu_processor( &self, flags: OptimizationFlags, ) -> Result<Arc<GpuProcessor>>

GPU processor with the given optimization (the processors are cached by optimization flags).

Source

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.

Trait Implementations§

Source§

impl Clone for Processor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Processor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.