Scalar Image File Format

Scalar value image includes the following data types:

  • brain_region: label image with integer values as voxel type

  • gray_level: raw imaging data, integer or float values as voxel type

  • longitude: computed depth information of the atlas, integer values as voxel type

  • hemisphere: hemisphere dataset with int8 or uint8 values as voxel type (0: undefined, 1: left, 2: right)

Specification

The meta data stored in the NRRD file should follow the specification below:

Field

Value Type

Suggested Value

Comments

dimension

integer

3

dimension of the image is always 3 for volumetric data

encoding

string

gzip

use ‘gzip’ for compressing the data

endian

string

little

use ‘little’ for x86 machines

kinds

list of string

[‘domain’, ‘domain’, ‘domain’]

use ‘domain’ to indicate that the axis is image axis

sizes

list of integer

[{size_x}, {size_y}, {size_z}]

the size of the volume in x, y, z dimension

space directions

3d matrix

A 3D matrix indicating the orientation of the image data, with the value indicating the spacing of the voxel

space origin

list of float

[{origin_x}, {origin_y}, {origin_z}]

physical coordinates of the image origin

space

string

{x_orientation}-{y_orientation}-{z_orientation}

the orientation of the image data, should be consistent with the space direction

type

string

{voxel type}

the type of the values stored in the voxels (e.g. unsigned/signed int, float, etc.)


Example:

{
  u'space origin': ['-46.540000915527344', '-152.15999984741211', '-152'],
  u'space directions': [['16', '0', '0'], ['0', '16', '0'], ['0', '0', '16']],
  u'sizes': [308, 495, 464],
  u'space': 'left-posterior-superior',
  u'encoding': 'gzip',
  u'endian': 'little',
  u'kinds': ['domain', 'domain', 'domain'],
  u'type': 'unsigned short',
  u'dimension': 3
}