Skip to main content

A demo napari plugin incorporating reader, writer and dock widget contributions using the new npe2 plugin architecture.

Project description

workshop-demo

License PyPI Python Version tests codecov napari hub

A demo napari plugin incorporating reader, writer and dock widget contributions using the new npe2 plugin architecture.


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

Installation

You can install workshop-demo via pip:

pip install workshop-demo

To install latest development version :

pip install git+https://github.com/DragaDoncila/workshop-demo.git

What is this?

This plugin was created to serve as a semi-meaningful example of a plugin using the new napari npe2 architecture.

It provides a reader, a writer and two dock widgets to support opening, processing and writing out cell tracking challenge data.

We've provided comments and example tests that can be used as a reference when building your own plugin.

Using this plugin

Sample Data

You can download sample data for this plugin from the tracking challenge website. Any 2D+T sequence should work, but this plugin has been tested only with the Human hepatocarcinoma-derived cells expressing the fusion protein YFP-TIA-1 dataset.

Reading Data

This plugin's reader is designed for tracking challenge segmentation gold standard ground truth data conforming to the file format described in the data specification.

Ground truth data is only provided for a subset of the frames of the entire sequence. This reader will attempt to find the number of frames of the associated sequence in a sister directory of the ground truth data directory and open a labels layer with the same number of frames, thus ensuring the labelled data is correctly overlaid onto the original sequence.

https://user-images.githubusercontent.com/17995243/146114062-36124c05-f44a-488e-8991-f39a702c917f.mov

Segmenting Data

One of the dock widgets provided by this plugin is "Segment by Threshold". The widget allows you to select a 2D+T image layer in the viewer (e.g. any of the sequences in the Human hepatocarcinoma dataset above) and segment it using a selection of scikit-image thresholding functions.

The segmentation is then returned as a Labels layer into the viewer.

https://user-images.githubusercontent.com/17995243/146114088-f6fb645e-8d78-4880-827b-2f0334dad859.mov

Highlighting Segmentation Differences

The second dock widget provided by this plugin allows you to visually compare your segmentation against the ground truth data by computing the difference between the two and adding this as a layer in the napari viewer.

To use this widget, open it from the Plugins menu and select the two layers you wish to compare.

https://user-images.githubusercontent.com/17995243/146114112-c891723f-8640-4708-8014-c78731fb3396.mov

Writing to Zip

Finally, you can save your segmentation to a zip file whose internal directory structure will closely mimic that of the tracking challenge datasets, so that it may be opened again in the viewer.

To save your layer, choose File -> Save selected layer(s) with one labels layer selected, then select label zipper from the dropdown choices.

https://user-images.githubusercontent.com/17995243/146114163-ee886990-979c-4756-97c5-aaf2c39dccde.mov

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, "workshop-demo" 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

workshop_demo-0.0.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

workshop_demo-0.0.2-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file workshop_demo-0.0.2.tar.gz.

File metadata

  • Download URL: workshop_demo-0.0.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for workshop_demo-0.0.2.tar.gz
Algorithm Hash digest
SHA256 983c5b38e69d56500897bf75fc089e66d17743cdba5acc22b6ff5ef3cfc138d9
MD5 fcc4f28a7771661e7dcbf119a872ceac
BLAKE2b-256 8d3b00c3abba6228b53235eb9bff3567dd0e982d0e8427d4ed5cc384a61cc159

See more details on using hashes here.

File details

Details for the file workshop_demo-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: workshop_demo-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for workshop_demo-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c5bdce3c841b7f4bed3aaf4610047f34d78b32a42f5ef6f2ca8b096aa5cb347d
MD5 afb7d33b3cd41f10052b54cf9a857d88
BLAKE2b-256 d422e16439019fbde4152325bdb4bacf747848f500d366efcf9d82c5ea924208

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