ctc.lightfield_factory

Author: Ismael Seidel (ismael.seidel@ufsc.br) Affiliation: Embedded Computing Lab (ECL), Federal University of Santa Catarina (UFSC)

Description:

This module defines the LightFieldFactory class, in which there are static methods to return raw Light Field instances in different formats (e.g., PPM, YUV…).

class LightFieldFactory[source]

Bases: object

static get_lightfield(configuration, after_preprocessing=True)[source]

Static method to return the LightField instance from defined configuration

Parameters:
  • configuration (dict) – JSON configuration file in which sizes, number of rows and columns are defined

  • after_preprocessing (bool, optional) – Boolean to set if the Light Field raw files were pre-processed

Returns:

LightField instance, according to its JSON configuration file

Return type:

LightField

static get_raw_ppm_lightfield(configuration, raw_path, after_preprocessing=True, bpp_for_naming=None)[source]

Static method to return a RAW_RGB_PPM_LightField_Data instance based on the provided configuration and raw path.

Parameters:
  • configuration (dict) – JSON configuration file in which sizes, number of rows and columns are defined

  • raw_path (Union[str, Path]) – Path to the raw PPM light field data

  • after_preprocessing (bool, optional) – Boolean to set if the Light Field raw files were pre-processed

  • bpp_for_naming (optional) – Bits per pixel for naming purposes

Returns:

RAW_RGB_PPM_LightField_Data instance

Return type:

RAW_RGB_PPM_LightField_Data

static get_raw_yuv_lightfield(configuration, raw_path, bpp_for_naming=None)[source]

Static method to return a RAW_BT709_FR_YUV444p10le_LightField_Data instance based on the provided configuration and raw path.

Parameters:
  • configuration (dict) – JSON configuration file in which sizes, number of rows and columns are defined

  • raw_path (Union[str, Path]) – Path to the raw YUV light field data

  • bpp_for_naming (optional) – Bits per pixel for naming purposes

Returns:

RAW_BT709_FR_YUV444p10le_LightField_Data instance

Return type:

RAW_BT709_FR_YUV444p10le_LightField_Data

static get_raw_pgx_lightfield(configuration, raw_path, bpp_for_naming=None)[source]

Static method to return a RAW_BT709_FR_PGX_LightField_Data instance based on the provided configuration and raw path.

Parameters:
  • configuration (dict) – JSON configuration file in which sizes, number of rows and columns are defined

  • raw_path (Union[str, Path]) – Path to the raw PGX light field data

  • bpp_for_naming (optional) – Bits per pixel for naming purposes

Returns:

RAW_BT709_FR_PGX_LightField_Data instance

Return type:

RAW_BT709_FR_PGX_LightField_Data

static get_raw_png_lightfield(configuration, raw_path, bpp_for_naming=None)[source]

Static method to return a RAW_RGB_PNG_LightField_Data instance based on the provided configuration and raw path.

Parameters:
  • configuration (dict) – JSON configuration file in which sizes, number of rows and columns are defined

  • raw_path (Union[str, Path]) – Path to the raw PNG light field data

  • bpp_for_naming (optional) – Bits per pixel for naming purposes

Returns:

RAW_RGB_PNG_LightField_Data instance

Return type:

RAW_RGB_PNG_LightField_Data

static get_raw_lightfield(configuration, lightfield_name, raw_type, after_preprocessing=True, decoded_base_path=None, bpp_for_naming=None, raw_path=None)[source]

Static method to return a RAWLightFieldData instance based on the provided configuration, lightfield name, and raw type.

Parameters:
  • configuration (ConfigurationReader) – ConfigurationReader instance containing lightfield configurations

  • lightfield_name (str) – Name of the lightfield

  • raw_type (str) – Type of the raw lightfield data (e.g., “pgx”, “yuv”, “ppm”, “png”)

  • after_preprocessing (bool, optional) – Boolean to set if the Light Field raw files were pre-processed

  • decoded_base_path (Union[str, Path], optional) – Base path for decoded files

  • bpp_for_naming (optional) – Bits per pixel for naming purposes

  • raw_path (optional) – Path to the raw lightfield data

Returns:

RAWLightFieldData instance

Return type:

RAWLightFieldData