A napari plugin for padbound
Project description
napari-padbound
A napari plugin for controlling image annotation workflows with MIDI controllers via padbound.
Use physical pads, knobs, faders, and buttons to navigate slices, select labels, adjust brush size, zoom, undo/redo, and more — with real-time LED feedback showing your current label colors on the controller.
Features
- Auto-detection — Automatically finds and connects to any padbound-supported MIDI controller
- Smart control mapping — Automatically assigns available hardware controls to napari functions based on controller capabilities
- Slice navigation — Coarse and fine navigation through 3D+ data volumes via faders or knobs
- Slice stepping — Increment/decrement slices one at a time via navigation buttons
- Zoom control — Logarithmic zoom mapping (0.01x–10x) via knobs or faders
- Brush size control — Logarithmic brush size adjustment (1–100px) for label painting
- Label selection — Select labels by pressing pads; pad 1 is the eraser, remaining pads map to labels 1, 2, 3, ...
- LED color feedback — Pads display actual label colors from the napari colormap, with the selected label pulsing (on RGB-capable controllers)
- Dimension rolling — Cycle through dimension views (XY, YZ, XZ) via navigation buttons
- Undo/redo — Transport buttons for edit history on the active Labels layer
- Graceful degradation — Three feedback strategies (RGB color, binary toggle, none) adapt automatically to controller capabilities
Supported Controllers
Any controller with a padbound plugin works automatically. Currently supported:
| Controller | Best for | Key controls |
|---|---|---|
| AKAI APC mini MK2 | Full RGB feedback, many faders | 64 RGB pads, 9 faders, 17 buttons |
| AKAI LPD8 MK2 | Compact RGB + knobs | 8 RGB pads, 8 knobs, 4 banks |
| AKAI MPD218 | Velocity-sensitive pads | 16 pads, 6 encoders, 3 banks |
| PreSonus ATOM | RGB pads + encoders + buttons | 16 RGB pads, 4 encoders, 20 buttons |
| Synido TempoPad P16 | RGB pads + transport | 16 RGB pads, 4 encoders, 6 buttons |
| Behringer X-Touch Mini | Encoders with LED rings | 16 pads, 8 encoders, 1 fader |
| Xjam | Budget option, multi-bank | 16 pads, 6 knobs, 3 banks |
How Control Mapping Works
The plugin automatically discovers available controls and assigns them by priority:
Continuous controls (assigned in order: faders first, then knobs, then encoders):
- First control → Coarse slice (full range of the data volume)
- Second control → Fine slice (±64 slices around the coarse position)
- Third control → Brush size (logarithmic, 1–100px)
- Fourth control → Zoom (logarithmic, 0.01x–10x)
Pads → Label selection (pad 1 = eraser, pad 2+ = labels)
Navigation buttons → Up/Down = slice step, Left/Right = dimension roll
Transport buttons → Stop = undo, Play = redo
The widget displays the detected controller and its mapped controls so you can see what each physical control does.
Installation
pip install napari-padbound
For development:
git clone https://github.com/uermel/napari-padbound.git
cd napari-padbound
pip install -e ".[dev,testing]"
Usage
- Connect a supported MIDI controller via USB
- Open napari
- Go to Plugins > padbound to open the widget
- Load a 3D image and create a Labels layer
- Use your controller to navigate slices, select labels, and annotate
The widget shows the connected controller name and the mapping of physical controls to napari functions. If no controller is detected, the widget will indicate this.
Development
# Linting
ruff check src/
ruff format src/
black src/
# Run tests
pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Distributed under the terms of the BSD-3 license, napari-padbound 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 napari_padbound-0.3.0.tar.gz.
File metadata
- Download URL: napari_padbound-0.3.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77eac5fd0e56269351f12d2c6c20cff6fb73abc5adbfa1d6d47c610a475474c2
|
|
| MD5 |
5eed1ec1df50ddd8658d0fc18fccb1a7
|
|
| BLAKE2b-256 |
578a1112db8e3c6839f0695b1638de369b3daf0184e38f8b5b98043dfae39a25
|
Provenance
The following attestation bundles were made for napari_padbound-0.3.0.tar.gz:
Publisher:
release-please.yml on uermel/napari-padbound
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
napari_padbound-0.3.0.tar.gz -
Subject digest:
77eac5fd0e56269351f12d2c6c20cff6fb73abc5adbfa1d6d47c610a475474c2 - Sigstore transparency entry: 1243782516
- Sigstore integration time:
-
Permalink:
uermel/napari-padbound@e7cd5dd74db2039321f1e8f09ce9bb15a5f96cff -
Branch / Tag:
refs/heads/main - Owner: https://github.com/uermel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@e7cd5dd74db2039321f1e8f09ce9bb15a5f96cff -
Trigger Event:
push
-
Statement type:
File details
Details for the file napari_padbound-0.3.0-py3-none-any.whl.
File metadata
- Download URL: napari_padbound-0.3.0-py3-none-any.whl
- Upload date:
- Size: 16.3 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 |
42622eaf6f5dba751f8b8d3502a6c7f30a8070d2c97eb06fda76acc0ddd25f4e
|
|
| MD5 |
b7635e3f53508bd793efd1b36c929db8
|
|
| BLAKE2b-256 |
e23d7859cabfcff46f4462b37ac217bfc5ab0ea829db84fbc4f393a943219afa
|
Provenance
The following attestation bundles were made for napari_padbound-0.3.0-py3-none-any.whl:
Publisher:
release-please.yml on uermel/napari-padbound
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
napari_padbound-0.3.0-py3-none-any.whl -
Subject digest:
42622eaf6f5dba751f8b8d3502a6c7f30a8070d2c97eb06fda76acc0ddd25f4e - Sigstore transparency entry: 1243782524
- Sigstore integration time:
-
Permalink:
uermel/napari-padbound@e7cd5dd74db2039321f1e8f09ce9bb15a5f96cff -
Branch / Tag:
refs/heads/main - Owner: https://github.com/uermel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@e7cd5dd74db2039321f1e8f09ce9bb15a5f96cff -
Trigger Event:
push
-
Statement type: