NIFTI-Reader-JS
A JavaScript NIfTI file format reader. This reader supports both NIfTI-1 and NIfT1-2 file formats, both compressed (.nii.gz) and uncompressed (.nii). Current TODO list.
###Usage
See the tests folder for more examples.
var data =
var niftiHeader = null,
niftiImage = null;
if (nifti.isCompressed(data)) {
data = nifti.decompress(data);
}
if (nifti.isNIFTI1(data)) {
niftiHeader = nifti.readHeader(data);
console.log(niftiHeader.toFormattedString());
niftiImage = nifti.readerImage(niftiHeader, data);
}
###Install
Get a packaged source file:
Or install via NPM:
npm install nifti-reader-js
Or install via Bower:
bower install nifti-reader-js
###Testing
npm test
###Building
See the release folder for the latest builds or build it yourself using:
npm run build
This will output nifti-reader.js and nifti-reader-min.js to build/.
Acknowledgments
NIFTI-Reader-JS makes use of the following third-party libraries:
- pako — for GZIP inflating