This package is the 2nd generation of the Arizona State University Quantitative Imaging and Inference Lab (qi2lab) oblique plane microscopy (OPM) processing software. Currently, it assumes that data is generated using (1) our 2nd generation OPM control code or (2) the ASI single-objective light sheet Micromanager plugin. The ASI instrument support is experimental and will continue to evolve as we get more data examples from "in the wild" instruments.
The core algorithms can be used for any microscope that acquires data at a skewed angle, including diSPIM, LLSM, or OPM. Please open an issue if you would like help adapting the code to work with your microscope, we are happy to assist.
The goal is provide highly performant data I/O via Tensorstore and image processing (illumination correction, deconvolution, deskewing, downsampling, maximum Z projection, and 3D stitching+fusion) via Numba, CuPy, and cuCIM.
We rely on BaSiCPy to post-hoc estimate illumination profiles and a modified version of gradient consensus Richardson-Lucy deconvolution to perform 3D deconvolution.
Create a python 3.12 environment,
conda create -n opmprocessing python=3.12
activate the environment,
conda activate opmprocessing
install the repository and register the local cuda code. On Windows, this will also install the skimage
portion of cucim
.
pip install "opm-processing-v2 @ git+https://github.com/QI2lab/opm-processing-v2"
setup-cuda
conda deactivate opmprocessing
Activate the conda environment,
conda activate opmprocessing
To deskew raw data,
process "/path/to/qi2lab_acquisition.zarr"
If you get an error, make sure you ran setup-cuda
!
The defaults parameters generate different outputs depending if it acquisition is of oblique or projection data.
For oblique data, there are three zarr3 compliant datastores:
- Full 3D data (
/path/to/qi2lab_acquisition_deskewed.zarr
) with dimensionstpczyx
. - Maximum Z projections (
/path/to/qi2lab_acquisition_max_z_deskewed.zarr
) with dimensionstpcyx
. - Stage-position fused maximum z projections (
/path/to/qi2lab_acquisition_maxz.zarr
) with dimensionstcyx
.
For projection data, there are two zarr3 compliant datastores:
- Full 2D projection data (
/path/to/qi2lab_acquisition_deconvolved.zarr
) with dimensionstpczyx
. - Stage-position fused 2D projection data (
/path/to/qi2lab_acquisition_fused.zarr
) with dimensionstcyx
.
All datastores are camera offset and gain corrected. The fused datastore uses the provided stage positions, without optimization.
To display deskewed data,
display "/path/to/qi2lab_acquisition.zarr" --to_display full
There are three to_display
options that correspond to the three datastores described above,
- full
- max-z
- fused-max-z
- fused-full
To register and fuse optionally deconvolved and desekwed data into an ome-ngff v0.5 datastore,
fuse "/path/to/qi2lab_acquisition.zarr"
The registered, optionally deconvolved, and fused data will be in /path/to/qi2lab_acquisition_fused_deskewed.ome.zarr