abcucberkeley / PetaKit5D

Other
21 stars 7 forks source link

PetaKit5D

Tools for efficient and scalable processing of petabyte-scale 5D live images or large specimen images from lattice light-sheet microscopy (LLSM) and other light sheet microscopies, as well as other imaging modalities. It is featured by fast image readers and writers (for Tiff and Zarr), combined image deskew/rotation, instantly converged Richardson-Lucy (RL) deconvolution, and scalable Zarr-based stitching. It also contains some other useful tools, including 3D point detection and point tracking (based on Aguet, Upadhyayula et al., 2016), cropping, resampling, max projection, PSF analysis and visualization, and more.

Hardware

The software works best on a Slurm-based Linux computing cluster with multiple CPU and GPU nodes for scalable, large-scale processing. For CPU nodes, we recommend at least 16 GB of RAM per core. For GPU nodes, we currently only support NVIDIA GPUs and recommend at least 24 GB of VRAM per GPU.

The software can also run on a single workstation for smaller-scale image processing tasks (up to ~1 TB, otherwise may take very long). We recommend at least 256 GB of RAM, although a smaller size may still work depending on data sizes and specific processing tasks. For relative large datasets that cause memory issues, we suggest converting the images to Zarr format and applying large-scale processing strategies.

Usage

The tools have been tested with MATLAB R2022b-R2023a for Linux (Ubuntu 22.04), Windows (10 and 11), and MacOS (14). Toolboxes required:

Image Processing Toolbox, Optimization Toolbox, Parallel Computing Toolbox, Signal Processing Toolbox, and Statistics and Machine Learning Toolbox.

Here are the steps to use the software:

  1. Get the source code by either cloning the GitHub repository or downloading the ZIP file. If downloading the zip file, unzip the file to a directory.
  2. Launch MATLAB, navigate to the software's root directory, and add the software to the path with setup.m in the command window.
    setup
  3. Create a script or function to set up the workflows for your image processing tasks by calling related functions. You may follow the examples in the demos. The documentation of the parameters can refer to major_functions_documentation.txt, the GUI wiki page, or the parameter list in the related functions.

Demos

The main demos for the paper:

Python wrappers

We created Python wrappers for the main functions by calling MATLAB runtime in another repository: PyPetaKit5D. This library is only available on Linux for now. The package of the Python wrappers can be installed using this command:

pip install --no-binary :all: --no-cache-dir PyPetaKit5D

Please refer to the example notebooks for step-by-step usage examples using our demo datasets. The parameters for the Python wrappers are identical to those in MATLAB. The documentation of the parameters can refer to major_functions_documentation.txt or the GUI wiki page.

GUI

The software has an easy-to-use Graphical User Interface (GUI) without writing any code in another repository: PetaKit5D-GUI. The GUI supports Windows, MacOS, and Linux (Ubuntu). For instructions on the installation and the usage of the PetaKit5D-GUI, visit the GUI wiki page.

Fast Tiff/Zarr readers and writers

We created independent repositories for Tiff/Zarr readers and writers for users who only need those functions: Cpp-Tiff and Cpp-zarr.

We combined our Tiff/Zarr readers and ImarisWriter to develop a parallelized Imaris converter for Tiff and Zarr files. The C++ source code for this tool is available as an indepenent repository: Parallel_Imaris_Writer.

Based on these readers and writers, we also developed a Fiji Plugin for faster reading and writing of Tiff and Zarr files within Fiji, which can be accessed from Parallel_Fiji_Visualizer.

Reference:

Please cite our paper if you find the software useful for your research:

Ruan, X., Mueller, M., Liu, G., Görlitz, F., Fu, T., Milkie, D.E., Lillvis, J.L., Kuhn, A., Chong, J.G., Hong, J.L., Herr, C.Y.A., Hercule, W., Nienhaus, M., Killilea, A.N., Betzig, E. and Upadhyayula, S. (2024) Image processing tools for petabyte-scale light sheet microscopy data. bioRxiv. bioRxiv 2023.12.31.573734; doi: https://doi.org/10.1101/2023.12.31.573734