colour_hdri.ImageStack#

class colour_hdri.ImageStack(cctf_decoding: Callable | None = None)[source]#

Bases: MutableSequence[Image]

Define a convenient image stack storing a sequence of images for HDRI / radiance images generation.

Parameters:

cctf_decoding (Callable | None) – Decoding colour component transfer function (Decoding CCTF) or electro-optical transfer function (EOTF / EOCF).

Attributes

Methods

property cctf_decoding: Callable | None#

Getter and setter property for the decoding colour component transfer function (Decoding CCTF) / electro-optical transfer function (EOTF).

Parameters:

value – Decoding colour component transfer function (Decoding CCTF) / electro-optical transfer function (EOTF).

Returns:

Decoding colour component transfer function (Decoding CCTF) / electro-optical transfer function (EOTF).

Return type:

Callable or None

insert(index: int, value: Any) None[source]#

Insert given colour_hdri.Image class instance at given index.

Parameters:
Return type:

None

sort(key: Callable | None = None) None[source]#

Sort the underlying data structure.

Parameters:

key (Callable | None) – Function of one argument that is used to extract a comparison key from each data structure.

Return type:

None

static from_files(image_files: Sequence[str], cctf_decoding: Callable | None = None, read_data: bool = True, read_metadata: bool = True) ImageStack[source]#

Return a colour_hdri.ImageStack instance from given image files.

Parameters:
  • image_files (Sequence[str]) – Image files.

  • cctf_decoding (Callable | None) – Decoding colour component transfer function (Decoding CCTF) or electro-optical transfer function (EOTF / EOCF).

  • read_data (bool) – Whether to read the image data.

  • read_metadata (bool) – Whether to read the image metadata.

Return type:

colour_hdri.ImageStack

is_valid() bool[source]#

Return whether the image stack is valid, i.e., whether all the image metadata is defined.

Returns:

Whether the image stack is valid.

Return type:

bool

clear_data() None[source]#

Clear the image stack image data.

Return type:

None

clear_metadata() None[source]#

Clear the image stack metadata.

Return type:

None