Pluggable supervoxel splitting algorithms with a uniform interface.
Project description
supervoxel-splitter
Pluggable supervoxel-splitting algorithms behind a uniform Splitter interface.
What it does
Given a 3-D foreground mask, source seeds, and sink seeds, return a labeled volume that partitions the foreground into a source side and a sink side. Useful for proofreading workflows that need to split a single supervoxel without touching the rest of the segmentation.
The package ships multiple techniques behind the same Splitter protocol:
- GeodesicSplitter — anisotropic geodesic carve via an EDT-derived speed field. Default technique; preserves the neck-aware behavior used in PyChunkedGraph today.
- WatershedSplitter — seeded watershed on the distance transform.
- NoopSplitter — reference implementation; documents the protocol shape for downstream plugin authors (e.g. a learned splitter).
Install
Requires Python 3.14 or newer.
pip install supervoxel-splitter # core
pip install "supervoxel-splitter[fast]" # adds dijkstra3d as the geodesic backend
The uniform interface
Every splitter satisfies the same Splitter protocol. Technique-specific
knobs live on the constructor; split() itself stays clean.
from supervoxel_splitter import GeodesicSplitter
splitter = GeodesicSplitter(backend="dj3d")
result = splitter.split(
mask=foreground_3d_bool,
sources=src_seeds_xyz,
sinks=snk_seeds_xyz,
voxel_size=(4.0, 4.0, 40.0),
)
# result.labels: uint8 in {0, SOURCE, SINK, STRAY}
# result.side_of_label: {SOURCE: 1, SINK: 2}
# result.diagnostics: per-stage timings, label counts, etc.
Plugin authors implement the protocol structurally — no base class to inherit:
class MyLearnedSplitter:
def __init__(self, *, model_path):
...
def split(self, mask, sources, sinks, *,
voxel_size=(1.0, 1.0, 1.0),
vol_order="xyz", vox_order="xyz", seed_order="xyz"):
...
return SplitResult(...)
assert isinstance(MyLearnedSplitter(model_path="..."), Splitter)
Boundary
The package knows nothing about ChunkedGraph, BigTable, IDs, or edges. It takes voxels in and gives labels back. New-ID minting, edge updates, and persistence are the consumer's responsibility.
Status
v0.1.0 covers GeodesicSplitter. WatershedSplitter and NoopSplitter ship
as small reference impls demonstrating the protocol; production-quality
parity with geodesic is out of scope for v0.1.0.
License
MIT.
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 supervoxel_splitter-0.1.0.tar.gz.
File metadata
- Download URL: supervoxel_splitter-0.1.0.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1f6d847c75d25945ef8209a6f7dac863d945b7d031eb3d0c25d38a414b14968
|
|
| MD5 |
d1c014427cbd79340285e9d950792305
|
|
| BLAKE2b-256 |
0d3d63ff7bf7107a303b1c6fed7bfc90d3a0bdd9f97043b48414b1f08039905c
|
Provenance
The following attestation bundles were made for supervoxel_splitter-0.1.0.tar.gz:
Publisher:
test.yml on CAVEconnectome/supervoxel-splitter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
supervoxel_splitter-0.1.0.tar.gz -
Subject digest:
d1f6d847c75d25945ef8209a6f7dac863d945b7d031eb3d0c25d38a414b14968 - Sigstore transparency entry: 1741437102
- Sigstore integration time:
-
Permalink:
CAVEconnectome/supervoxel-splitter@3fd3090f5b74bb84075e8edbd54ed83d7110e569 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/CAVEconnectome
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@3fd3090f5b74bb84075e8edbd54ed83d7110e569 -
Trigger Event:
push
-
Statement type:
File details
Details for the file supervoxel_splitter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: supervoxel_splitter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b89d7aeaff37360716794fb0af7c582e5aca2566528782092385f197545eec8
|
|
| MD5 |
37006ad60f721dfff407d8b27438b307
|
|
| BLAKE2b-256 |
07c3786ebaa11c1a7ad1bade8e94ec87acd2d2ca2ee0c6cabcda3edb054b5a7e
|
Provenance
The following attestation bundles were made for supervoxel_splitter-0.1.0-py3-none-any.whl:
Publisher:
test.yml on CAVEconnectome/supervoxel-splitter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
supervoxel_splitter-0.1.0-py3-none-any.whl -
Subject digest:
4b89d7aeaff37360716794fb0af7c582e5aca2566528782092385f197545eec8 - Sigstore transparency entry: 1741437106
- Sigstore integration time:
-
Permalink:
CAVEconnectome/supervoxel-splitter@3fd3090f5b74bb84075e8edbd54ed83d7110e569 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/CAVEconnectome
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@3fd3090f5b74bb84075e8edbd54ed83d7110e569 -
Trigger Event:
push
-
Statement type: