Pipeline
This module contains the Pipeline class and related components for the EZStitcher pipeline architecture.
For conceptual explanation, see Pipeline. For information about directory structure, see Directory Structure.
Pipeline
- class ezstitcher.core.pipeline.Pipeline(steps=None, name=None)
A sequence of processing steps that are executed in order.
For detailed information on pipeline construction, including best practices and different approaches, see Pipeline.
- Parameters:
- add_step(step)
Add a step to the pipeline. See Pipeline for best practices on when to use this method versus providing all steps during initialization.
- run(input_dir=None, output_dir=None, well_filter=None, microscope_handler=None, orchestrator=None, positions_file=None)
Execute the pipeline.
This method can either:
Take individual parameters and create a ProcessingContext internally, or
Take a pre-configured ProcessingContext object (when called from PipelineOrchestrator)
The orchestrator parameter is required as it provides access to the microscope handler and other components.
- Parameters:
input_dir (str or Path) – Optional input directory override
output_dir (str or Path) – Optional output directory override
well_filter (list) – Optional well filter override
microscope_handler (
MicroscopeHandler) – Optional microscope handler overrideorchestrator (
PipelineOrchestrator) – PipelineOrchestrator instance (required)positions_file (str or Path) – Optional positions file to use for stitching
- Returns:
The results of the pipeline execution
- Return type:
- input_dir
Get or set the input directory for the pipeline.
- Type:
Path or None
- output_dir
Get or set the output directory for the pipeline.
- Type:
Path or None
ProcessingContext
- class ezstitcher.core.pipeline.ProcessingContext(input_dir=None, output_dir=None, well_filter=None, config=None, **kwargs)
Maintains state during pipeline execution.
The ProcessingContext holds input/output directories, well filter, configuration, and results during pipeline execution. It serves as a communication mechanism between steps in a pipeline, allowing each step to access and modify shared state.
For detailed information about how the context is used for communication between steps, see Pipeline Context in the Pipeline documentation.
- Parameters:
- input_dir
The input directory for processing.
- Type:
Path or None
- output_dir
The output directory for processing results.
- Type:
Path or None
Step Classes
For documentation on step classes like ImageStitchingStep, see Steps.