Struct exr::meta::header::LayerAttributes[][src]

pub struct LayerAttributes {
    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>,
}

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 bottom left corner of the rectangle that positions this layer within the global infinite 2D space of the whole file. Equivalent to 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

impl LayerAttributes[src]

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

Create default layer attributes with a data position of zero.

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

Set the data position of this layer.

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
[src]

Set all common camera projection attributes at once.

Trait Implementations

impl Clone for LayerAttributes[src]

impl Debug for LayerAttributes[src]

impl Default for LayerAttributes[src]

impl PartialEq<LayerAttributes> for LayerAttributes[src]

impl StructuralPartialEq for LayerAttributes[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.