A npm package to display NIfTI volume (based on ThreeJs)
Try the online demo.
In the consuming project, add a line to your .npmrc
file so this package can be retrieved from github package registry :
@cau-riken:registry=https://npm.pkg.github.com
And if not already done, you'll also need to include a personal token with read:packages
scope to be able to install packages from github registry:
//npm.pkg.github.com/:_authToken=<REPLACE_BY_YOUR_TOKEN>'
(References: authenticating to github packages and create a personal (classic) token)
npm install @cau-riken/vol-renderer
import 'normalize.css';
....
import { VolumeRenderer } from "@cau-riken/vol-renderer";
import "@cau-riken/vol-renderer/dist/main.css";
....
<VolumeRenderer
url='resources/Marmoset_T2WI.nii.gz'
inlineControls={true}
/>