Napari features an important hub containing 118 plugins at the time of writing, many of them expanding further the capabilities of Napari when dealing with biomedical imaging. We thus created our own plugin to allow users to work in Napari, benefit from the tools, scripting and existing plugins, and easily visualize and share the output of their research through TissUUmaps.
The Napari-TissUUmaps plugin is available on Napari Hub which makes the installation trivial: from the Napari install/uninstall plugins menu, the
napari-tissuumaps appears in the list and can be installed with a single click. Alternatively, the plugin can be installed with the Python package manager:
pip install napari-tissuumaps.
The plugin can export all standard Napari layers, such as images, labels, points, and shapes and preserves the metadata (opacity, visibility), but also the objects parameters (e.g.: label colors, marker colors and symbols, etc…). To export a TissUUmaps project, care must be taken to save all layers of interest and type in a name with the extension
myProject.tmap. This is important for Napari to delegate the saving of the files to the plugin. A folder is created and contains all the necessary files and can be loaded in the TissUUmaps server, software, Jupyter Notebook, or shared with the community.
The project folders generated by the plugin contain the metadata in a
main.tmap file, along with folders for each Napari layer types: images, labels, points and regions. Images and labels are saved as plain tif images, points are saved as CSV files, and shapes are saved as GeoJSON. We hope that the use of a simple structure and widespread file formats can simplify the modifying and updating of the TissUUmaps project when prototyping with e.g. Jupyter Notebooks.
The source code is available at https://github.com/TissUUmaps/napari-tissuumaps under the permissive MIT license.
A demonstration of the Cellpose plugin of Napari being exported to the TissUUmaps web viewer is available at: https://tissuumaps.github.io/tutorials/#napari.