Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyapp-kit/ndv
Simple, fast-loading, n-dimensional array viewer with minimal dependencies.
https://github.com/pyapp-kit/ndv
arrays python visualization
Last synced: 2 days ago
JSON representation
Simple, fast-loading, n-dimensional array viewer with minimal dependencies.
- Host: GitHub
- URL: https://github.com/pyapp-kit/ndv
- Owner: pyapp-kit
- License: bsd-3-clause
- Created: 2024-06-07T20:55:54.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-05T01:07:00.000Z (9 days ago)
- Last Synced: 2025-02-05T15:08:19.744Z (9 days ago)
- Topics: arrays, python, visualization
- Language: Python
- Homepage: https://pyapp-kit.github.io/ndv/
- Size: 5.64 MB
- Stars: 57
- Watchers: 5
- Forks: 7
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-scientific-image-analysis - ndv - -> (ðŧ Visualization)
- awesome-scientific-image-analysis - ndv - -> (ðŧ Visualization)
README
# ndv
[![License](https://img.shields.io/pypi/l/ndv.svg?color=green)](https://github.com/pyapp-kit/ndv/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/ndv.svg?color=green)](https://pypi.org/project/ndv)
[![Python Version](https://img.shields.io/pypi/pyversions/ndv.svg?color=green)](https://python.org)
[![CI](https://github.com/pyapp-kit/ndv/actions/workflows/ci.yml/badge.svg)](https://github.com/pyapp-kit/ndv/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/pyapp-kit/ndv/branch/main/graph/badge.svg)](https://codecov.io/gh/pyapp-kit/ndv)Simple, fast-loading, asynchronous, n-dimensional array viewer, with minimal
dependencies.Works in Qt, Jupyter, or wxPython.
```python
import ndvdata = ndv.data.cells3d() # or any arraylike object
ndv.imshow(data)
```![Montage](https://github.com/pyapp-kit/ndv/assets/1609449/712861f7-ddcb-4ecd-9a4c-ba5f0cc1ee2c)
[`ndv.imshow()`](https://pyapp-kit.github.io/ndv/latest/reference/ndv/#ndv.imshow)
creates an instance of
[`ndv.ArrayViewer`](https://pyapp-kit.github.io/ndv/latest/reference/ndv/controllers/#ndv.controllers.ArrayViewer),
which you can also use directly:```python
import ndvviewer = ndv.ArrayViewer(data)
viewer.show()
ndv.run_app()
```> [!TIP]
> To embed the viewer in a broader Qt or wxPython application, you can
> access the viewer's
> [`widget`](https://pyapp-kit.github.io/ndv/latest/reference/ndv/controllers/#ndv.controllers.ArrayViewer.widget)
> attribute and add it to your layout.## Features
- âĄïļ fast to import, fast to show
- ðŠķ minimal dependencies
- ðĶ supports arbitrary number of dimensions
- ðĨ 2D/3D view canvas
- ð supports [VisPy](https://github.com/vispy/vispy) or
[pygfx](https://github.com/pygfx/pygfx) backends
- ð ïļ support [Qt](https://doc.qt.io), [wx](https://www.wxpython.org), or
[Jupyter](https://jupyter.org) GUI frontends
- ðĻ colormaps provided by [cmap](https://cmap-docs.readthedocs.io/)
- ð·ïļ supports named dimensions and categorical coordinate values (WIP)
- ðĶ supports most array types, including:
- `numpy.ndarray`
- `cupy.ndarray`
- `dask.array.Array`
- `jax.Array`
- `pyopencl.array.Array`
- `sparse.COO`
- `tensorstore.TensorStore` (supports named dimensions)
- `torch.Tensor` (supports named dimensions)
- `xarray.DataArray` (supports named dimensions)
- `zarr` (named dimensions WIP)See examples for each of these array types in
[examples](https://github.com/pyapp-kit/ndv/tree/main/examples)> [!NOTE]
> *You can add support for any custom storage class by subclassing
> `ndv.DataWrapper` and [implementing a couple
> methods](https://github.com/pyapp-kit/ndv/blob/main/examples/custom_store.py).
> (This doesn't require modifying ndv, but contributions of new wrappers are
> welcome!)*## Installation
Because ndv supports many combinations of GUI and graphics frameworks,
you must install it along with additional dependencies for your desired backend.See the [installation guide](https://pyapp-kit.github.io/ndv/latest/install/) for
complete details.To just get started quickly using Qt and vispy:
```python
pip install ndv[qt]
```For Jupyter with vispy, (no Qt or wxPython):
```python
pip install ndv[jup]
```## Documentation
For more information, and complete API reference, see the
[documentation](https://pyapp-kit.github.io/ndv/).