Skip to main content

JupyterLab NiiVue

WebGL 2.0 medical image viewer for JupyterLab

A JupyterLab extension that uses NiiVue to display neuroimaging files directly in JupyterLab. View NIfTI files, meshes, tractography, and DICOM images with an interactive, hardware-accelerated viewer integrated into your JupyterLab environment.

Installation

Install the extension using pip:

pip install jupyterlab-niivue

Usage

Opening Files

  1. File Browser: Simply double-click any supported neuroimaging file in the JupyterLab file browser
  2. Right-click Menu: Right-click on a file and select "Open With" → "NiiVue Viewer"
  3. Compare Multiple Files: Select multiple files (2 or more), right-click, and choose "Compare in NiiVue" to view them side-by-side in a multi-panel layout

Screenshots

Default view showing a brain volume opened in JupyterLab with the NiiVue viewer

Multiple images opened in compare view

Keyboard Shortcuts

Mouse Controls

  • Right Mouse: Drag to adjust contrast/brightness (windowing); when Zoom button is pressed, drag to zoom
  • Middle Mouse: Drag to pan
  • Mouse Scroll: Change slice in currently hovered image
  • Shift + Mouse: 2D dragging and 3D viewplane rotation

Navigation

  • ← →: Change volume in 4D image
  • V: Cycle through view modes
  • C: Cycle through clip plane orientations in 3D render

Crosshair Movement

  • H: Move crosshair to R (Right)
  • L: Move crosshair to L (Left)
  • J: Move crosshair to P (Posterior)
  • K: Move crosshair to A (Anterior)
  • Ctrl+U: Move crosshair to S (Superior)
  • Ctrl+D: Move crosshair to I (Inferior)

Supported Formats

NiiVue can open several formats popular with brain imaging:

Requirements

  • JupyterLab >= 4.0.0
  • A modern web browser with WebGL 2.0 support (Chrome, Firefox, Edge, Safari)

Troubleshooting

Extension not appearing

If the extension doesn't appear after installation, try:

jupyter labextension list

You should see jupyterlab-niivue in the list. If not, try rebuilding JupyterLab:

jupyter lab build

Files not opening

If files don't open when double-clicked:

  1. Check that the file format is supported (see list above)
  2. Try right-clicking the file and selecting "Open With" → "NiiVue Viewer"
  3. Check the browser console for any error messages

Development

This extension is part of the NiiVue monorepo. Contributions are welcome!

If you encounter issues or have feature requests, please open an issue on GitHub.

Support This Project

If you find this extension useful, please consider supporting its development through a financial contribution:

License

BSD-2-Clause

Credits

  • Built with NiiVue
  • Part of Neurodesk, a flexible and scalable data analysis environment for reproducible neuroimaging
  • Part of the NiiVue ecosystem for neuroimaging visualization

Related Projects

Release files for jupyterlab-niivue 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterlab-niivue 0.2.7
File Size Uploaded
jupyterlab_niivue-0.2.7.tar.gz 3.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-niivue 0.2.7
File Interpreter ABI Platform
jupyterlab_niivue-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 MB

Release files / jupyterlab_niivue-0.2.7.tar.gz

Download URL jupyterlab_niivue-0.2.7.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6dc15ed3a7c83f725c4c0938b77ec69ab044972c8df33afb7dba3360beae9c0b
BLAKE2b-256 checksum
How to use checksums
99fbb638fc41f4b4302dcbfc11f09071f594e5109d8d38497392023df6b7382c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / jupyterlab_niivue-0.2.7-py3-none-any.whl

Download URL jupyterlab_niivue-0.2.7-py3-none-any.whl
Size 7.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
192d71973065358fd6151ad2c6fef2e207275d3323f175e682ab7d30686b33a7
BLAKE2b-256 checksum
How to use checksums
d1c755e53845b18d38ac09f9290d4ba798bc33c2a941e15cdb4d0930bc39c69e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page