An easy-to-use microscopy image stitching and processing tool
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezstitcher-1.1.0.tar.gz.
File metadata
- Download URL: ezstitcher-1.1.0.tar.gz
- Upload date:
- Size: 70.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9353e234ea64f118ed4aac6fa7698500cd4a4a5d99906078e9b90f1e809de230
|
|
| MD5 |
56ffeb89134322d2057ebab06756079a
|
|
| BLAKE2b-256 |
d299b1d1f80eed2e5618d53314f1e6b6d340c635deda196241a48b21784ab74b
|
File details
Details for the file ezstitcher-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ezstitcher-1.1.0-py3-none-any.whl
- Upload date:
- Size: 78.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29e2f7e388ea7ea89bf80f2fe07f2e9d4660a79798fa80a946dbc4207c5ad450
|
|
| MD5 |
92c5899e8ac394e20912acb0079505c0
|
|
| BLAKE2b-256 |
513956c364f87e177607ed39a8d73c6fdef57b003f2660c0240529fe4fa6481c
|