Metadata-Version: 2.5
Name: pmi-viewer
Version: 1.0.7
Summary: Simple medical image viewer for 2D and 3D NumPy arrays
Project-URL: Documentation, https://github.com/umcu-isi/pmi-viewer#readme
Project-URL: Issues, https://github.com/umcu-isi/pmi-viewer/issues
Project-URL: Source, https://github.com/umcu-isi/pmi-viewer
Author-email: Edwin Bennink <H.E.Bennink@umcutrecht.nl>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.11
Requires-Dist: matplotlib>=3.11.1
Requires-Dist: numpy>=2.5.1
Requires-Dist: pyside6>=6.11.2
Description-Content-Type: text/markdown

# pmi-viewer

[![PyPI - Version](https://img.shields.io/pypi/v/pmi-viewer.svg)](https://pypi.org/project/pmi-viewer)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pmi-viewer.svg)](https://pypi.org/project/pmi-viewer)

-----

`pmi-viewer` is a simple medical image viewer for 2D and 3D NumPy arrays. It supports scrolling through images in
orthogonal directions and adjusting the display range, similar to other medical image viewers. The arrays are expected
to use LPS (radiological) orientation and row-major ordering.

In a notebook environment, the viewer is displayed in a new output cell ([ipympl](https://matplotlib.org/ipympl/) required). In other environments, it
opens in a Qt window.

This viewer is used in the course *[Programming for Medical Imaging](https://umcu-isi.github.io/programming-for-medical-imaging/)*.

## Installation

```console
pip install pmi-viewer
```

## Usage

```python
import numpy as np
from pmi_viewer import view

image = np.random.rand(32, 128, 128)
image[:8, :24] = np.nan
view(image, orientation='sag', spacing=(0.7, 0.7, 2.4), title="Random values")
```

## License

`pmi-viewer` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
