Skip to main content
WebGPU and WebGL2

Medical images, live in the browser.

NiiVue renders MRI, CT, microscopy, surfaces and tractography on the GPU. No plugins and no special server: give it a canvas and a URL.

npm install @niivue/niivue@next
A few lines

From canvas to viewer

Attach a viewer to a canvas and hand it the images. NiiVue uses WebGPU when the browser has it and falls back to WebGL2.

  • Mouse, touch and drag and drop built in
  • Settings are plain properties
  • Save and restore the whole scene as JSON
Read the guide
main.ts
import NiiVue from '@niivue/niivue'

const nv = new NiiVue()
await nv.attachToCanvas(document.getElementById('gl1'))
await nv.loadVolumes([{ url: './mni152.nii.gz' }])

Open source, BSD licensed.

Issues, ideas and pull requests are welcome.