Skip to content

ndev-kit/napari-ndev

napari-ndev

License BSD-3 PyPI Python package index download statistics Python Version tests codecov napari hub Static Badge DOI

logo

A collection of widgets intended to serve any person seeking to process microscopy images from start to finish, with no coding necessary. napari-ndev was designed to address the gap between the napari viewer and batch python scripting.

  • Accepts diverse image formats, dimensionality, file size, and maintains key metadata.
  • Allows advanced, arbitrary image processing workflows to be used by novices.
  • User-friendly sparse annotation and batch training of machine learning classifiers.
  • Flexible label measurements, parsing of metadata, and summarization for easily readable datasets.
  • Designed for ease of use, modification, and reproducibility.

See the poster presented at BINA 2024 for an overview of the plugins in action

Try out the Virtual I2K 2024 Workshop for an interactive tutorial

Installation

See the full installation guide for more options including uv and Pixi.

napari-ndev is a pure Python package and can be installed with pip:

pip install napari-ndev

The easiest way to get started is to install the opinionated optional dependencies, which includes napari and PyQt6 (the Qt backend) and additional napari plugins:

pip install napari-ndev[all]

After installation, launch napari with the nDev App widget open:

napari-ndev

This is equivalent to running napari -w napari-ndev "nDev App".


Optional Dependencies

napari-ndev provides several optional dependency groups:

  • [qtpy-backend] - Includes napari[pyqt6] for the Qt GUI
  • [extras] - Additional napari plugins like napari-assistant for enhanced workflows
  • [all] - Everything above plus sample data and themes (recommended)

Additional Image Format Support

napari-ndev uses ndevio for image I/O, which relies on bioio readers. Basic formats (TIFF, OME-TIFF, OME-Zarr, PNG, etc.) work out of the box.

For additional formats, install the appropriate bioio reader:

# CZI files (GPL-3 licensed)
pip install bioio-czi

# LIF files (GPL-3 licensed)
pip install bioio-lif

# Bio-Formats for many proprietary formats
pip install bioio-bioformats

Note: Some bioio readers are GPL-3 licensed. If you install and use these, you must comply with GPL-3 license terms.

Development

For development, clone the repository and install with the dev dependency group:

git clone https://github.com/ndev-kit/napari-ndev.git
cd napari-ndev
pip install -e . --group dev

This includes pytest, pytest-cov, pytest-qt, ruff, pre-commit, and all optional dependencies.

Run tests:

pytest -v --cov=napari_ndev

Pixi Usage

You may locally clone this repo and use Pixi to create a reproducible environment:

git clone https://github.com/ndev-kit/napari-ndev.git
cd napari-ndev

Then launch napari with the nDev plugin:

pixi run napari-ndev

Or install the package in editable/development mode and activate the local environment:

pixi install           # Default environment with qtpy-backend
pixi install -e dev    # Development environment with testing tools
pixi shell             # Activate the environment
napari                 # Run napari or any command

To run tests: pixi run -e dev test


The wide breadth of this plugin's scope is only made possible by the amazing libraries and plugins from the python and napari community, especially Robert Haase.

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

Contributing

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.

License

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

Some optional libraries can be installed to add functionality to napari-ndev, including some that may be more restrictive than this package's BSD-3-Clause.

Issues

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

About

napari widgets for start-to-finish batch processing

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages