extending_nifti > JNIfTI - a JSON/binary JSON based format for storing neuroimaging data
Jun 18, 2019  02:06 PM | Qianqian Fang - Northeastern University
JNIfTI - a JSON/binary JSON based format for storing neuroimaging data
hi everyone, 

(I previously posted this message on this Github discussion thread, but would love to share it here as well
https://github.com/bids-standard/bids-sp... )

I just want to let everyone know I am currently working on a new neuroimaging data interchange format, called JNIfTI.

My current draft of the file specification can be found at


together you can find a matlab nifti-1/2 to jnifti converter and jnii/bnii data samples.


The basic idea is to use JSON and binary JSON (UBJSON) format to store complex scientific data, and completely get rid of a rigid, difficult-to-extend binary header. This makes the data readable, easy to extend and mixing with scientific data from other domains (like multi-modal data, physiology recordings, or computational models etc). There are also numerous JSON/UBJSON parsers out there, so, without writing any new code, a JNIfTI file can be readily parsed by these existing codes.

JNIfTI is designed with a compatibility layer to 100% translate the NIFTI-1/2 header/data/extension to the new structure, but once it is moved to JSON, you gain enormous flexibility to add new metadata, header info, organizing multiple datasets inside one document etc. I'd love to hear from this community, what additional information that are current lacking, and happy to accept proposals on defining new "required" metadata headers in to this format. My preference is to gradually shift the main metadata container from the NIFTIHeader structure to the "_DataInfo_" and "Properties" subfields in NIFTIData as the primary containers for metadata. This provides an opportunity to completely redesign the header entries.


look forward to hearing from you.

PS: The foundation of the JNIfTI format is another specification called JData - a proposal to systematically serialize complex data structures, such as N-D arrays, trees, graphs, linked lists etc. The JData specification is current in Draft 1, and can be found at