EZStitcher
High-Performance Microscopy Image Stitching
EZStitcher is a Python library that simplifies complex microscopy image processing workflows. Built on the robust Ashlar stitching engine, it provides an intuitive pipeline architecture for processing large microscopy datasets.
🚀 Key Features
-
Simplified Interface for Non-Coders
- One-liner function for common workflows
- Auto-detection of Z-stacks and channels
-
Intelligent Z-Stack Processing
- Advanced focus detection with quality metrics
- Multiple projection methods (max, mean, best-focus)
- Per-plane 3D stitching capability
-
Multi-Channel Support
- Independent fluorescence channel processing
- Channel-specific processing pipelines
- Custom weighted composite generation
-
Flexible Pipeline Architecture
- AutoPipelineFactory for quick workflow creation
- Customizable processing steps
- Modular design for easy extension
🎯 Supported Microscopes
- ImageXpress
- Opera Phenix
- Extensible architecture for additional microscope types
⚡ Quick Start
# Install with pyenv (recommended)
pyenv install 3.11
pyenv global 3.11
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate
# Install EZStitcher
pip install ezstitcher
📊 Basic Usage
Simplified Interface (Recommended for Beginners)
from ezstitcher import stitch_plate
# Stitch a plate with a single function call
stitch_plate("path/to/microscopy/data")
Using AutoPipelineFactory
from ezstitcher.core import AutoPipelineFactory
from ezstitcher.core.pipeline_orchestrator import PipelineOrchestrator
orchestrator = PipelineOrchestrator(plate_path="path/to/images")
factory = AutoPipelineFactory(input_dir=orchestrator.workspace_path)
pipelines = factory.create_pipelines()
orchestrator.run(pipelines=pipelines)
🔧 Advanced Usage Example
from ezstitcher.core.pipeline import Pipeline
from ezstitcher.core.steps import Step, PositionGenerationStep, ImageStitchingStep
from ezstitcher.core.specialized_steps import ZFlatStep, CompositeStep
from n2v.models import N2V
from basicpy import BaSiC
import numpy as np
def n2v_process(images, model_path):
model = N2V(None, model_path, 'N2V')
return [model.predict(img, 'N2V') for img in images]
def basic_process(images):
basic = BaSiC()
basic.fit(np.stack(images))
return list(basic.transform(np.stack(images)))
# Position generation pipeline
position_pipeline = Pipeline(
input_dir=orchestrator.workspace_path,
steps=[
ZFlatStep(),
CompositeStep(),
PositionGenerationStep()
]
)
# Assembly pipeline with advanced processing
assembly_pipeline = Pipeline(
input_dir=orchestrator.workspace_path,
steps=[
# N2V denoising
Step(func=(n2v_process, {'model_path': 'path/to/model.h5'})),
# BaSiC flatfield correction
Step(func=basic_process),
# Normalize
Step(func=IP.stack_percentile_normalize),
# Stitch
ImageStitchingStep()
]
)
orchestrator.run(pipelines=[position_pipeline, assembly_pipeline])
📚 Documentation
Our comprehensive documentation is organized into several sections:
- Quick Start Guide: Get up and running in minutes
- Basic Usage: Simple one-liner interface for common tasks
- Intermediate Usage: Custom pipelines with pre-built steps
- Advanced Usage: Create custom steps and extend functionality
- Core Concepts: Understanding EZStitcher's architecture
- API Reference: Detailed API documentation
🤝 Contributing
We welcome contributions! See our Contributing Guide to get started.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for ezstitcher 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ezstitcher-1.1.0.tar.gz | 70.8 kB | Without provenance | Details for ezstitcher-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ezstitcher-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for ezstitcher-1.1.0-py3-none-any.whl |
Total release size: 149.7 kB
Release files / ezstitcher-1.1.0.tar.gz
| Download URL | ezstitcher-1.1.0.tar.gz |
|---|---|
| Size | 70.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9353e234ea64f118ed4aac6fa7698500cd4a4a5d99906078e9b90f1e809de230
|
|
BLAKE2b-256 checksum How to use checksums |
d299b1d1f80eed2e5618d53314f1e6b6d340c635deda196241a48b21784ab74b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Release files / ezstitcher-1.1.0-py3-none-any.whl
| Download URL | ezstitcher-1.1.0-py3-none-any.whl |
|---|---|
| Size | 78.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29e2f7e388ea7ea89bf80f2fe07f2e9d4660a79798fa80a946dbc4207c5ad450
|
|
BLAKE2b-256 checksum How to use checksums |
513956c364f87e177607ed39a8d73c6fdef57b003f2660c0240529fe4fa6481c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Security for ezstitcher 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.