Skip to main content

A plugin to trace the brightest path between two points in an image

Project description

napari-tracing

License GNU GPL v3.0 PyPI Python Version

napari hub

Napari Tracer Plugin

The Napari Tracer Plugin provides an intuitive interface for users to load images, perform brightest path tracing, and visualize the results. This plugin, which is built on top of the Napari viewer, enables users to explore and annotate complex images, and take advantage of the viewer's built-in features such as zooming, panning, and adjusting contrast while viewing their tracings. The Napari Tracer Plugin uses the brightest path tracing algorithms from brightest-path-lib to provide an interactive path building process for users to create traced segments in 2D and 3D images.

Examples

You can download our 2D and 3D example tif files.

Features

  1. Load images and trace paths in 2D and 3D.
  2. Offloads computations to a background thread to ensure a responsive user interface.
  3. Two tracing modes: disjoint and continuous. Disjoint segments refer to paths that do not share any points, while continuous segments start from the endpoint of a previously traced path.
  4. Verify traced segments and cancel tracing if necessary.
  5. Save traced paths in SWC format commonly used in biology to represent neuronal morphology.
  6. Load previously saved tracings in SWC format.

Installation

You can install napari-tracing via pip:

pip install napari-tracing

To install latest development version :

pip install git+https://github.com/mapmanager/napari-tracing.git

Usage

Once installed, the Napari Tracer Plugin can be accessed from the Napari menu under "Plugins" > "napari tracing: Tracer Widget". This will open the plugin interface, where you can load your image and start tracing.

Tracing

  1. To trace a path, select the "Trace" mode and the image layer that you want to trace from their respective dropdowns.
  2. Once you select the image, a points layer called the terminal points layer will be created on the Napari viewer where you can add the start and end point.
  3. Click the "Start Tracing" button to perform brightest path tracing between the points.
  4. The traced path will appear in a new points layer called the tracing result result layer in the Napari viewer as a line overlay.
  5. Each new traced segment is verified, so you can either accept the tracing or reject it. If you choose to reject the tracing, you can try again with a different set of points if necessary.
  6. You can click on the "Cancel Tracing" button to cancel a tracing that is in progress.

Saving and loading tracings

  1. To save a tracing, click on the "Save Trace" button from the plugin menu. This will save the traced path in SWC format to a file of your choosing.
  2. To load a previously saved tracing, click on the "Load Trace" button and choose the SWC file you want to load. The traced path will appear in the Napari viewer.

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 GNU GPL v3.0 license, "napari-tracing" is free and open source software

Issues

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-tracing-1.0.2.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

napari_tracing-1.0.2-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file napari-tracing-1.0.2.tar.gz.

File metadata

  • Download URL: napari-tracing-1.0.2.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for napari-tracing-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1fddab997ea0e43de8d1c5c76e73fbc3f29be339dfd18ea2a2237511e6a3e619
MD5 94ce0b65a1bb72aac0697161dec58f12
BLAKE2b-256 1f02384fd8f6eee5618708405c9617908eb7b95e37e6c2ae64ed6295b11e49f7

See more details on using hashes here.

File details

Details for the file napari_tracing-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_tracing-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b06e863568bc10cf9f593ba436f0b5f2acc458d0ca884db082fda18353a7fcc
MD5 f9aa566be6c345c8c7b19261cef1a745
BLAKE2b-256 7a9d417920f64c95af37fd1feb4853926e19d5d42dfd358a208e8f740626a384

See more details on using hashes here.

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