Skip to main content

mmv-regionseg

License BSD-3 PyPI Python Version tests codecov napari hub

This README is in English. A German version is available here: README.de.md

A Napari plugin for region segmentation using 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 sufficient 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.

A widget will appear on the right-hand side of the Napari window, containing buttons, labels, and a slider.


Screenshot

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

Use the slider below the image loading button to set the gray-value tolerance (0%–100% of the dynamic range):

  • Low tolerance → risk of incomplete region filling.
  • High tolerance → risk of including undesired regions.

⚠️ The optimal tolerance often requires some experimentation.


Definition of the Footprint

Use the dropdown list to select the footprint for skimage.segmentation.flood. See also: Flood Fill.

  • 6 neighbors → Only voxels directly adjacent in X, Y, and Z are considered.
  • 18 neighbors → Includes voxels diagonally adjacent along faces and edges.
  • 26 neighbors → All neighboring voxels are included.

Selecting Seed Points

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

  • Each seed point is visualized.
  • Multiple seed points defined in one step are treated as one 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 for additional classes by selecting new seed points. Each class receives its own label layer.

Growth

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


Resetting for New Segmentation

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


Contributing

Contributions are welcome!

Tests can be run with tox; please ensure that coverage does not decrease before submiting 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.

Metadata

Release files for mmv-regionseg 0.4.0

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

Source distribution (sdist)

Source distribution for mmv-regionseg 0.4.0
File Size Uploaded
mmv_regionseg-0.4.0.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mmv-regionseg 0.4.0
File Interpreter ABI Platform
mmv_regionseg-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / mmv_regionseg-0.4.0.tar.gz

Download URL mmv_regionseg-0.4.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
db1526b67f6cf94e6895c79f0302d22ecbc440fd7283d99114e45d62de3e27b3
BLAKE2b-256 checksum
How to use checksums
5ac759ddf582998ea6daf8363d73e5e95e8d1e61b233eb887789a5dd50ebc096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.

Transparency log

Release files / mmv_regionseg-0.4.0-py3-none-any.whl

Download URL mmv_regionseg-0.4.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81641132c51d2c3b437aefe44c84fbadb696213feff7fdeddc66b428f318144c
BLAKE2b-256 checksum
How to use checksums
173cb3da1df602d7285cd932ad479f1293fc320f01fefa8346c32d46e879f330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

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