@@ -436,7 +436,7 @@ is listed below
436436| * NIFTI code for ppm* | |
437437| ` NIFTI_UNITS_PPM 40 ` | ` "ppm" ` |
438438| * NIFTI code for radians per second* | |
439- | ` NIFTI_UNITS_RADS 48 ` | ` "rad" ` |
439+ | ` NIFTI_UNITS_RADS 48 ` | `"rad/s" |
440440
441441
442442#### Intent (NIFTI-1 header: ` intent_code ` )
@@ -629,9 +629,21 @@ One can also apply data compression to reduce file sizes. In this case
629629```
630630
631631Please note that all composite data types (marked by "\* " in Table 2)
632- can not be stored in the direct form and therefore must be stored using the annotated array format.
633-
634- All three of the above forms are valid JSON formats, and thus can be converted to the corresponding
632+ can not be stored in the direct form and therefore must be stored using
633+ the annotated array format.
634+
635+ NIfTI-1/2 stores raw data values in the column-major element order (meaning
636+ that the left-most index (` dim[1] ` ) is the fastest index while the right-most index
637+ is the slowest) while JData ` _ArrayData_ ` construct by default stores data elements
638+ in the row-major order (i.e. the right-most index is the fastest index). As a result,
639+ if one has to directly copy the NIfTI data buffer to the ` _ArrayData_ ` element,
640+ one must add ` "_ArrayOrder_" : "c" ` or ` "_ArrayOrder_" : "col" ` before ` _ArrayData_ `
641+ or ` _ArrayZipData_ ` entries in the above annotated ` NIFTIData ` forms.
642+ Alternatively, if ` _ArrayOrder_ ` is not specified (which suggests "row-major" order),
643+ one must perform an N-D transpose operation to the NIfTI image data buffer before
644+ serializing those to ` _ArrayData_ ` .
645+
646+ All three of the above forms are valid JSON formats, and thus can be converted to the corresponding
635647BJData formats when a binary JNIfTI file is desired. Using the optimized N-D array
636648header defined in the JData specification, the binary storage of the direct-form
637649array can be efficiently written as
0 commit comments