1from __future__
import annotations
3from abc
import ABC, abstractmethod
4from typing
import Any, Sequence
12 Interface defining the structure and behavior of a processing pipeline.
14 A pipeline is composed of multiple modules chained together in a defined order.
15 When an input is processed, each module's `process` function is called sequentially,
16 and the final result is returned.
18 @since ids_peak_common 1.1
19 @ingroup ids_peak_common_python_pipeline
26 Saves the current settings of the pipeline and its modules to a file.
28 @param file_path: Path to the file where the settings should be saved.
36 Loads the settings of the pipeline and its modules from a file.
38 @param file_path: Path to the file from which settings should be loaded.
46 Returns the current settings of the pipeline and its modules as a string.
48 @return A string representation of the pipeline settings.
56 Loads settings for the pipeline and its modules from a string.
58 @param settings: String containing serialized pipeline settings.
66 Resets the pipeline and its modules to their default state.
74 Processes the input data through all pipeline modules and returns the result.
76 The input data is passed through each module in sequence.
78 @param data: The input data to process.
80 @return The processed input.
89 Returns the type identifier of the pipeline.
91 This is a unique string used to identify the specific pipeline implementation.
93 @return A string representing the pipeline type.
102 Retrieves the sequence of all modules in the pipeline,
105 @return A sequence of modules.
Interface defining the structure and behavior of a processing pipeline.
None reset_to_default(self)
Resets the pipeline and its modules to their default state.
None import_settings_from_file(self, str file_path)
Loads the settings of the pipeline and its modules from a file.
None import_settings_from_string(self, str settings)
Loads settings for the pipeline and its modules from a string.
str type(self)
Returns the type identifier of the pipeline.
Any process(self, Any data)
Processes the input data through all pipeline modules and returns the result.
Sequence[IModule] _modules(self)
Retrieves the sequence of all modules in the pipeline, in execution order.
str export_settings_to_string(self)
Returns the current settings of the pipeline and its modules as a string.
None export_settings_to_file(self, str file_path)
Saves the current settings of the pipeline and its modules to a file.