Coverage for ezstitcher/ez/functions.py: 100%
8 statements
« prev ^ index » next coverage.py v7.3.2, created at 2025-04-30 13:20 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2025-04-30 13:20 +0000
1"""
2Function-based interface for the EZ module.
4This module provides simple function-based interfaces for common stitching workflows.
5"""
7from pathlib import Path
8from typing import Optional, Union, List, Dict, Any
10from .core import EZStitcher
13def stitch_plate(input_path: Union[str, Path],
14 output_path: Optional[Union[str, Path]] = None,
15 **kwargs) -> Path:
16 """
17 One-liner function to stitch a plate of microscopy images.
19 Args:
20 input_path: Path to the plate folder
21 output_path: Path for output (default: input_path + "_stitched")
22 **kwargs: Additional options passed to EZStitcher
23 normalize (bool): Whether to apply normalization
24 flatten_z (bool): Whether to flatten Z-stacks
25 z_method (str): Method for Z-flattening
26 channel_weights (List[float]): Weights for channel compositing
27 well_filter (List[str]): List of wells to process
29 Returns:
30 Path: Path to the stitched output
31 """
32 # Pass output_path as a keyword argument
33 if output_path is not None:
34 kwargs['output_path'] = output_path
35 stitcher = EZStitcher(input_path, **kwargs)
36 return stitcher.stitch()