Mask Image for Region of Interest (ROI)

For validating the circuits we would need to specify “regions of interest” for a given atlas (for example, pick a sphere within a layer to measure cell density). A mask image is generated for given specific shape and stored in NRRD format with the following metadata.

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

uchar

the type of the values stored in the voxels is unsigned char


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 char',
  u'dimension': 3
}