Skip to main content

napari-segment

License PyPI Python Version tests codecov napari hub

Interactively segment organoids/spheroids/aggregates in brightfield/fluorescence from nd2 multipositional stack.

image

Installation

pip install napari-segment

or

From napari plugin

image

Usage for segmentation

  1. Drag your nd2 file into napari (otherwise try the Sample data from File / Open Sample / napari-segment)
  2. Lauch Plugins -> napari-segment: Segment multipos
  3. Select the brightfield channel
  4. The data is lazily loaded from nd2 dataset and dynamically segmented in the viewer.
  5. Binning 1-8 allows to skip small features and focus on bigger objects, also makes processing faster. image
  6. Various preprocessing modes allow segmentation of different objects: image
  • Invert: will use the dark shadow around aggregate - best for very old aggregates , out of focus (File / Open Sample / napari-segment / Old aggregate)

image

  • Gradient: best for very sharp edges, early aggregates, single cells (File / Open Sample / napari-segment / Early aggregate)

image

  • Gauss diff: Fluorescence images The result of preprocessing will be shown in the "Preprocessing" layer.
  1. Smooth, Theshold and Erode parameters allow you to adjust the preliminary segmentation -> they all will appear in the "Detections" layer as outlines

image

  1. Min/max diameter and eccentricity allow you to filter out unwanted regions -> the good regions will appear in the "selected labels" layer as filled areas.

image image

  1. Once satisfied, click "Save the params!" - it will automatically create file.nd2.params.yml file, so you can recall how the segmentation was done. Next time you open the same dataset, the parameters will be loaded automatically from this file.

  2. Next section is for quantifying the sizes. Pixel size will be retrieved automatically from metadata. If not: update it manually and click Update plots to see the correct sizes. Click on any suspected value to see the corresponding frame and try to adjust the above parameters.

image

  1. If impossible to get good results with automatic pipeline, click Clone for manual correction: this will create an editable "Manual" layer which you can edin with built-in tools in napari. Click "Update plots" to see the updated values.

  2. "Save csv!" will generate a csv file with regionprops.

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-segment" is free and open source software

Issues

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

Release files for napari-segment 0.3.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-segment 0.3.12
File Size Uploaded
napari_segment-0.3.12.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-segment 0.3.12
File Interpreter ABI Platform
napari_segment-0.3.12-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / napari_segment-0.3.12.tar.gz

Download URL napari_segment-0.3.12.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
de092bab18df1980a39fb13dcd4712d9a4c377822cd02d3e62c8023d411ada05
BLAKE2b-256 checksum
How to use checksums
3651794a16a49a169f8bae506dcdbfc2c869f7a35137eb2e0a55fd29d9942908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / napari_segment-0.3.12-py3-none-any.whl

Download URL napari_segment-0.3.12-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c71cc7a98e6edcfbb68919df5bcabb682a8d2e5a60d4fb7b3808c9269d5ef264
BLAKE2b-256 checksum
How to use checksums
d2e795b48c7752d87b0b59126c883e5dcf7c611ebd33e05a4d892669107d706f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.3.12 This release

2 release files

0.3.9

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page