Struct exr::meta::header::LayerAttributes

source ·
pub struct LayerAttributes {
Show 37 fields pub layer_name: Option<Text>, pub layer_position: Vec2<i32>, pub screen_window_center: Vec2<f32>, pub screen_window_width: f32, pub white_luminance: Option<f32>, pub adopted_neutral: Option<Vec2<f32>>, pub rendering_transform_name: Option<Text>, pub look_modification_transform_name: Option<Text>, pub horizontal_density: Option<f32>, pub owner: Option<Text>, pub comments: Option<Text>, pub capture_date: Option<Text>, pub utc_offset: Option<f32>, pub longitude: Option<f32>, pub latitude: Option<f32>, pub altitude: Option<f32>, pub focus: Option<f32>, pub exposure: Option<f32>, pub aperture: Option<f32>, pub iso_speed: Option<f32>, pub environment_map: Option<EnvironmentMap>, pub film_key_code: Option<KeyCode>, pub wrap_mode_name: Option<Text>, pub frames_per_second: Option<Rational>, pub multi_view_names: Option<Vec<Text>>, pub world_to_camera: Option<Matrix4x4>, pub world_to_normalized_device: Option<Matrix4x4>, pub deep_image_state: Option<Rational>, pub original_data_window: Option<IntegerBounds>, pub preview: Option<Preview>, pub view_name: Option<Text>, pub software_name: Option<Text>, pub near_clip_plane: Option<f32>, pub far_clip_plane: Option<f32>, pub horizontal_field_of_view: Option<f32>, pub vertical_field_of_view: Option<f32>, pub other: HashMap<Text, AttributeValue>,
}
Expand description

Does not include the attributes required for reading the file contents. Excludes standard fields that must be the same for all headers. For more attributes, see struct ImageAttributes.

Fields§

§layer_name: Option<Text>

The name of this layer. Required if this file contains deep data or multiple layers.

§layer_position: Vec2<i32>

The top left corner of the rectangle that positions this layer within the global infinite 2D space of the whole file. This represents the position of the DataWindow.

§screen_window_center: Vec2<f32>

Part of the perspective projection. Default should be (0, 0).

§screen_window_width: f32

Part of the perspective projection. Default should be 1.

§white_luminance: Option<f32>

The white luminance of the colors. Defines the luminance in candelas per square meter, Nits, of the rgb value (1, 1, 1).

§adopted_neutral: Option<Vec2<f32>>

The adopted neutral of the colors. Specifies the CIE (x,y) frequency coordinates that should be considered neutral during color rendering. Pixels in the image whose CIE (x,y) frequency coordinates match the adopted neutral value should be mapped to neutral values on the given display.

§rendering_transform_name: Option<Text>

Name of the color transform function that is applied for rendering the image.

§look_modification_transform_name: Option<Text>

Name of the color transform function that computes the look modification of the image.

§horizontal_density: Option<f32>

The horizontal density, in pixels per inch. The image’s vertical output density can be computed using horizontal_density * pixel_aspect_ratio.

§owner: Option<Text>

Name of the owner.

§comments: Option<Text>

Additional textual information.

§capture_date: Option<Text>

The date of image creation, in YYYY:MM:DD hh:mm:ss format.

§utc_offset: Option<f32>

Time offset from UTC.

§longitude: Option<f32>

Geographical image location.

§latitude: Option<f32>

Geographical image location.

§altitude: Option<f32>

Geographical image location.

§focus: Option<f32>

Camera focus in meters.

§exposure: Option<f32>

Exposure time in seconds.

§aperture: Option<f32>

Camera aperture measured in f-stops. Equals the focal length of the lens divided by the diameter of the iris opening.

§iso_speed: Option<f32>

Iso-speed of the camera sensor.

§environment_map: Option<EnvironmentMap>

If this is an environment map, specifies how to interpret it.

§film_key_code: Option<KeyCode>

Identifies film manufacturer, film type, film roll and frame position within the roll.

§wrap_mode_name: Option<Text>

Specifies how texture map images are extrapolated. Values can be black, clamp, periodic, or mirror.

§frames_per_second: Option<Rational>

Frames per second if this is a frame in a sequence.

§multi_view_names: Option<Vec<Text>>

Specifies the view names for multi-view, for example stereo, image files.

§world_to_camera: Option<Matrix4x4>

The matrix that transforms 3D points from the world to the camera coordinate space. Left-handed coordinate system, y up, z forward.

§world_to_normalized_device: Option<Matrix4x4>

The matrix that transforms 3D points from the world to the “Normalized Device Coordinate” space. Left-handed coordinate system, y up, z forward.

§deep_image_state: Option<Rational>

Specifies whether the pixels in a deep image are sorted and non-overlapping.

§original_data_window: Option<IntegerBounds>

If the image was cropped, contains the original data window.

§preview: Option<Preview>

An 8-bit rgba image representing the rendered image.

§view_name: Option<Text>

Name of the view, which is typically either "right" or "left" for a stereoscopic image.

§software_name: Option<Text>

The name of the software that produced this image.

§near_clip_plane: Option<f32>

The near clip plane of the virtual camera projection.

§far_clip_plane: Option<f32>

The far clip plane of the virtual camera projection.

§horizontal_field_of_view: Option<f32>

The field of view angle, along the horizontal axis, in degrees.

§vertical_field_of_view: Option<f32>

The field of view angle, along the horizontal axis, in degrees.

§other: HashMap<Text, AttributeValue>

Contains custom attributes. Does not contain the attributes already present in the Header or LayerAttributes struct. Does not contain attributes that are standardized to be the same for all layers: no chromaticities and no time codes.

Implementations§

source§

impl LayerAttributes

source

pub fn named(layer_name: impl Into<Text>) -> Self

Create default layer attributes with a data position of zero.

source

pub fn with_position(self, data_position: Vec2<i32>) -> Self

Set the data position of this layer.

source

pub fn with_camera_frustum( self, world_to_camera: Matrix4x4, world_to_normalized_device: Matrix4x4, field_of_view: impl Into<Vec2<f32>>, depth_clip_range: Range<f32>, ) -> Self

Set all common camera projection attributes at once.

Trait Implementations§

source§

impl Clone for LayerAttributes

source§

fn clone(&self) -> LayerAttributes

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for LayerAttributes

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for LayerAttributes

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for LayerAttributes

source§

fn eq(&self, other: &LayerAttributes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for LayerAttributes

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<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.