napari-power-widgets
Powerful magicgui widgets and type annotations for general-purpose napari plugin development.
napari-power-widgets makes the full use of type-to-widget mapping strategy of magicgui to provide napari-specific types and value-widgets, which will be very useful to improve UI/UX of your napari plugins with simple codes.
Currently, napari-power-widgets does not provide any reader, writer or widget. It is supposed to be used programmatically.
Examples
Some types/widgets and the possible usage are picked up here (→ check all). If you have any neat ideas, please open an issue.
1. BoxSelection
Alias of a four-float tuple for 2D selection. You can set the value by drawing a interaction box in the viewer.
e. g. : image cropper, rectangular labeling etc.
@magicgui
def f(box: BoxSelection):
print(box)
viewer.window.add_dock_widget(f)
2. OneOfRectangles
Alias of np.ndarray for one of rectangles in a Shapes layer.
e. g. : image cropper, rectangular labeling etc.
@magicgui
def f(rect: OneOfRectangles):
print(rect)
viewer.window.add_dock_widget(f)
3. LineData
Alias of np.ndarray for a line data. You can obtain the data by manually drawing a line in the viewer.
e. g. : line profiling, kymograph etc.
@magicgui
def f(line: LineData):
print(line)
viewer.window.add_dock_widget(f)
4. OneOfLabels
Alias of boolean np.ndarray for a labeled region. You can choose ones by directly clicking the viewer.
e. g. : image masking, feature measurement etc.
@magicgui
def f(label: OneOfLabels):
pass
viewer.window.add_dock_widget(f)
5. ZRange
Alias of a tuple of float that represents the limit of the third dimension. You can select the values by moving the dimension slider.
e. g. : movie trimming, partial image projection etc.
@magicgui
def f(zrange: ZRange):
print(zrange)
viewer.window.add_dock_widget(f)
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
Installation
You can install napari-power-widgets via pip:
pip install napari-power-widgets
To install latest development version :
pip install git+https://github.com/hanjinliu/napari-power-widgets.git
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "napari-power-widgets" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for napari-power-widgets 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| napari-power-widgets-0.0.1.tar.gz | 17.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| napari_power_widgets-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.8 kB
Release files / napari-power-widgets-0.0.1.tar.gz
| Download URL | napari-power-widgets-0.0.1.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8259b28e2774cab10f7fd9de425c6e3a11a0cbfe3d245410d3bf600e2b4bbbfb
|
|
BLAKE2b-256 checksum How to use checksums |
c3e1046a4c9e99e4e69477afb3f4e29a771a15f0744b317c885f89dc9f9aea33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7
|
Release files / napari_power_widgets-0.0.1-py3-none-any.whl
| Download URL | napari_power_widgets-0.0.1-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3e600bd42ec51e5a6f37c6e15260f607d847d32b702766113ae5f84c62c9510
|
|
BLAKE2b-256 checksum How to use checksums |
97e6f99725c89c8c81c4f14e86eb3707ddd6fafd298ba1ad0710d5e31957d005
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7
|
Security for napari-power-widgets 0.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.