Skip to main content

A lightweight plugin extending label layer control

Project description


License PyPI Python Version tests codecov napari hub

A lightweight plugin extending label layer control.

This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.


This lightweight plugin helps you navigate your labels layer. It is intended to ease your manual annotation work. Overview image

  • Select a label from the list.
  • Toggle the visibility of individual label entries.
  • Move to the centroid of a label at the current zoom.
  • Change the color of individual labels.
  • Erase all drawn pixels of a given label.


Start the plugin Plugins > napari-annotator: Annotator.

The plugin will list available labels once a labels layer is selected and labels drawn.

Color shuffling for labels will not work, since the plugin sets the color mode of the layer to direct. But you can always change the color of individual labels, using the color picker.

Known limitations

  1. Lag when drawing (probably related to this issue).
  2. Erasing a label is not un-doable.
  3. Locating / moving to the center of a label only works on 2D/3D label layers, i.e.:
    1. single- / multi-channel 2D label layers.
    2. single-channel 3D label layers (the third dimension being either Z or T).
  4. Maximum 255 labels supported. Increasing number of supported label is possible, but when increasing it, colors in the canvas will mismatch the layer control and plugin entries (probably related to this issue)

Note to self:

I am using a private object/methods for accessing napari icons (i.e. _icons.get_icon_path('picker')). This is not amethod directly directly from the viewer or layer, but is it still OK?


Not yet available via pip. Only from source.

To install latest development version :

pip install git+


Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.


Distributed under the terms of the BSD-3 license, "napari-annotator" is free and open source software.


If you encounter any problems, please file an issue along with a detailed description. Or open a thread on with a detailed description and a @loicsauteur tag.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_annotator-0.0.1.tar.gz (13.5 kB view hashes)

Uploaded source

Built Distribution

napari_annotator-0.0.1-py3-none-any.whl (13.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page