PipelineOrchestrator

The PipelineOrchestrator is the central coordinator that manages the execution of multiple pipelines across wells.

For conceptual explanation, see PipelineOrchestrator. For information about directory structure, see Directory Structure.

class ezstitcher.core.pipeline_orchestrator.PipelineOrchestrator(plate_path=None, workspace_path=None, config=None, fs_manager=None, image_preprocessor=None, focus_analyzer=None)

The central coordinator that manages the execution of multiple pipelines across wells.

For detailed information about how the orchestrator runs pipelines, see Running Pipelines in the PipelineOrchestrator documentation.

For information about the relationship between the orchestrator and pipeline, see Orchestrator-Pipeline Relationship in the PipelineOrchestrator documentation.

Parameters:
  • plate_path (str or Path) – Path to the plate folder (optional, can be provided later in run())

  • workspace_path (str or Path) – Path to the workspace folder (optional, defaults to plate_path.parent/plate_path.name_workspace)

  • config (PipelineConfig) – Configuration for the pipeline orchestrator

  • fs_manager (FileSystemManager) – File system manager (optional, a new instance will be created if not provided)

  • image_processor (ImageProcessor) – Image processor (optional, a new instance will be created if not provided)

  • focus_analyzer (FocusAnalyzer) – Focus analyzer (optional, a new instance will be created if not provided)

run(plate_path=None, pipelines=None)

Run the pipeline orchestrator with the specified pipelines.

Parameters:
  • plate_path (str or Path) – Path to the plate folder (optional if provided in __init__)

  • pipelines (list of Pipeline) – List of pipelines to run

Returns:

True if successful, False otherwise

Return type:

bool

process_well(well, pipelines)

Process a single well with the specified pipelines.

Parameters:
  • well (str) – Well identifier

  • pipelines (list of Pipeline) – List of pipelines to run

Returns:

True if successful, False otherwise

Return type:

bool

Note

The setup_directories() method has been removed. Directory paths are now automatically resolved between steps. See Directory Structure for details on how EZStitcher manages directories.

detect_plate_structure(plate_path)

Detect the plate structure and available wells.

Parameters:

plate_path (str or Path) – Path to the plate folder

generate_positions(well, input_dir, positions_dir)

Generate stitching positions for a well.

Parameters:
  • well (str) – Well identifier

  • input_dir (str or Path) – Input directory containing reference images

  • positions_dir (str or Path) – Output directory for positions files

Returns:

Tuple of (positions_dir, reference_pattern)

Return type:

tuple

stitch_images(well, input_dir, output_dir, positions_path)

Stitch images for a well.

Parameters:
  • well (str) – Well identifier

  • input_dir (str or Path) – Input directory containing processed images

  • output_dir (str or Path) – Output directory for stitched images

  • positions_path (str or Path) – Path to positions file