This release is a pre-release and may not be stable for production use.
JupyterLab NiiVue
WebGPU/WebGL2 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
- File Browser: Simply double-click any supported neuroimaging file in the JupyterLab file browser
- Right-click Menu: Right-click on a file and select "Open With" → "NiiVue Viewer"
- 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
Saving Scenes and Figures
NVDocument in the menu bar saves the selected tile as a NiiVue scene document (.nvd, or readable .nvd.json with Save as JSON): its images with their display settings and the view. Screenshot saves the visible tiles as a PNG. Both ask for a path in the workspace, starting in the opened file's folder. Double-click a .nvd in the file browser to open the scene again, or use NVDocument > Load.
Screenshots
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 L (Left)
- L: Move crosshair to R (Right)
- 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:
- Voxel-based: NIfTI (.nii, .nii.gz), NRRD (.nrrd, .nhdr), MRtrix MIF (.mif), AFNI HEAD/BRIK, MGH/MGZ, ITK MHD (.mhd, .mha), ECAT7 (.v), DICOM (.dcm), NumPy (.npy, .npz)
- Mesh-based: GIfTI (.gii), FreeSurfer (pial, white, inflated), MZ3 (.mz3), STL (.stl), Wavefront OBJ (.obj), PLY (.ply), BrainSuite DFS (.dfs), Legacy VTK (.vtk), X3D (.x3d), and others (ASC, BYU, GEO, ICO, TRI, OFF, SRF, NV)
- Mesh Overlays: GIfTI (.gii), CIfTI-2 (.nii), MZ3 (.mz3), FreeSurfer (CURV, ANNOT), SMP, STC
- Tractography: TCK (.tck), TRK (.trk), TRX (.trx), VTK (.vtk), AFNI (.niml.tract)
Requirements
- JupyterLab >= 4.0.0
- A modern web browser with WebGPU or WebGL2 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:
- Check that the file format is supported (see list above)
- Try right-clicking the file and selecting "Open With" → "NiiVue Viewer"
- 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.
Citation
If you use this extension in published work, please cite:
Eckstein K, Androulakis A, Dao TT, et al. Seamless neuroimaging visualization: The NiiVue wrapper ecosystem. Aperture Neuro. 2026;6. doi:10.52294/001c.167815
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
- NiiVue VS Code Extension - NiiVue for Visual Studio Code
- NiiVue - The core NiiVue library
- NiiVue Web App - Online NiiVue viewer
Release files for jupyterlab-niivue 0.3.0.dev161
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyterlab_niivue-0.3.0.dev161.tar.gz | 4.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyterlab_niivue-0.3.0.dev161-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 MB
Release files / jupyterlab_niivue-0.3.0.dev161.tar.gz
| Download URL | jupyterlab_niivue-0.3.0.dev161.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be1545170eb86f654229061c18e1364b8ce01c3f0739153821acbf124488e76b
|
|
BLAKE2b-256 checksum How to use checksums |
e437f71e8e1218b1497a8f46d9d59cf22346cc4bf747eaaba992da53ce1b61bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / jupyterlab_niivue-0.3.0.dev161-py3-none-any.whl
| Download URL | jupyterlab_niivue-0.3.0.dev161-py3-none-any.whl |
|---|---|
| Size | 7.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
deaa8c689e788be5321853d60fc900551e82df9573fdea8495ad7e042de82e25
|
|
BLAKE2b-256 checksum How to use checksums |
bca22fb266a7bb7bfc6a9433eba541cbf6d41f463a950dbd5bb40076e61c1b73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|