Skip to main content
EZStitcher Logo

EZStitcher

PyPI version Documentation Status License: MIT Coverage

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:

🤝 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)

Source distribution for ezstitcher 1.1.0
File Size Uploaded
ezstitcher-1.1.0.tar.gz 70.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ezstitcher 1.1.0
File Interpreter ABI Platform
ezstitcher-1.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.51

2 release files

0.1.50

2 release files

0.1.49

2 release files

0.1.48

2 release files

0.1.47

2 release files

0.1.46

2 release files

0.1.45

2 release files

0.1.44

2 release files

0.1.43

2 release files

0.1.42

2 release files

0.1.41

2 release files

0.1.40

2 release files

0.1.39

2 release files

0.1.38

2 release files

0.1.37

2 release files

0.1.35

2 release files

0.1.32

2 release files

0.1.31

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page