1
- # JSNIRF Toolbox - A portable MATLAB toolbox for parsing SNIRF (HDF5) and JSNIRF (JSON) files
1
+ # JSNIRFY - A MATLAB/Octave toolbox for parsing SNIRF (HDF5) and JSNIRF (JSON) files
2
2
3
- * Copyright (C) 2019, 2025 Qianqian Fang <q.fang at neu.edu>
3
+ * Copyright (C) 2019- 2025 Qianqian Fang <q.fang at neu.edu>
4
4
* License: GNU General Public License version 3 (GPL v3) or Apache License 2.0, see License* .txt
5
- * Version: 0.5 (code name: Amygdala)
6
- * Compatibility: MATLAB R2010b or newer, R2016b or newer saves SNIRF-1.1 compliant files
5
+ * Version: 0.9 (code name: Amygdala - final )
6
+ * Compatibility: MATLAB R2010b or newer, R2016b or newer to save SNIRF-1.1 compliant files, or Octave 5.0 and newer
7
7
* URL: https://github.com/NeuroJSON/jsnirfy
8
8
9
9
## Overview
@@ -12,7 +12,7 @@ JSNIRF is a portable format for storage, interchange and processing data generat
12
12
from functional near-infrared spectroscopy, or fNIRS - an emerging functional neuroimaging
13
13
technique. Built upon the JData and SNIRF specifications, a JSNIRF file has both a
14
14
text-based interface using the JavaScript Object Notation (JSON) [ RFC4627] format
15
- and a binary interface using the Universal Binary JSON (UBJSON, http ://ubjson.org ) derived
15
+ and a binary interface using the University Binary JSON (UBJSON, https ://ubjson.org ) derived
16
16
Binary JData ([ BJData] ( https://github.com/NeuroJSON/bjdata ) ) serialization format.
17
17
It contains a compatibility layer to provide a 1-to-1 mapping to the existing
18
18
HDF5 based SNIRF files. A JSNIRF file can be directly parsed by most existing
@@ -22,17 +22,19 @@ enabled by JData data serialization framework.
22
22
23
23
This toolbox also provides a fast/complete reader/writer for the HDF5-based SNIRF
24
24
files (along with any HDF5 data) via the EasyH5 toolbox
25
- (http ://github.com/NeuroJSON/easyh5 ). The toolbox can read/write SNIRF v1.0 data
26
- files specified by the SNIRF specification http ://github.com/fNIRS/snirf .
25
+ (https ://github.com/NeuroJSON/easyh5 ). The toolbox can read/write SNIRF v1.0 data
26
+ files specified by the SNIRF specification https ://github.com/fNIRS/snirf .
27
27
28
28
This toolbox is selectively dependent on the below toolboxes
29
29
- To read/write SNIRF/HDF5 files, one must install the EasyH5 toolbox at
30
- http://github.com/NeuroJSON/easyh5 ; this is only supported on MATLAB, not Octave.
30
+ https://github.com/NeuroJSON/easyh5
31
+ - To read/write SNIRF/HDF5 files in GNU Octave, one must install the oct-hdf5 using
32
+ ` pkg install https://github.com/fangq/oct-hdf5/archive/refs/heads/main.zip `
31
33
- To create/read/write JSNIRF files, one must install the JSONLab toolbox
32
- http ://github.com/NeuroJSON/jsonlab ; this is supported on both MATLAB and Octave.
34
+ https ://github.com/NeuroJSON/jsonlab ; this is supported on both MATLAB and Octave.
33
35
- To read/write JSNIRF files with internal data compression, one must install
34
- the JSONLab toolbox http ://github.com/NeuroJSON/jsonlab as well as ZMat toolbox
35
- http ://github.com/NeuroJSON/zmat ; this is supported on both MATLAB and Octave.
36
+ the JSONLab toolbox https ://github.com/NeuroJSON/jsonlab as well as ZMat toolbox
37
+ https ://github.com/NeuroJSON/zmat ; this is supported on both MATLAB and Octave.
36
38
37
39
## Why JSNIRF?
38
40
@@ -59,7 +61,7 @@ JSNIRF file is a plain JSON file, and has various advantages
59
61
60
62
The binary JSNIRF format uses a binary JSON format (BJData) which is also
61
63
- quasi-human readable despite it is binary
62
- - free parsers available for [ MATLAB] ( http ://github.com/NeuroJSON/jsonlab) ,
64
+ - free parsers available for [ MATLAB] ( https ://github.com/NeuroJSON/jsonlab) ,
63
65
[ Python] ( https://pypi.org/project/bjdata/ ) , [ C++] ( https://github.com/NeuroJSON/json ) ,
64
66
and [ C] ( https://github.com/NeuroJSON/ubj )
65
67
- easy to write your own parser because of the simplicity
@@ -145,20 +147,20 @@ is converted to the below JSON/JSNIRF data structure
145
147
146
148
## Installation
147
149
148
- The JSNIRF toolbox can be installed using a single command
150
+ The JSNIRFY toolbox can be installed using a single command
149
151
```
150
- addpath('/path/to/jsnirf');
152
+ addpath('/path/to/jsnirf');
151
153
```
152
154
where the ` /path/to/jsnirf ` should be replaced by the unzipped folder
153
155
of the toolbox (i.e. the folder containing ` savejsnirf.m/loadjsnirf.m ` ).
154
156
155
157
In order for this toolbox to work, one must install the below dependencies
156
158
- the ` saveh5/loadh5 ` functions are provided by the EasyH5 toolbox at
157
- http ://github.com/NeuroJSON/easyh5
159
+ https ://github.com/NeuroJSON/easyh5
158
160
- the ` savejson ` and ` savebj ` functions are provided by the JSONLab
159
- toolbox at http ://github.com/NeuroJSON/jsonlab
161
+ toolbox at https ://github.com/NeuroJSON/jsonlab
160
162
- if data compression is specified by ` 'compression','zlib' ` param/value
161
- pairs, ZMat toolbox will be needed, http ://github.com/NeuroJSON/zmat
163
+ pairs, ZMat toolbox will be needed, https ://github.com/NeuroJSON/zmat
162
164
163
165
164
166
## Usage
@@ -193,7 +195,7 @@ Example:
193
195
194
196
Please submit your bug reports, feature requests and questions to the Github Issues page at
195
197
196
- https://github.com/NeuroJSON/jsnirf /issues
198
+ https://github.com/NeuroJSON/jsnirfy /issues
197
199
198
200
Please feel free to fork our software, making changes, and submit your revision back
199
- to us via "Pull Requests". JSNIRF toolbox is open-source and we welcome your contributions!
201
+ to us via "Pull Requests". JSNIRFY toolbox is open-source and we welcome your contributions!
0 commit comments