Struct vfxpreopenexr::deep::deep_tiled_output_part::DeepTiledOutputPart[][src]

#[repr(transparent)]
pub struct DeepTiledOutputPart<'a> { /* fields omitted */ }

Implementations

Get an interface to the part part_number of the MultiPartOutputFile multi_part_file.

Define a frame buffer as the pixel data source.

Pixel (x, y) is at offset x * x_stride + y * y_stride

Errors

Access to the file Header

Get the tiles’ x dimension

Get the tiles’ y dimension

Get the level mode

Get the level rounding mode

Get the number of levels in the file

Returns

where rfunc is either floor() or ceil() depending on whether level_rounding_mode() is LevelRoundingMode::RoundUp or LevelRoundingMode::RoundDown

Get the number of levels in the file in the x axis

Returns

where rfunc is either floor() or ceil() depending on whether level_rounding_mode() is LevelRoundingMode::RoundUp or LevelRoundingMode::RoundDown

Get the number of levels in the file in the y axis

Returns

where rfunc is either floor() or ceil() depending on whether level_rounding_mode() is LevelRoundingMode::RoundUp or LevelRoundingMode::RoundDown

Returns true if the file contains a level with level number (lx, ly), false otherwise.

Returns the width of the level with level number (lx, *), where * is any number.

Returns

  • max (1, rfunc (w / pow (2, lx)))

where rfunc is either floor() or ceil() depending on whether level_rounding_mode() is LevelRoundingMode::RoundUp or LevelRoundingMode::RoundDown

Errors

*Error::Base - If any error occurs

Returns the height of the level with level number (*, ly), where * is any number.

Returns

  • max (1, rfunc (h / pow (2, ly)))

where rfunc is either floor() or ceil() depending on whether level_rounding_mode() is LevelRoundingMode::RoundUp or LevelRoundingMode::RoundDown

Errors

*Error::Base - If any error occurs

Get the number of tiles in the x axis that cover a level with level number (lx, *) where * is any number

Returns

*(level_width(lx) + tile_x_size() - 1) / tile_x_size()

Errors

*Error::InvalidArgument - If lx is not a valid level

Get the number of tiles in the y axis that cover a level with level number (*, ly) where * is any number

Returns

  • (level_height(ly) + tile_y_size() - 1) / tile_y_size()

Errors

*Error::InvalidArgument - If lx is not a valid level

Returns a 2-dimensional region of valid pixel coordinates for a level with level number (lx, ly)

Errors

*Error::Base - if any error occurs

Returns a 2-dimensional region of valid pixel coordinates for a level with tile coordinates (dx, dy) and level number (lx, ly)

Errors

Writes the tile with tile coordinates (dx, dy), and level number (lx, ly) to the file.

Errors

Pixels that are outside the pixel coordinate range for the tile’s level, are never accessed by writeTile().

Each tile in the file must be written exactly once.

The file’s line order attribute determines the order of the tiles in the file:

LineOrder::IncreasingY

In the file, the tiles for each level are stored in a contiguous block. The levels are ordered like this:

(0, 0)   (1, 0)   ... (nx-1, 0)
(0, 1)   (1, 1)   ... (nx-1, 1)
 ...
(0,ny-1) (1,ny-1) ... (nx-1,ny-1)

where nx = num_x_levels(), and ny = num_y_levels().

In an individual level, (lx, ly), the tiles are stored in the following order:

(0, 0)   (1, 0)   ... (tx-1, 0)
(0, 1)   (1, 1)   ... (tx-1, 1)
 ...
(0,ty-1) (1,ty-1) ... (tx-1,ty-1)

where tx = num_x_tiles(lx), and ty = num_y_tiles(ly).

LineOrder::DecreasingY

As for LineOrder::IncreasingY, the tiles for each level are stored in a contiguous block. The levels are ordered the same way as for LineOrder::IncreasingY, but within an individual level, the tiles are stored in this order:

(0,ty-1) (1,ty-1) ... (tx-1,ty-1)
 ...
(0, 1)   (1, 1)   ... (tx-1, 1)
(0, 0)   (1, 0)   ... (tx-1, 0)

LineOrder::RandomY

The order of the calls to write_tile() determines the order of the tiles in the file.

Writes multiple tiles at once.

If multi-threading is used multiple tiles are written concurrently.
The tile coordinates, dx1, dx2 and dy1, dy2, specify inclusive ranges of tile coordinates. It is valid for dx1 < dx2 or dy1 < dy2; the tiles are always written in the order specified by the line order attribute. Hence, it is not possible to specify an “invalid” or empty tile range.

Pixels that are outside the pixel coordinate range for the tile’s level, are never accessed by writeTile().

Each tile in the file must be written exactly once.

The file’s line order attribute determines the order of the tiles in the file:

LineOrder::IncreasingY

In the file, the tiles for each level are stored in a contiguous block. The levels are ordered like this:

(0, 0)   (1, 0)   ... (nx-1, 0)
(0, 1)   (1, 1)   ... (nx-1, 1)
 ...
(0,ny-1) (1,ny-1) ... (nx-1,ny-1)

where nx = num_x_levels(), and ny = num_y_levels().

In an individual level, (lx, ly), the tiles are stored in the following order:

(0, 0)   (1, 0)   ... (tx-1, 0)
(0, 1)   (1, 1)   ... (tx-1, 1)
 ...
(0,ty-1) (1,ty-1) ... (tx-1,ty-1)

where tx = num_x_tiles(lx), and ty = num_y_tiles(ly).

LineOrder::DecreasingY

As for LineOrder::IncreasingY, the tiles for each level are stored in a contiguous block. The levels are ordered the same way as for LineOrder::IncreasingY, but within an individual level, the tiles are stored in this order:

(0,ty-1) (1,ty-1) ... (tx-1,ty-1)
 ...
(0, 1)   (1, 1)   ... (tx-1, 1)
(0, 0)   (1, 0)   ... (tx-1, 0)

LineOrder::RandomY

The order of the calls to write_tile() determines the order of the tiles in the file.

Supplies a new set of pixels for the preview image attribute in the file’s header

Note: update_preview_image() is necessary because images are often stored in a file incrementally, a few tiles at a time, while the image is being generated. Since the preview image is an attribute in the file’s header, it gets stored in the file as soon as the file is opened, but we may not know what the preview image should look like until we have written the last tile of the main image.

Errors

Shortcut to copy all pixels from an DeepTiledInputFile into this file, without uncompressing and then recompressing the pixel data.

This file’s header must be compatible with the DeepTiledInputFile’s header: The two header’s “dataWindow”, “compression”, “lineOrder” and “channels” attributes must be the same.

Errors

Shortcut to copy all pixels from an DeepTiledInputPart into this file, without uncompressing and then recompressing the pixel data.

This file’s header must be compatible with the DeepTiledInputPart’s header: The two header’s “dataWindow”, “compression”, “lineOrder” and “channels” attributes must be the same.

Errors

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.