|
1 | | -JNIfTI: An extensible file format for storage and interchange of neuroimaging data |
| 1 | +JNIfTI: a JSON/binary JSON extension to the NIfTI-1/2 formats |
2 | 2 | ============================================================ |
3 | 3 |
|
4 | 4 | - **Status of this document**: This document is currently under development. |
5 | | -- **Copyright**: (C) 2019-2020 Qianqian Fang <q.fang at neu.edu>, |
6 | | - 2020 Edward Xu <xu.ed at husky.neu.edu> |
| 5 | +- **Copyright**: (C) 2019-2025 Qianqian Fang <q.fang at neu.edu>, |
| 6 | + 2020 Edward Xu <xu.ed at northeastern.edu> |
7 | 7 | - **License**: Apache License, Version 2.0 |
8 | | -- **Version**: V1 (Draft 1) |
| 8 | +- **Version**: V1 (Draft 2) |
9 | 9 | - **Abstract**: |
10 | 10 |
|
11 | | -> JNIfTI is a highly extensible file format developed for the storage, |
12 | | -interchange and processing of neuroimaging data. Built upon the JData |
13 | | -specification, a JNIfTI file has both a text-based interface using the |
14 | | -JavaScript Object Notation (JSON) [RFC4627] format and a binary |
15 | | -interface using the Universal Binary JSON (UBJSON) serialization format. |
16 | | -This further allows JNIfTI to store not only neuroimaging data formatted |
17 | | -in the NIfTI-1, NIfTI-2, and Analyze7.5 specifications, but also |
18 | | -non-array-based and complex data structures, such as neuroimaging metadata, |
19 | | -using simple syntax. To enhance accessibility, JNIfTI files can be directly |
20 | | -parsed by most existing JSON and UBJSON parsers. Advanced features include |
21 | | -optional hierarchical data storage, image data grouping, data compression, |
22 | | -streaming and encryption as permitted by JData data serialization framework. |
| 11 | +> This specification defines the JNIfTI standard format. The JNIfTI format |
| 12 | +allows one to store and extend the widely used NIfTI format (.nii) using JavaScript |
| 13 | +Object Notation (JSON) [RFC4627] and binary JSON serialization methods. |
| 14 | +It loss-lessly maps all NIfTI-1 and NIfTI-2 headers and data structures to |
| 15 | +a human-readable JSON-based wrapper. Use of JSON and JNIfTI formats to store |
| 16 | +NIfTI data makes it possible to rapidly index, exchange, and query large amount |
| 17 | +of NIfTI datasets and metadata using modern database engines where JSON is used |
| 18 | +as the underlying data exchange format. With the extension of JData annotations, |
| 19 | +JNIfTI also permits optional hierarchical data storage, image data grouping, |
| 20 | +data compression, streaming and encryption. |
23 | 21 |
|
24 | 22 |
|
25 | 23 | ## Table of Content |
@@ -87,16 +85,16 @@ of data acquired under the previous data formats. To add to this, the |
87 | 85 | NIfTI formats consist only of a binary interface and thus are not directly |
88 | 86 | human-readable, thus further complicating this task. |
89 | 87 |
|
90 | | -Over the past few years, [JavaScript Object Notation](http://json.org) |
| 88 | +Over the past few years, [JavaScript Object Notation](https://json.org) |
91 | 89 | (JSON) has become ubiquitously recognized among the Internet community for its |
92 | 90 | ability to store complex data, excellent portability, and human-readability. |
93 | 91 | The subsequent introduction and widespread adoption of a range of binary |
94 | | -JSON-like format, such as [UBJSON](http://ubjson.org), |
95 | | -[Binary JData (BJData)](https://github.com/OpenJData/bjdata), |
96 | | -[MessagePack](https://msgpack.org/) and [CBOR](http://cbor.io), |
| 92 | +JSON-like format, such as [UBJSON](https://ubjson.org), |
| 93 | +[Binary JData (BJData)](https://neurojson.org/bjdata), |
| 94 | +[MessagePack](https://msgpack.org/) and [CBOR](https://cbor.io), |
97 | 95 | have added complementary features such as support for typed data, smaller file |
98 | 96 | sizes, and faster processing speeds as well. The |
99 | | -[JData specification](https://github.com/fangq/jdata/blob/master/JData_specification.md) |
| 97 | +[JData specification](https://github.com/NeuroJSON/jdata/blob/master/JData_specification.md) |
100 | 98 | capitalizes upon the strengths of these data interchange formats and |
101 | 99 | provides the foundation for serializing complex hierarchical data using |
102 | 100 | JSON/BJData constructs. This has then enabled the definition of language- |
@@ -179,8 +177,8 @@ The direct storage format and the annotated storage format are functionally |
179 | 177 | equivalent. While we primarily describe data storage in the context of the direct |
180 | 178 | format below, it is applicable to the annotated format as well. We also note that |
181 | 179 | any valid JSON formatted data structure can be converted into a binary form using the |
182 | | -rules defined in the [Binary JData specification](https://github.com/OpenJData/bjdata), |
183 | | -which was extended from [UBJSON specification (Draft 12)](http://ubjson.org). |
| 180 | +rules defined in the [Binary JData specification](https://neurojson.org/bjdata), |
| 181 | +which was extended from [UBJSON specification (Draft 12)](https://ubjson.org). |
184 | 182 |
|
185 | 183 |
|
186 | 184 | JNIfTI Keywords |
@@ -561,7 +559,7 @@ The below table maps the NIFTI data slice codes to the acceptable slice strings. |
561 | 559 | | **Slice alternating decreasing type 2** | | | |
562 | 560 | |`NIFTI_SLICE_ALT_DEC2 `| `6` | `"alt2-"` | |
563 | 561 |
|
564 | | -#### QForm/SForm (NIFTI-1 header: `qform_codes/sform_code`) |
| 562 | +#### QForm/SForm (NIFTI-1 header: `qform_code/sform_code`) |
565 | 563 |
|
566 | 564 |
|
567 | 565 | | NIFTI-1/2 XForm Code Name |Code | JNIfTI QForm/SForm Key | |
@@ -834,7 +832,7 @@ The `"Type"` field must be one of the 3 values according to the NIFTI-1 specific |
834 | 832 |
|
835 | 833 | `"_ByteStream_"` is a JData keyword to store raw byte-stream buffers. For text-based JNIfTI/JData |
836 | 834 | files, its value must be a base64-encoded string; no base64 encoding is needed when storing in the |
837 | | -binary format. For details, please see the JData specification ["Generic byte-stream data" section](https://github.com/fangq/jdata/blob/master/JData_specification.md#generic-byte-stream-data). |
| 835 | +binary format. For details, please see the JData specification ["Generic byte-stream data" section](https://github.com/NeuroJSON/jdata/blob/master/JData_specification.md#generic-byte-stream-data). |
838 | 836 |
|
839 | 837 | Again, because the extension data buffer has very little semantic information, the use of |
840 | 838 | such a buffer is not recommended. Please consider converting the data to meaningful JData |
|
0 commit comments