You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, for a variety of reasons, I fooled around with creating a custom nifti1 reader in javascript, and made something that actually works, and a toy viewer to go along with it. Here's a demo:
It's small (minified and gzipped, the reader is about 19k) and fast -- parsing the structural image from the NIH test dataset takes about 20ms on Chrome/my 5-year-old Air if the file's endianness matches, and 500ms if it doesn't.
All the header fields are included (yay jBinary), and getting slices is easy (#ras_slice). Slicing and rendering in the (broken, unoptimized!) toy viewer is insanely fast (about 3ms/frame).
It's still missing some features (most notably, converting ijk <-> ras coordinates) but that shouldn't be too hard to add.
Anyhow! We may wind up using this internally, but it also might be useful for you.
The text was updated successfully, but these errors were encountered:
Ooh, this looks great! In principle I would love to use it instead of the xtk reader. It's just a matter of finding the time to work through the code and figure out how to integrate it. Probably won't happen in the next month or two (grant deadlines), but maybe in November. If you have a chance to write a README on usage and data structure, that will probably speed things along. I'm excited about this!
I've also been contemplating a complete re-write of the UI in React or something similar, so that might be a good time to switch to jsnifti...
Hi there,
So, for a variety of reasons, I fooled around with creating a custom nifti1 reader in javascript, and made something that actually works, and a toy viewer to go along with it. Here's a demo:
http://njvack.github.io/jsnifti
... and the source:
https://github.com/njvack/jsnifti
It's small (minified and gzipped, the reader is about 19k) and fast -- parsing the structural image from the NIH test dataset takes about 20ms on Chrome/my 5-year-old Air if the file's endianness matches, and 500ms if it doesn't.
All the header fields are included (yay jBinary), and getting slices is easy (#ras_slice). Slicing and rendering in the (broken, unoptimized!) toy viewer is insanely fast (about 3ms/frame).
It's still missing some features (most notably, converting ijk <-> ras coordinates) but that shouldn't be too hard to add.
Anyhow! We may wind up using this internally, but it also might be useful for you.
The text was updated successfully, but these errors were encountered: