This slide intentionally left blank

Contributing to the napari community:

widgets, plugins, napari core, documentation—oh my!


Peter Sobolewski (he/him)

Systems Analyst
Imaging Applications
Research IT
The Jackson Laboratory

Member, napari core developer team

napari logo

What is napari?

a Python library for n-dimensional image visualisation, annotation, and analysis. screenshot of napari viewer in 3D rendering mode showing 3 layers: 1) image of cell nuclei (green), 2) image of cell membranes (purple), 3) points indicating nuclei (red)

What can napari be used for?

  • view & explore 2D, 3D, and higher-dimensional arrays
  • overlay derived data such as points, polygons, labels, and more
  • seamlessly weave exploration, computation, and annotation together in imaging data analysis
  • leverage scientific Python ecosystem

napari is an open-source, community developed project—anyone can contribute!

What is the napari community?

  • napari users: local and global
  • napari plugin developers
  • napari core developers
  • broader scientific Python community

Ask and answer questions!

Report bugs—or test existing ones

Discuss features and use-cases

Headless napari is just Python!

– Juan Nunez-Iglesias (@jni)

Share Python scripts & notebooks!

expand for full code
from skimage import data
from scipy import ndimage as ndi

import napari

blobs = data.binary_blobs(length=128, volume_fraction=0.1, n_dim=3)
labeled = ndi.label(blobs)[0]
viewer, image_layer = napari.imshow(blobs, name='blobs')
viewer.add_labels(labeled, name='blob ID')
viewer.dims.ndisplay = 3
viewer.camera.zoom = 3
viewer.camera.angles = (3, 38, 53)

if __name__ == '__main__':
    napari.run()
A rotated 3D view of labled blobs

Python scripts can handle keyboard and mouse events!

@viewer.bind_key('a')
def accept_image(viewer):
    msg = 'this is a good image'
    viewer.status = msg
    print(msg)

Python scripts can contribute widgets!

Screenshot of napari UI with a docked widget on the right for applying scikit-image filters

Python scripts can contribute widgets!

How to share Python scripts & notebooks

  • email/fileshare with colleagues, collaborators, etc.
  • use GitHub:
  • with publication (Zenodo, etc.)

Develop a napari plugin

napari plugins are Python packages that can:

  • add file-type readers & writers
  • customize functionality (events)
  • extend the GUI (widgets, menus)
  • provide demo/sample data

Plugin developer guide: https://napari.org/dev/plugins/index.html

Plugins can be installed from within napari

  • plugins can be publically discoverable and have global reach via PyPI and napari-hub.org

Screenshot of napari UI showing the plugin install/uninstall UI

Contribute to documentation

napari documentation repository: https://github.com/napari/docs

Contribution guide: https://napari.org/dev/developers/documentation/index.html

  • write a how-to, guide, or tutorial
  • share a workshop
  • help document features/use cases
  • copy edit & review

Contribute code

napari repository: https://github.com/napari/napari Contribution guide: https://napari.org/dev/developers/contributing.html

  • fix a bug (close an issue)
  • write an example for the Gallery
  • implement a feature
  • review code

Hope to see you soon!
Thank you!