Skip to main content

Multi-view light sheet microscopy image processing pipeline

Project description

IsoView Light Sheet Microscopy Pipeline

Acquisition Modes

Raw input is always flat — SPC##_TM#####_ANG###_CM#_CHN##_PH#.stack files in a single directory. Mode is auto-detected from SPC/TM counts:

Condition Mode Description
Multiple TM values timelapse time series, any number of specimens
Single TM + multiple SPC tiled spatial tiles, one timepoint
Single TM + single SPC single treated as timelapse with 1 timepoint

Filename Tags

Tag Meaning Raw Corrected
SPC## / SPM## specimen / tile SPC00 SPM00
TM##### timepoint TM00000 TM000000
CM# camera CM0 CM00
CHN## channel (raw) CHN00, CHN01
VW## view (corrected) VW00 (z-scan), VW90 (y-scan)
ANG### illumination angle ANG000 — (dropped)
PH# phase PH0 — (dropped)

Output Layout

Output directory: {input_dir.name}{corrected_suffix} as sibling of input.

All below result path's use the default corrected_suffix .corrected.

Correction (correct_stack.py)

Mode Path Filename
Timelapse root.corrected/SPM00/TM000000/ SPM00_TM000000_CM00_VW00.ome.tif
Tiled root.corrected/SPM00/ SPM00_CM00_VW00.ome.tif

Each tile will have a SPM0N folder, where N is the tile index.

Fusion (multi_fuse)

Mode Path Filename
Timelapse root.corrected/Results/MultiFused_adaptive/SPM00/TM000000/ SPM00_TM000000_CM00_CM01_VW00.ome.tif
Tiled root.corrected/Results/MultiFused_adaptive/SPM00/ SPM00_CM00_CM01_VW00.ome.tif

Default pairs: [(0, 1), (2, 3)] — cameras 0,1 share CHN00/VW00; cameras 2,3 share CHN01/VW90. Only the second camera in each pair gets rotation/flip transforms.

Supported Output Formats

Format Extension Notes
OME-TIFF .ome.tif with metadata, optional resolution pyramids
Zarr v3 ome.zarr OME-NGFF metadata
KLB .klb Keller Lab Block (bzip2)

Quickstart

  1. isoview init <path/to/raw> — scaffolds a scripts/ folder next to the raw data with correct_stack.py, multi_fuse.py, pipeline.ipynb, and parameters.md.
  2. Open scripts/ in VSCode and run correct_stack.py then multi_fuse.py, or open pipeline.ipynb and run both cells.
  3. Each step appends its config + isoview_version to isoview_config.json next to the data, so every run is reproducible.

See examples/compression_demo.py for a full end-to-end run on 10 timepoints. Full parameter reference: parameters.md.

Usage

Entrypoints: pipeline/correct_stack.py (correction) and pipeline/multi_fuse.py (fusion).

from pathlib import Path
from isoview import ProcessingConfig, correct_stack, multi_fuse

config = ProcessingConfig(
    input_dir=Path(r"E:\isoview\dataset"),
    # specimens=None,                       # auto-detect from SPC## in filenames
    # timepoints=None,                      # auto-detect from TM## in filenames
    corrected_suffix=".corrected",          # output folder suffix
    specimen=0,                             # default specimen index
    camera_pairs=[(0, 1), (2, 3)],          # ortho camera pairs to fuse

    # output
    output_format="tif",                    # tif, zarr, or klb
    compression="zstd",                     # zstd, lzw, deflate, or None
    compression_level=3,                    # 1-22 for zstd, 1-9 for others

    # transforms (applied to second camera in each pair)
    rotation=0,                             # 0=none, 1=90cw, -1=90ccw
    flip_horizontal=False,
    flip_vertical=False,

    # correction
    median_kernel=(3, 3),                   # dead pixel filter, None to disable
    background_percentile=5.0,
    mask_percentile=1.0,
    segment_mode=1,                         # 0=none, 1=segment+mask, 2=masks, 3=global

    # fusion
    blending_method="adaptive",             # adaptive, geometric, average, wavelet
    blending_range=20,                      # transition zone width (z-planes)

    # per-specimen overrides (tiled mode)
    # tile_crops={"SPM00": {"crop_depth": {0: 450}}}
    # view_orientation={"SPM00": {"flip_axis": 1}, "SPM01": {"flip_axis": 0}}
)

correct_stack(config)
multi_fuse(config, estimate_params=True, apply_fusion=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isoview-0.1.3.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isoview-0.1.3-py3-none-any.whl (91.6 kB view details)

Uploaded Python 3

File details

Details for the file isoview-0.1.3.tar.gz.

File metadata

  • Download URL: isoview-0.1.3.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for isoview-0.1.3.tar.gz
Algorithm Hash digest
SHA256 93d6f30900b7683249aad3bcd7bedc908c43ac77b9e59d0d5840bdd74b7c3d63
MD5 17336a46d955fce9c867c97459b5d42e
BLAKE2b-256 c4029c7644c64ea2c06caa847c4f2b5456597c33237f37d59985e271f48c2100

See more details on using hashes here.

File details

Details for the file isoview-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: isoview-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 91.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for isoview-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 42a5ef0e04e89332071b6e6928277741500ea7fee24f02607dbd9a8bca573a69
MD5 5a53f45a97ebbabf0b7bfc339b3c339b
BLAKE2b-256 ad89c1a20a5d26dc4105551b6035b0b5cbf0dfd89142f8ec8277c33befcd049b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page