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.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 napari-maskel 1.1.0
File Size Uploaded
napari_maskel-1.1.0.tar.gz 22.7 kB Details

Built distribution (wheel)

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

Total release size: 38.9 kB

Release files / napari_maskel-1.1.0.tar.gz

Download URL napari_maskel-1.1.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c04b345dfc12903c906c8c3a827acb0d5a47dbfd079c9d9890404cf2dd3556f7
BLAKE2b-256 checksum
How to use checksums
c69c8fad02f81606a651622e6caf4ea6077b8d469a5646ea748e2c83530b4dfd
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.0-py3-none-any.whl

Download URL napari_maskel-1.1.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49220632ed059d595fccd699bbe20acc28e8d7636ec2e274b549cb71dc95d998
BLAKE2b-256 checksum
How to use checksums
d0d606129cb6cde7e29116ac577dcf2456bf94f931b156f367fed16f1f8c1282
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

1.1.1

2 release files

This release

1.1.0 This release

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