View on GitHub

Brain Addressing System

The right way to address the brain

Address format

Before describing the formats, it is important to realize that a brain address always points to a location in a brain atlas. To assign an address to data from a new brain, the new brain must first be transformed to match the template brain of that atlas. This process is called registration. We call the resulting space atlas-registered space. A major issue that BAS solves, is that one and the same brain atlas is often used in many different incarnations. Light-microscopists use a version with micrometer coordinates, MRI-scientists prefer the atlas to match the orientation of their scanner, and electrophysiologists may want to transform the atlas origin to bregma. When each of these user groups claims that their data is registered to a given atlas, it is still a complex puzzle to merge their data to a single space. The BAS solution is not to re-register the existing data to a more standardized atlas space, but rather to have the data specify the choices it made for units, anatomical orientation, and origin. This is what is encoded in the brain address.

A BAS brain address can be formatted as a full address, in shorthand notation or as a JSON dictionary. The full notation looks like a web-address, and points to a page with detailed information about the address. The shorthand notation is designed to be used as part of a file name. The JSON format is the most verbose, ready to support extended features.

Full notation

The full address uses an URI notation, which means that it consists of five components, formatted as <scheme>:[//<authority>]<path>[?<query>][#<fragment>], where the square brackets indicate optional parts. The five parts are used as follows:

Address token

The shorthand notation is designed to be used as part of a file name, to indicate the atlas space that the file contents are registered to. The notation consists of the same components, but formatted differently as in bas{x,y,z@provider.atlas[.^]origin,unit,orientation}. Here, bas{} indicates that a brain addressing system declaration follows. The x,y,z@ part contains the coordinate. It can be omitted if only the atlas space is of interest. Between atlas and origin there must either be a dot (.) to indicate center-of-voxel alignment, or tilde (^) to indicate corner-of-voxel alignment. The unit and orientation parameters are optional and may appear in any order. Examples: bas{1,2,3@sba.ABA_v3.ac,um,PIR}, bas{sba.ABA_v3^corner,LIP,mm}.

JSON notation

When brain addresses are used inside json-based file formats, the various components can also be written as a dictionary:

{
"provider": <provider>,  
"atlas": <atlas>,  
"coord": [<x>,<y>,<z>],  
"roi": {
  "cmd": <roi-generator command>
  "params": <roi-generator parameters>
},
"unit": <unit>
"voxelsize": [<dx>,<dy>,<dz>],
"orientation": <orientation>,
"origin": <origin>,
}

where the parts between braces represent valid parameter values. Here, unit only accepts the unit name, the voxel size is in a separate parameter.