Skip to content

Wave optical models and inverse algorithms for label-agnostic imaging of density & orientation.

License

Notifications You must be signed in to change notification settings

mehta-lab/waveorder

Repository files navigation

waveorder

Python package index PyPI monthly downloads Total downloads GitHub contributors GitHub Repo stars GitHub forks PyPI - Python Version

This computational imaging library enables wave-optical simulation and reconstruction of optical properties that report microscopic architectural order.

Computational label-agnostic imaging

figure-slideshow.mp4

waveorder enables simulations and reconstructions of label-agnostic microscopy data as described in the following preprint

Chandler et al. 2024

@article{chandler_2024,
    author = {Chandler, Talon and Hirata-Miyasaki, Eduardo and Ivanov, Ivan E. and Liu, Ziwen and Sundarraman, Deepika and Ryan, Allyson Quinn and Jacobo, Adrian and Balla, Keir and Mehta, Shalin B.},
	title = {waveOrder: generalist framework for label-agnostic computational microscopy},
	journal = {arXiv},
	year = {2024},
	month = dec,
	eprint = {2412.09775},
	doi = {10.48550/arXiv.2412.09775}
}

Specifically, waveorder enables simulation and reconstruction of 2D or 3D:

  1. phase, projected retardance, and in-plane orientation from a polarization-diverse volumetric brightfield acquisition (QLIPP),

  2. phase from a volumetric brightfield acquisition (2D phase/3D phase),

  3. phase from an illumination-diverse volumetric acquisition (2D/3D differential phase contrast),

  4. fluorescence density from a widefield volumetric fluorescence acquisition (fluorescence deconvolution).

The examples demonstrate simulations and reconstruction for 2D QLIPP, 3D PODT, 3D fluorescence deconvolution, and 2D/3D PTI methods.

If you are interested in deploying QLIPP, phase from brightfield, or fluorescence deconvolution for label-agnostic imaging at scale, checkout our napari plugin, recOrder-napari.

Permittivity tensor imaging

Additionally, waveorder enabled the development of a new label-free imaging method, permittivity tensor imaging (PTI), that measures density and 3D orientation of biomolecules with diffraction-limited resolution. These measurements are reconstructed from polarization-resolved images acquired with a sequence of oblique illuminations.

The acquisition, calibration, background correction, reconstruction, and applications of PTI are described in the following paper published in Nature Methods:

Yeh et al. 2024

@article{yeh_2024,
	author = {Yeh, Li-Hao and Ivanov, Ivan E. and Chandler, Talon and Byrum, Janie R. and Chhun, Bryant B. and Guo, Syuan-Ming and Foltz, Cameron and Hashemi, Ezzat and Perez-Bermejo, Juan A. and Wang, Huijun and Yu, Yanhao and Kazansky, Peter G. and Conklin, Bruce R. and Han, May H. and Mehta, Shalin B.},
	title = {Permittivity tensor imaging: modular label-free imaging of 3D dry mass and 3D orientation at high resolution},
	journal = {Nature Methods},
	volume = {21},
	number = {7},
	pages = {1257--1274},
	year = {2024},
	month = jul,
	issn = {1548-7105},
	publisher = {Nature Publishing Group},
	doi = {10.1038/s41592-024-02291-w}
}

PTI provides volumetric reconstructions of mean permittivity ($\propto$ material density), differential permittivity ($\propto$ material anisotropy), 3D orientation, and optic sign. The following figure summarizes PTI acquisition and reconstruction with a small optical section of the mouse brain tissue:

Data_flow

Examples

The examples illustrate simulations and reconstruction for 2D QLIPP, 3D phase from brightfield, and 2D/3D PTI methods.

If you are interested in deploying QLIPP or phase from brightbrield, or fluorescence deconvolution for label-agnostic imaging at scale, checkout our napari plugin, recOrder-napari.

Citation

Please cite this repository, along with the relevant preprint or paper, if you use or adapt this code. The citation information can be found by clicking "Cite this repository" button in the About section in the right sidebar.

Installation

Create a virtual environment:

conda create -y -n waveorder python=3.10
conda activate waveorder

Install waveorder from PyPI:

pip install waveorder

Use waveorder in your scripts:

python
>>> import waveorder

(Optional) Install example dependencies, clone the repository, and run an example script:

pip install waveorder[examples]
git clone https://github.com/mehta-lab/waveorder.git
python waveorder/examples/models/phase_thick_3d.py

(M1 users) pytorch has incomplete GPU support, so please use export PYTORCH_ENABLE_MPS_FALLBACK=1 to allow some operators to fallback to CPU if you plan to use GPU acceleration for polarization reconstruction.