Skip to main content

Napari plugin for the segmentation of regions by flood

Project description

mmv-regionseg

License BSD-3 PyPI Python Version tests codecov napari hub

A Napari plugin for the segmentation of regions by flood_fill


This napari plugin was generated with copier using the napari-plugin-template.

Installation

You can install mmv-regionseg via pip:

pip install mmv-regionseg

To install latest development version :

pip install git+https://github.com/MMV-Lab/mmv-regionseg.git

Documentation

MMV-RegionSeg is a Napari plugin designed to segment three-dimensional image data based on the gray value of a selected seed point. Neighboring voxels are assigned to the same class if their intensity is similar to that of the seed point or falls within a defined tolerance range.


Launching the Plugin

  1. Open Napari.
  2. Go to the Plugins menu.
  3. Select MMV-RegionSeg from the dropdown.

This opens a widget on the right-hand side of the Napari window, featuring several buttons, labels, and a slider.

Screenshot

Here is a preview of the MMV-RegionSeg plugin in action:

MMV-RegionSeg Plugin Screenshot


Loading Image Data

Click the "Read image" button to load a 3D image in TIFF format. A standard OS file dialog will open. Once the image is selected, Napari will display it as an image layer.


Adjusting Tolerance

A slider below the image loading button allows you to set the gray value tolerance (range: 1–50):

  • Low tolerance: May result in incomplete region filling.
  • High tolerance: May include undesired regions.

⚠️ Choosing the right tolerance often requires trial and error.


Selecting Seed Points

Click "Select seed points" to activate a new points layer in Napari. You can then define seed points by clicking directly in the viewer.

  • Each seed point is visualized.
  • Multiple seed points added in one step are treated as a single class.
  • Use Napari’s Layer Controls to move or delete seed points.

Segmentation Options

After placing seed points, you can choose between two segmentation methods:

Flood

Click "Flood" to perform segmentation using
skimage.segmentation.flood(...).
This identifies neighboring voxels within the tolerance range and saves them to a new label layer.

You can repeat this process for other classes by selecting new seed points. Each class will have its own label layer.

Growth

Click "Growth" to visualize the segmentation step by step.
This simulates the growth of a region, similar to a cell colony expanding in a Petri dish.


Resetting for New Segmentation

After a label layer is created for a class, the points layer is removed, allowing you to define new seed points without affecting the existing segmentation results.


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, "mmv-regionseg" 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

mmv_regionseg-0.3.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

mmv_regionseg-0.3.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mmv_regionseg-0.3.0.tar.gz.

File metadata

  • Download URL: mmv_regionseg-0.3.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mmv_regionseg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a386dbe7d8a76717097edf33283acc2076e84df08d7397fe51f2f78d1f80280d
MD5 296e23d110b3ef7c7bab03bf6a861138
BLAKE2b-256 eeb4556ea3a81f73430b12752f13032f8e7f387e2468b69e172b3ba827f8c3fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmv_regionseg-0.3.0.tar.gz:

Publisher: test_and_deploy.yml on MMV-Lab/MMV-RegionSeg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmv_regionseg-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mmv_regionseg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3b514a18763afcae5022b3f2ff63990af82c310dc33f56cbb52057a101fcb12
MD5 953f69775213a806529ab62695fb17da
BLAKE2b-256 47e7037e3c93f4cf899a7a1cca2121e6876ba12f760a68839c2ad4e88270afa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmv_regionseg-0.3.0-py3-none-any.whl:

Publisher: test_and_deploy.yml on MMV-Lab/MMV-RegionSeg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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