Software Open Access
Nicholas Sofroniew; Kira Evans; Talley Lambert; Juan Nunez-Iglesias; Ahmet Can Solak; Kevin Yamauchi; Genevieve Buckley; Tony Tung; Grzegorz Bokota; Peter Boone; Jeremy Freeman; Hagai Har-Gil; Loic Royer; Shannon Axelrod; jakirkham; Reece Dunham; Pranathi Vemuri; Mars Huang; Hector; Bryant; Ariel Rokem; Justin Kiggins; Hugo van Kemenade; Heath Patterson; Guillaume Gay; Eric Perlman; Davis Bennett; Christoph Gohlke; Bhavya Chopra; Alexandre de Siqueira
We're happy to announce the release of napari 0.3.0!
napari is a fast, interactive, multi-dimensional image viewer for Python. It's designed for browsing, annotating, and analyzing large multi-dimensional images. It's built on top of Qt (for the GUI), vispy (for performant GPU-based rendering), and the scientific Python stack (numpy, scipy).
This is the first "major" release since 0.2.0 and is the culmination of 6 months of work by our developer community. We have made a small number of breaking changes to the API, and added several new capabilities to napari, so we encourage you to read on for more details.
For more information, examples, and documentation, please visit our website: https://napari.orgHighlights Community and governance
After the 0.2.5 release, which was our first publicly-announced release, we worked to rapidly turn napari into a mature library in the scientific Python ecosystem. We added a code of conduct, a mission and values document, and adopted a community governance model (based on scikit-image's, and since adopted with modifications by zarr). These are accessible from our developer resources page, together with a public roadmap explaining where the core team will devote effort in the coming months.
We are still humbled by the enthusiasm of the community response to napari and we hope that the above documents will continue to encourage potential users to join our community. We welcome contributions of all kinds and encourage you to get in touch with us if you don't see your most wanted feature in our roadmap, or as an issue in our issue tracker.Getting in touch
We joined the image.sc forum and actively monitor it (under the "napari" tag) to help users with any issues they might have using napari and have discussions about exciting ways to use napari. If you're new to napari and getting started this is the first place you should go for help.
If you've found a napari bug or have a specific feature request, please let us know in our GitHub issues.IO plugins
Contributors can now easily extend napari to open and save in a variety of file formats, both local and remote, through our plugin architecture. The same file formats as before are available to read (TIFF, most image file formats supported by imageio, and zarr). However, we can now write to all these formats, and read and write point and shape annotations in .csv format. Additionally, we have made it possible for anyone to create packages for napari to read and write in any other formats through plugins. You can read about our plugin architecture here.
Want to drag and drop your favorite file format into napari and have it load automatically? See this guide to understand how to write your own plugin, see Jackson Brown's napari-aicsimageio for an exemplar plugin, and get started with Talley's cookiecutter napari plugin!
Many thanks to Talley Lambert for driving this effort!Dockable widgets and magicgui
Another brainchild of Talley is our dockable widget architecture, which allows you to pop out the napari UI elements from the main window, enabling, for example, those on multi-monitor setups to have the toolbars on one monitor and the main window in full-screen on another.
Even better, we have released a side package called magicgui to allow you to create your own dockable widgets with which to interact with napari without writing GUI code. We are still working on standard models of interaction here (see our roadmap), but you should be able to get started creating useful user interfaces right now. This image.sc post by Talley provides a good overview of how to create interaction with napari right now, and this GitHub answer explains how to embed a matplotlib plot within napari.Multiscale image handling
napari is now much better at handling large datasets. Viewing a large dataset
will no longer trigger automatic — but very slow, and often unnecessary —
generation of an image pyramid. Instead, we direct users to our tutorial on
how to generate your own
scikit-image. For large arrays, users may want to look at the
If you submit an image pyramid, napari will automatically detect it as such. To
turn off automatic detection, you can now pass the
add_image. This replaces the
is_pyramid parameter which has
now been removed. In the future, we aim to add multiscale capabilities to all
We have also fixed the bug where too small a tile was shown to fill the entire canvas.Points with properties
Points are no longer generic coordinates floating in space! Each point can have
its own personality and character :-). Specifically, each point can have an
arbitrary number of properties, and attributes such as size, face color, and
edge color can be determined by those properties. This makes it easier to
annotate multiple types of points in an image, such as different cell types. To
assign properties to points you can pass a dictionary as the
We are taking the opportunity of this major release to update a few APIs. We hope that the number of users impacted by these changes will be small. In each case, we provide an equivalent API for the same functionality.
viewer.add_pathhas been renamed
viewer.openand gained the ability to read to any layer type.
add_labels(path=...)have been removed. Users should use
viewer.open(...)instead with the
layer_typeparameter to force the added data to be a particular layer type, e.g.
add_image(..., is_pyramid=False)is now
add_image(..., multiscale=False). This will allow us to use a consistent keyword argument when we add multiscale support for other layer types.
layer.to_svg()has been removed. This functionality is now implemented with
viewer.save('path/to/layer.svg', layer, plugin='svg')through our plugin architecture.
Thanks to the ever-creative Kira Evans, napari will now populate layer names based on the name of the variables being visualized:
import napari from skimage import data camera = data.camera() with napari.gui_qt(): viewer = napari.view_image(camera) print(viewer.layers.name) # prints "camera"!
In Python 3.8, the name will even be visible if you are using the assignment expression a.k.a. the walrus operator:
import napari from skimage import data with napari.gui_qt(): viewer = napari.view_image(camera := data.camera()) print(viewer.layers.name) # prints "camera"!
_HookCallerand registration updates (#1153)