Napari plugin for the segmentation of regions by flood
Project description
mmv-regionseg
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
- Open Napari.
- Go to the Plugins menu.
- 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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mmv_regionseg-0.4.0.tar.gz.
File metadata
- Download URL: mmv_regionseg-0.4.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db1526b67f6cf94e6895c79f0302d22ecbc440fd7283d99114e45d62de3e27b3
|
|
| MD5 |
2453d832eb715df53111e41a591f8208
|
|
| BLAKE2b-256 |
5ac759ddf582998ea6daf8363d73e5e95e8d1e61b233eb887789a5dd50ebc096
|
Provenance
The following attestation bundles were made for mmv_regionseg-0.4.0.tar.gz:
Publisher:
test_and_deploy.yml on MMV-Lab/MMV-RegionSeg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mmv_regionseg-0.4.0.tar.gz -
Subject digest:
db1526b67f6cf94e6895c79f0302d22ecbc440fd7283d99114e45d62de3e27b3 - Sigstore transparency entry: 578795427
- Sigstore integration time:
-
Permalink:
MMV-Lab/MMV-RegionSeg@0dcde1e510dc1ab4a596109313618aaa78446fa1 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/MMV-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_deploy.yml@0dcde1e510dc1ab4a596109313618aaa78446fa1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mmv_regionseg-0.4.0-py3-none-any.whl.
File metadata
- Download URL: mmv_regionseg-0.4.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81641132c51d2c3b437aefe44c84fbadb696213feff7fdeddc66b428f318144c
|
|
| MD5 |
ba6caf9b94fd677310f2a41fbbc1139f
|
|
| BLAKE2b-256 |
173cb3da1df602d7285cd932ad479f1293fc320f01fefa8346c32d46e879f330
|
Provenance
The following attestation bundles were made for mmv_regionseg-0.4.0-py3-none-any.whl:
Publisher:
test_and_deploy.yml on MMV-Lab/MMV-RegionSeg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mmv_regionseg-0.4.0-py3-none-any.whl -
Subject digest:
81641132c51d2c3b437aefe44c84fbadb696213feff7fdeddc66b428f318144c - Sigstore transparency entry: 578795429
- Sigstore integration time:
-
Permalink:
MMV-Lab/MMV-RegionSeg@0dcde1e510dc1ab4a596109313618aaa78446fa1 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/MMV-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_deploy.yml@0dcde1e510dc1ab4a596109313618aaa78446fa1 -
Trigger Event:
push
-
Statement type: