napari 0.5.6#
Fri, Jan 17, 2025
🚧 These notes are under construction while in pre-release 🚧
We’re happy to announce the release of napari 0.5.6!
napari is a fast, interactive, multi-dimensional image viewer for Python. It’s designed for exploring, annotating, and analyzing multi-dimensional images. It’s built on Qt (for the GUI), VisPy (for performant GPU-based rendering), and the scientific Python stack (NumPy, SciPy, and friends).
For more information, examples, and documentation, please visit our website: https://napari.org/
Highlights#
Faster shapes 🚀#
For its whole history, napari has been a pure Python package. As we go deeper into its performance bottlenecks, though, we’re finding that we need some compiled code. This is a big change to the napari installation story, though, so we are rolling it out slowly. But if you’ve been waiting forever to load your shapes data, this release has some enhancements for you (>2x speedup)! (#7346)
To use this speedup, you’ll need to:
install napari core developer Grzegorz Bokota’s collection of performant algorithms, PartSegCore-compiled-backend. (you can install it automatically by pip installing
"napari[optional]"
.)and, in the napari advanced settings, tick the “Use C++ code to speed up creation and updates of Shapes layers” box.
Please give it a try and let us know if you encounter any issues! This is the beginning of a new era of performance improvements in napari, to help it live up to its promise of a fast viewer for n-dimensional data in Python!
New path drawing tool#
Drawing paths is easier and smoother with the open-line equilavent of the lasso tool. If you want to draw a curve through your data, whether with a mouse or a tablet+stylus, it is now much easier to freehand rather than clicking on individual points. Try it out! (#7099)
Other improvements#
Often, the important information in a layer name is at the end of the name rather than the beginning. We’ve improved the eliding (…) of long names by placing the ellipsis in the middle of the name rather than the end (#7461).
The default value of “flash” has been changed to False
in
viewer.screenshot
, so that taking many screenshots in a script will not
result in rapid flickering
(#7476). This is part of a
broader accessibility initiative by recent contributor Tim
Monko to improve napari for light-sensitive
users (#7433, and we are so
grateful! 🙏
Read on for the full list of changes since 0.5.5.
Add poly line drawing (#7099)
New Features#
Improvements#
Perform triangulation using compiled backend (#7346)
stop/start notification timer on window focus change (#7392)
Extend reading with plugins to allow Layer objects (#7443)
Add CtrlCmd-Backspace as a 2ndary delete_selected_layer keybind (#7449)
Change default flash behavior for
viewer
screenshot-like methods (GUI functionality remains the same) (#7476)Update pyproject.toml remove upper bound on numpy on python 3.9 (#7500)
[Enhancement] Modify attenuation slider aspect: attenuation value is displayed (#7523)
Performance#
Bug Fixes#
[bugfix] Adjust scale bar position based on font_size when at top (#7018)
[Bugfix] Don’t exit Preferences widget when using Return/Enter to confirm a shortcut (#7420)
Fix thread warning if not
napari.run()
is called (#7450)Fix highlighting artifacts when selecting multiple shapes (#7457)
Fix selection of nD-sliced shapes (#7459)
[bugfix] use mean instead of norm for fixed aspect scaling in transform mode (#7466)
TracksFilter head_length property bug (#7474)
Use faster triangulation edge function form compiled backend (#7512)
Bugfix: Check if Layer._loaded before returning status (#7515)
Breakout gray and gray_r from mpl_colormaps and ensure they work with
ensure_colormap
(#7517)Update camera depth when layer extents change (#7529)
Documentation#
Add an image to the get_current_viewer example (#7462)
Add initial UI sections docs pages and script for generation (docs#114)
Update tutorials (docs#514)
Add version warning banner for old versions of the docs (docs#531)
Add troubleshooting page (docs#533)
add info on how to cross-reference gallery examples (docs#534)
Add reference to napari architecture guide in the contributing guide (docs#537)
Fix broken link in installation tutorial (docs#539)
Add docs on advanced contrast limits widget (docs#542)
Update version_switcher.json for 0.5.5 (docs#543)
Add resources page with logos (docs#544)
add documentation for new path tool (docs#547)
Add 0.5.6 release notes (docs#548)
Other Pull Requests#
Bump tifffile version to 2022.7.28 (#7371)
Update
app-model
,certifi
,coverage
,dask
,hypothesis
,imageio
,ipython
,matplotlib
,napari-console
,pydantic
,pyqt6
,pytest
,scikit-image
,superqt
,tensorstore
,tifffile
,tqdm
,virtualenv
,xarray
,zarr
(#7406)[pre-commit.ci] pre-commit autoupdate (#7451)
Update
dask
,fsspec
,hypothesis
,ipython
,magicgui
,napari-console
,psutil
,pydantic
(#7464)[pre-commit.ci] pre-commit autoupdate (#7465)
changes Shapes data to float32 and reduce randomization in tests shapes test (#7470)
Fix typo observable in Preferences -> Appearance (#7472)
Set pytest configuration file for test run using pip (#7473)
Update
coverage
,hypothesis
(#7475)[py313] Fix test_qt_plugin_sorter on Python >= 3.13 (#7479)
[–pre] Update constraints to allow pyOpenGL 3.1.7, but block 3.1.9a1 (#7480)
[py313] Update test_prereleases.yml to add py313 (#7481)
[py313] Update plugins/test_utils.py to account for Windows py313 os.path.isabs change (#7482)
Flip z axis on 3D camera to default to right-handed frame (#7488)
[Maint] Update version_denylist.txt to block zarr rc1 in –pre tests (#7489)
Update
hypothesis
,napari-plugin-manager
,pillow
,pydantic
,pygments
,scipy
,superqt
,virtualenv
,xarray
,zarr
(#7491)[pre-commit.ci] pre-commit autoupdate (#7494)
Specify dtype when using zarr.Group.create_array (#7497)
remove xfail from test_add_many_zarr_1d_array_is_ignored (#7501)
Remove numpy constraints from docs dependency (#7510)
[maint] Update pyproject.toml to move plugin manager to optional and let triangle work on arm64 (#7511)
Update
hypothesis
,scipy
,tifffile
,wrapt
(#7514)Revert #7488 “Flip z axis on 3D camera to default to right-handed frame” (#7519)
Add test suite without numba (#7520)
[pre-commit.ci] pre-commit autoupdate (#7522)
Revert PR #3243 ; commit 68157f3 ; (drop compatibility, just use QLabeled* sliders) (#7525)
Fix formatting after ruff update in #7522 (#7530)
13 reviewers added to this release (alphabetical)#
(+) denotes first-time contributors 🥳
Daniel Althviz Moré - @dalthviz
Draga Doncila Pop - @DragaDoncila
Etienne Doumazane - @edoumazane +
Genevieve Buckley - @GenevieveBuckley
Grzegorz Bokota - @Czaki
Juan Nunez-Iglesias - @jni
kyle i. s. harrington - @kephale
Lorenzo Gaifas - @brisvag
Melissa Weber Mendonça - @melissawm
Peter Sobolewski - @psobolewskiPhD
Sesan - @Olusesan +
Wouter-Michiel Vierdag (docs) - @melonora