Skip to main content

Hierarchical file format support for napari

Project description


License MIT PyPI Python Version tests codecov napari hub

Hierarchical file format support for napari

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


You can install napari-hierarchical via pip:

pip install "napari-hierarchical[all]"

To install latest development version :

pip install "git+[all]"


The plugin enables the reading, editing and writing of container formats. In the plugin, groups represent hierarchically structured collections of arrays. Each group can hold zero or more arrays and can have zero or more child groups (hierarchical structure). An array is a logical representation of (image) data on disk and directly corresponds to a napari layer when loaded.

Files can be opened through napari (e.g. File -> Open File(s) menu, function), as the plugin implements napari's file reader hook. Upon opening a hierarchically structured file, the Groups and Arrays widgets are displayed. The Groups widget allows to browse and restructure the groups tree, while the Arrays widget groups arrays from the selected groups by file format-specific metadata (e.g. channel name for MCD files). Selecting arrays also selects the corresponding napari layers, allowing to adjust their properties.

Arrays can be loaded individually by toggling their loaded state (circular button), which will add napari layers for the corresponding arrays. Similarly, loaded arrays can be shown or hidden by toggling their visible state (eye button), which will toggle the visibility of the associated napari layers. The loaded/visible states of groups (collections of arrays) can be toggled in a similar fashion. Arrays are always loaded into memory (no memory mapping), to allow for editing the tree structure. Loaded root groups can be exported to supported hierarchical file formats.

Currently, reading/writing of HDF5 and Zarr (not: OME-NGFF) files are supported out of the box, as well as reading imaging mass cytometry (IMC) data (i.e., MCD files). For these file formats, sample data is available through the plugin. Additional readers/writers can be implemented using a pluggy-based interface, similar to the first generation napari-plugin-engine.


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 MIT license, "napari-hierarchical" is free and open source software


If you encounter any problems, please file an issue along with a detailed description.

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-hierarchical-0.1.0.tar.gz (35.7 kB view hashes)

Uploaded source

Built Distribution

napari_hierarchical-0.1.0-py3-none-any.whl (47.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page