paidiverpy.custom_layer#

__init__.py for custom_layer module.

Submodules#

Classes#

CustomLayer

CustomLayer class.

Package Contents#

class paidiverpy.custom_layer.CustomLayer(parameters: dict[str, Any] | None = None, config_params: dict[str, Any] | paidiverpy.config.config_params.ConfigParams | None = None, config_file_path: str | None = None, config: paidiverpy.config.configuration.Configuration | None = None, metadata: paidiverpy.metadata_parser.MetadataParser | None = None, images: paidiverpy.images_layer.ImagesLayer | None = None, paidiverpy: paidiverpy.Paidiverpy | None = None, step_name: str | None = None, client: dask.distributed.Client | None = None, config_index: int | None = None, logger: logging.Logger | None = None, raise_error: bool = False, verbose: int = 2)[source]#

Bases: paidiverpy.Paidiverpy

CustomLayer class.

Process the images in the custom layer.

Parameters:
  • parameters (dict) – The parameters for the step.

  • config_params (dict | ConfigParams, optional) – The configuration parameters. It can contain the following keys / attributes: - input_path (str): The path to the input files. - output_path (str): The path to the output files. - metadata_path (str): The path to the metadata file. - metadata_type (str): The type of the metadata file. - track_changes (bool): Whether to track changes. - n_jobs (int): The number of n_jobs.

  • config_file_path (str) – The path to the configuration file.

  • config (Configuration) – The configuration object.

  • metadata (MetadataParser) – The metadata object.

  • images (ImagesLayer) – The images object.

  • paidiverpy (Paidiverpy) – The paidiverpy object.

  • step_name (str) – The name of the step.

  • client (Client) – The Dask client.

  • config_index (int) – The index of the configuration.

  • logger (logging.Logger) – The logger object.

  • raise_error (bool) – Whether to raise an error.

  • verbose (int) – verbose level (0 = none, 1 = errors/warnings, 2 = info).

run() None[source]#

Custom Layer run method.

Run the custom layer steps on the images based on the configuration file or parameters.

Parameters:

add_new_step (bool, optional) – Whether to add a new step to the images object.

Defaults to True.