Skip to main content

napari-maskel

PyPI version Python version License

napari plugin for maskel: mask skeletonization and graph-based feature extraction, with interactive visualization of branches and node features.

Installation

uv sync --extra dev   # + test tools
napari

To test against an unreleased maskel checkout instead, point uv at it locally: uv sync --extra dev && uv pip install -e ../maskel (adjust the path), or add a local, untracked uv.toml with a [tool.uv.sources] override for maskel.

Usage

Open a segmentation mask (2D or 3D) as a labels layer, then run Analyze mask from the Maskel plugin menu. A plain binary mask is treated as a single object; a multi-object instance segmentation map (more than one distinct nonzero label) is skeletonized independently per object — including two objects that touch, which stay correctly separate rather than merging into one skeleton. Every branch, node, and summary point is tagged with the object_id it came from, and the branches layer (the primary visualization — the raw skeleton itself isn't displayed separately) can be colored by object_id or any other branch property (Branch color by dropdown).

Inside the widget, tune extraction settings and use Save recipe to export a reusable JSON preset — the same preset the maskel CLI consumes for batch processing (maskel run --config). The widget scrolls, so it's never clipped by the dock panel's height; every group (including the less-frequently-used Cleanup and Advanced features) is its own collapsible section, expanded by default (click a header to collapse it).

The Spacing field lets you set the physical pixel/voxel size (comma-separated, one value per axis) so length/radius/area features come out in physical units instead of pixel units. It's pre-filled from the selected layer's own .scale when you pick an image (napari has no convenient numeric field of its own to edit .scale, only an imprecise drag-based Transform tool or the console — this field is the convenient alternative), and you can edit it directly. An invalid value (wrong number of axes for the image, or unparsable text) shows an inline warning and falls back to pixel units for that analysis rather than failing. Once an image is selected, its shape is shown right above the field so it's clear which axis order to enter spacing in.

The node layer (when Extract node features is on) only shows branch/end nodes (degree ≠ 2) — pass-through points along a straight, unbranched run are omitted from the visualization so it reads as a graph alongside the branches layer, though the exported node CSV still includes every node.

Write networkx graph (.pkl) exports the same skeleton graph as Write graph (.graphml), but as a pickled networkx.MultiGraph rather than GraphML/XML — richer, since it keeps NaN attributes and native Python types that GraphML can't represent, at the cost of only being readable from Python (pickle.load).

Tests

uv sync --extra dev && pytest

License

napari-maskel is released under the MIT License. See LICENSE for details.

Metadata

Release files for napari-maskel 1.1.1

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-maskel 1.1.1
File Size Uploaded
napari_maskel-1.1.1.tar.gz 24.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-maskel 1.1.1
File Interpreter ABI Platform
napari_maskel-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / napari_maskel-1.1.1.tar.gz

Download URL napari_maskel-1.1.1.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b6c998921751795d1d173f056c592fae61513544a5231c796df9c42347ae1b45
BLAKE2b-256 checksum
How to use checksums
c02f6f13e4112eadce7deba436e545523f9021a5d3b09bf32d73259c087f275a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 21, 2026.

Transparency log

Release files / napari_maskel-1.1.1-py3-none-any.whl

Download URL napari_maskel-1.1.1-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd0a50fb94da8e04e6d3b41f991f7ba7407a77f05f251efbf4bef85155753950
BLAKE2b-256 checksum
How to use checksums
f00463385c0ff01fcb622da0481832e0d16720b4279de5cc091ffa1266be304c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 21, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.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