ZELDA: a 3D Image Segmentation and Parent-Child relation plugin for microscopy image analysis in napari
Article: Front. Comput. Sci., 04 January 2022 | https://doi.org/10.3389/fcomp.2021.796117
Examples of 2D and 3D data sets: https://doi.org/10.5281/zenodo.5651284
The plugin can be used to analyze 2D/3D image data sets.
Multidimensional images (each channel corresponding to a napari layer) can be used to:
-
Segment objects such as cells and organelles in 2D/3D.
-
Segment two populations in 2D/3D (e.g. cells and organelles, nuclei and nuclear spots, tissue structures and cells) establishing the "Parent-Child" relation: count how many mitochondria are contained in each cell, how many spots localize in every nucleus, how many cells are within a tissue compartment.
Example: cell cytoplasms (parent objects) and mitochondria (child objects)
Actin |
Mitochondria |
Merge |
---|---|---|
Parent cell cytoplasms |
Children mitochondria |
Children labelled by Parents |
The images shown above are available in the docs folder of this repository and were segmented using ZELDA with the following parameters:
Parent objects | GB: sigma=2.0-> Th_parents=60.0-> DistMap-> Maxima: min_dist=10 |
---|---|
Children objects | GB: sigma=0.3-> Th_children=450.0 -> DistMap-> Maxima: min_dist=2 |
For small monitors it may be convenient to float the protocol panel
Float a panel in napari |
---|
-
Plot results within napari interface.
Histogram
Scatterplot -
Customize an image analysis workflow in graphical mode (no scripting knowledge required).
Custom image analysis workflow -
Import and Export Protocols (image analysis workflows) in graphical mode (share with the community!).
Import and Export of ZELDA Protocols
Option A. The easiest option is to use the napari interface to install ZELDA (make sure napari!=0.4.11):
- Plugins / Install/Uninstall Package(s)
Option B. You can install napari-zelda
also via pip. For the best experience, create a conda environment and use napari!=0.4.11, using the following instructions:
conda create -y -n napari-env python=3.8
conda activate napari-env
conda install napari pyqt
pip install napari-zelda
Option C. Alternatively, clone the repository and install locally via pip:
pip install -e .
Option D. Get the latest code with git and pip:
conda create -y -n napari-env python=3.8 git
conda activate napari-env
conda install napari pyqt
pip install git+https://github.com/RoccoDAnt/napari-zelda.git
This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-napari-plugin template.
The GUI has been developed using magicgui widgets, while the image analysis and processing include functions from scikit-image, SciPy, and NumPy. Results are handled with pandas and datatable. Plots are obtained with matplotlib.
Contributions are welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Users can add new protocol steps to their local installation using magicgui widgets. Code can be added at the end of napari_zelda.py file:
###Add here new functionalities for ZELDA ###
###@magicgui(layout="vertical")
###def new_functionality_widget(viewer: 'napari.Viewer'):
###...
###End###
Distributed under the terms of the BSD-3 license, "napari-zelda" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.