Showing revision 10.21
  • Brain Mesh Library
  • Rendering JNIfTI in WebGL
  • Brain Parcellation
  • NeuroJSON Platform

NeuroJSON logo NeuroJSON

Scalable neuroimaging data exchange platform

NeuroJSON aims to develop a JSON-based neuroimaging data exchange format that is readable, searchable, shareable, can be readily validated and served in the web and cloud. This project is funded by the NIH U24-NS124027 grant.

Hiring Full-time scientific programmer

2022.06.08 Checkout our JNIfTI poster at OHBM 2022
05.31 Initial draft of mmap for JSON/binary JSON
04.25 BlenderPhotonics announced at Optica'22, built on JMesh
03.11 FieldTrip initial JNIfTI support is complete
02.22 Binary-JSON format BJData Spec Draft-2 is released
02.22 BJData format to be included in JSON for Modern C++ 3.11.0
02.11 dcm2niix now supports JSON/binary-JSON based JNIfTI (jnii/bnii)
01.14 BlenderPhotonics built upon JMesh is in preprint
01.05 First NeuroJSON App-MCX Cloud is published on JBO
2021.10.21 See our first conference poster on NeuroJSON at fNIRS2021
09.08 Tweetorial What does "open-source data" really mean?
09.04 Tweetorial What is NeuroJSON?
08.27 NeuroJSON received 5-yr NIH U24-award

Read more news... | Follow us on
Software/Libraries
Python
python-jdata
python-bjdata
MATLAB/GNU Octave
JSONLab
JNIfTY
JSNIRFY
JavaScript
js-jdata
js-bjdata
C
ubj
C++
JSON for Modern C++

NeuroJSON Appliations
/Demo/: MCX Cloud
/Demo/: BlenderPhotonics

Software

  • List of NeuroJSON parsers/writers

    Click on each library/utility on the left to read more.
  • python-jdata

    Using the lightweight Python-JData module, a complex Python data structure can be encoded as a dict object that is easily serialized as a JSON/binary JSON file and share such data between programs of different languages.

    URL
    https://pypi.org/project/jdata/

    Code
    https://github.com/NeuroJSON/pyjdata

    Install
    For Debian Bullseye/Ubuntu 21.04 or newer
     sudo apt-get install python3-jdata
    
    For all other systems
     pip install jdata
    

    Example
     import jdata as jd
     import numpy as np
     a={'name':'jd','value':1,'array':np.arange(1,5,dtype=np.uint8)}
     jd.show(a)
     jd.save(a,'mydata.json')  # jdata can dump numpy arrays to JSON
     b=jd.load('mydata.json')  # jdata loads both JSON and UBJSON
     jd.save(b,'mydata.jdb')   # save to UBJSON/Binary JData file
     print(b)
    
  • python-bjdata - a lightweight binary JSON format for Python

    This package was modified based on the py-ubjson package developed by Iotic Labs Ltd. The major changes were focused on supporting the Binary JData Specification Draft 1 - an extended Universal Binary JSON (UBJSON) Specification Draft-12.

    URL
    https://pypi.org/project/bjdata/

    Code
    https://github.com/NeuroJSON/pybj

    Install
    For Debian Bullseye/Ubuntu 21.04 or newer
     sudo apt-get install python3-bjdata
    
    For all other systems
     pip install bjdata
    

    Example
    import bjdata as bj a={'name':'jdata','value':1.0,'array':[1,2,4]} bj.dumpb(a) with open('data.jdb', 'w') as f: bj.dump(data, f) # alternatively, call jd.load/save import jdata as jd b=jd.load('data.jdb') jd.save(b,'newdata.jdb')
  • JSONLab - a portable JSON/UBJSON/MsgPack reader/parser for MATLAB/Octave

    JSONLab is one of the most popular JSON parsers for MATLAB, winning Popular Files 2018 and Editor's Pick.

    URL
    http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab

    Code
    https://github.com/fangq/jsonlab

    Install
    For Debian Bullseye/Ubuntu 21.04 or newer
    sudo apt-get install octave-jsonlab
    For Fedora 24 or new
    sudo dnf install octave-jsonlab
    For all other systems
    https://github.com/fangq/jsonlab/releases

    Example
    a=struct('name','jdata','value',1.0,'array',[1,2,4]); savejson(a) savejson('rootname',a) savejson('rootname',a,'compact',1) savejson('',a,'mydata.json') savejson('ziparray',eye(10),'Compression','zlib','CompressArraySize',1) savejson('',eye(10),'UseArrayShape',1) dat=loadjson('{"obj":{"string":"value","array":[1,2,3]}}') dat=loadjson('mydata.json') savebj('rootname',a,'mydata.jdb') % save to bjdata binary JSON file
  • JNIfTY Toolbox - Fast and portable NIfTI-1/2 reader and NIfTI-to-JNIfTI converter

    This is a fully functional NIfTI-1/2 reader/writer that supports both MATLAB and GNU Octave, and is capable of reading/writing both non-compressed and compressed NIfTI files (.nii, .nii.gz) as well as two-part Analyze7.5/NIfTI files (.hdr/.img and .hdr.gz/.img.gz). More importantly, this is a toolbox that converts NIfTI data to its JSON-based replacement, JNIfTI (.jnii for text-based and .bnii for binary-based), defined by the JNIfTI specification (http://github.com/fangq/jnifti). JNIfTI is a much more flexible, human-readable and extensible file format compared to the more rigid and opaque NIfTI format, making the data much easier to manipulate and share.
    URL
    https://github.com/NeuroJSON/jnifty

    Example
    jnii=loadnifti('test.nii.gz');             % read a .nii.gz file as a jnii structure
    jnii=loadnifti('test.nii', 'nii');         % read a .nii file as a nii structure
    jnii=jnifticreate(uint8(magic(10)),'Name','10x10 magic matrix'); % create a JNIfTI structure
    jnii=loadjnifti('test.jnii');              % read a .jnii file as a jnii structure
    bnii=loadjnifti('test.bnii');              % read a binary .bnii file as a jnii structure
    savejnifti(jnii, 'magic10.jnii');
    savejnifti(jnii, 'magic10_debug.bnii','Compression','gzip');
    
  • JSNIRF Toolbox - A portable MATLAB toolbox for parsing SNIRF (HDF5) and JSNIRF (JSON) files

    This toolbox also provides a fast/complete reader/writer for the HDF5-based SNIRF files (along with any HDF5 data) via the EazyH5 toolbox (http://github.com/fangq/eazyh5). The toolbox can read/write SNIRF v1.0 data files specified by the SNIRF specification http://github.com/fNIRS/snirf .

    URL
    https://github.com/NeuroJSON/jsnirfy

    Install
    1. To read/write SNIRF/HDF5 files, one must install the EazyH5 toolbox at http://github.com/fangq/eazyh5 ; this is only supported on MATLAB, not Octave.
    2. To create/read/write JSNIRF files, one must install the JSONLab toolbox http://github.com/NeuroJSON/jsonlab ; this is supported on both MATLAB and Octave.
    3. To read/write JSNIRF files with internal data compression, one must install the JSONLab toolbox http://github.com/NeuroJSON/jsonlab as well as ZMat toolbox http://github.com/fangq/zmat ; this is supported on both MATLAB and Octave.
    Example
    data=loadsnirf('mydata.snirf');     % load an HDF5 SNIRF data file, same as loadh5+regrouph5
    jdata=loadjsnirf('mydata.bnirs');   % load a binary JSON/JSNIRF data file
    data=snirfcreate;
    data.nirs.data.dataTimeSeries=rand(100,5);
    data.nirs.metaDataTags.SubjectID='subj1';
    data.nirs.metaDataTags.MeasurementDate=date;
    savesnirf(data,'test.snirf');
    savejsnirf(data,'test.jnirs');
    
  • jdata.js - JData encoder/decoder for JavaScript

    jdata.js is an ultra-portable JavaScript module that can encode and decode NeuroJSON/JData data structure constructs in JavaScript/web and Node.js applications. It uses numjs as the backend when decoding N-D array JData constructs.

    The NIH-funded MCX Cloud web-based Monte Carlo simulation utilizes JSData for decoding 3-D volumes written in the [URL: https://github.com/NeuroJSON/jnifti JNIfTI format] by MCX and perform in-browser 3-D rendering using Three.js

    URL
    https://npmjs.com/package/jda

    Code
    https://github.com/NeuroJSON/jsdata

    Install
     npm install jda
    
    Example
    // import packages
    var jdata = require('jda')
    var nj = require('numjs')
    global.atob = require("atob");
    global.btoa = require("btoa");
    // define sample data
    let data={integer:1,shortarray:[1,2,3],object:[[[1],[2],[3]],null,false]};
    // create jdata class with compression method "zlib"
    let jd = new jdata(data,{compression:'zlib'});
    console.log(jd.tojson());   //jdata can convert complex data to JSON
    
  • bjdata.js - JData encoder/decoder for JavaScript

    BJData is a UBJSON-derived binary JSON format. bjdata.js is a lightweight encoder and decoder for JavaScript and [Node.js].

    URL
    https://npmjs.com/package/bjd

    Code
    https://github.com/NeuroJSON/js-bjdata

    Install
     npm install bjd
    
    Example
    var bjd = require("bjd")
    let data={integer:1,shortarray:[1,2,3],object:[[[1],[2],[3]],null,false]};
    let buf = bjd.encode(data);
    console.log(buf)
    let newdata = bjd.decode(buf)[0];
    console.log(newdata)
    
  • UBJ Binary JData (BJData) and UBJSON C parser

    URL
    https://github.com/NeuroJSON/ubj

  • JSON for Modern C++ JSON/UBJSON/MessagePack/CBOR/BJData parser

    URL
    https://github.com/NeuroJSON/json

Specifications
Data Structure Level
JData Specification
BJData Specification
JSON-Mmap Specification
Data File Level
JNIfTI Specification
JSNIRF Specification
JMesh Specification
Dataset Level
BIDS-REST

Specifications

  • List of Format Specifications

    Click on each specification on the left to read more.
  • JData: A general-purpose data annotation and interchange format

    JData is a general-purpose data interchange format aimed for portability, readability and simplicity. It utilizes the JavaScript Object Notation (JSON) [RFC4627] and Universal Binary JSON (UBJSON) specifications to store complex hierarchical data in both text and binary formats. In this specification, we define a list of JSON-compatible constructs to store a wide range of data structures, including scalars, arrays, structures, tables, hashes, linked lists, trees and graphs, and support optional data grouping and metadata for each data element. The generated data files are compatible with JSON/UBJSON specifications and can be readily processed by most existing parsers.

    URL: https://github.com/NeuroJSON/jdata

    Version: 1.0 Draft 3

  • Binary JData: A portable interchange format for complex binary data

    The Binary JData (BJData) Specification defines an efficient serialization protocol for unambiguously storing complex and strongly-typed binary data found in numerous application domains. The BJData specification is the binary counterpart to the JSON format, both of which are used to serialize complex data structures supported by the JData specification (http://openjdata.org). The BJData spec is derived and extended from the Universal Binary JSON (UBJSON, http://ubjson.org) specification (Draft 12). It adds supports for N-dimensional packed arrays and extended binary data types.

    URL: https://github.com/NeuroJSON/bjdata

    Version: Draft 2

  • JSON-Mmap: JSON/binary JSON memory-map (mmap) for fast file IO

    JSON and binary-JSON formats are ubiquitously supported but are designed largely for storage of lightweight hierarchical data. However, when accessing large data records inside a JSON/binary-JSON file, file reading and writing can be slow. This specification aims to define a lightweight memory-mapping (mmap) table to enable fast disk-mapped file IO for JSON and binary JSON formats. A JSON-Mmap table can be embedded in the same data file or store in a separate file. Using the byte-offset/length information stored in the JSON-Mmap allows to read or update particular data record without needing to parse or overwrite the entire data file, leading to dramatic performance improvement.

    URL: https://github.com/NeuroJSON/jsonmmap/

    Version: Draft 1

  • JNIfTI: An extensible file format for storage and interchange of neuroimaging data

    JNIfTI is a highly extensible file format developed for the storage, interchange and processing of neuroimaging data. Built upon the JData specification, a JNIfTI file has both a text-based interface using the JavaScript Object Notation (JSON) [RFC4627] format and a binary interface using the Universal Binary JSON (UBJSON) serialization format. This further allows JNIfTI to store not only neuroimaging data formatted in the NIfTI-1, NIfTI-2, and Analyze7.5 specifications, but also non-array-based and complex data structures, such as neuroimaging metadata, using simple syntax. To enhance accessibility, JNIfTI files can be directly parsed by most existing JSON and UBJSON parsers.

    URL: https://github.com/NeuroJSON/jnifti

    Version: 1.0 Draft 1

  • JSNIRF: A lightweight and portable fNIRS data storage format

    JSNIRF is a portable format for storage, interchange and processing data generated from functional near-infrared spectroscopy, or fNIRS - an emerging functional neuroimaging technique. Built upon the JData and SNIRF specifications, a JSNIRF file has both a text-based interface using the JSON format and a binary interface using the Universal Binary JSON (UBJSON) serialization format. It contains a compatibility layer to provide a 1-to-1 mapping to the existing HDF5 based SNIRF files. A JSNIRF file can be directly parsed by most existing JSON and UBJSON parsers.

    URL: https://github.com/NeuroJSON/jsnirf

    Version: 0.4

  • JMesh - A versatile data format for unstructured meshes and geometries

    JMesh is a portable and extensible file format for the storage and interchange of unstructured geometric data, including discretized geometries such as triangular and tetrahedral meshes, parametric geometries such as NURBS curves and surfaces, and constructive geometries such as constructive solid geometry (CGS) of shape primitives and meshes.

    URL: https://github.com/NeuroJSON/jmesh

    Version: 1.0 Draft 1

  • BIDS-REST

    To be announced

About us
Principle Investigator
Qianqian Fang, PhD
Scientific Steering Committee
Robert Oostenveld, PhD
Lyuba Zehl, PhD
Guiomar Niso, PhD
John Richards, PhD
Luca Pollonini, PhD
Collaborators
Guillaume Flandin, PhD
Bruce Fischl, PhD
Ted Huppert, PhD
David Boas, PhD
Acknowledgement
NeuroJSON project is funded by the NIH/NINDS under the grant U24-NS124027.

About us

  • NeuroJSON developers



    Click on each contributor on the left to read more.
  • Qianqian Fang Photo

    Dr. Qianqian Fang

    Dr. Qianqian Fang is Associate Professor and Associated Chair for Graduate Studies in the Bioengineering Department of Northeastern University (USA). He is the author of Iso2Mesh, MCX, JSONLab, Brain2Mesh, active Fedora and Debian contributor.

    The research of his lab, Computational Optics and Translational Imaging (COTI), focuses on developing diffuse optical tomography imaging techniques for cancer diagnosis, wearable functional near-infrared spectroscopy (fNIRS) systems to measurable brain activities, and high performance computational methods.

    The NeuroJSON project has evolved from his efforts in developing the popular MATLAB JSON parser, JSONLab -- one of the top-downloaded MATLAB community toolboxes and Popular File 2018.

  • Robert Oostenveld Photo

    Dr. Robert Oostenveld

    Dr. Robert Oostenveld is Associate PI and MEG physicist at the Donders Institute for Brain, Cognition and Behaviour at the Radboud University, Nijmegen (NL) and associated researcher at NatMEG, Karolinska Institutet, Stockholm (SE). His work focuses on the development of new data analysis methods for human MEG and EEG data and he shares his methods as open source through the FieldTrip toolbox. Robert has contributed to the Human Connectome Young Adult Project, the CIfTI file format, and to the design and implementation of the Donders Repository. He is a member of the BIDS steering group and contributed actively to BIDS extensions proposals for MEG, EEG, iEEG, PET, microscopy, and fNIRS.
  • Lyuba Zehl Photo

    Dr. Lyuba Zehl

    Dr. Zehl is currently a postdoctoral researcher in the Big Data Analytics group at the Institute for Neuroscience & Medicine (INM-1) of the Jülich Research Centre in Germany. She is the product owner of the open Metadata Initiative for Neuroscience Data Structures (openMINDS), co-leads the curation team of the Data & Knowledge service of the EBRAINS research infrastructure (since 2020), and co-chairs the INCF Working Group on Standardized Data. She’s obsessed with taming metadata in the neuroscience-jungle to facilitate FAIR data sharing.

    For more information, checkout the openMINDS main GitHub, openMINDS Collab, the EBRAINS homepage, the EBRAINS Data & Knowledge service website, or the website of the INCF Working Group on Standardized Data.

  • Dr. Guiomar Niso

  • Luca Pollonini Photo

    Dr. Luca Pollonini

    Luca Pollonini is an Associate Professor at the University of Houston (TX, USA), where he holds appointments in the Departments of Engineering Technology, Electrical and Computer Engineering, and Biomedical Engineering. He is also the co-PI of the NSF I/UCRC BRAIN. His primary research interest is in optical neuroimaging through functional infrared spectroscopy (fNIRS), in which he actively develops novel instruments as well as software tools for real-time and post-hoc data quality assurance.

    He is also co-leading the BIDS extension for NIRS and the standardization of LSL metadata for fNIRS.

  • John Richards Photo

    Dr. John Richards

    John Richards is “Carolina Distinguished Professor, Emeritus” and Research Professor at the University of South Carolina. His work focuses on the development of sustained attention, and the brain development that accompanies attention development. He uses a variety of psychophysiological and neurimaging methods to study infant attention, and has developed a number of methodological advances to apply neuroimaging methods to young infants. He also created the “Neurodevelopmental MRI Database” which is a collection of average MRI templates from 2 wks through 89 years of age, which can be used as “norming” templates, EEG/ERP electrode placements, and NIRS/fNIRS optode placements.
  • NeuroJSON developers



    Click on each contributor on the left to read more.
Return Home

Powered by Habitat