Reference Space

Allen Institute atlases and data are registered, when possible, to one of several common reference spaces. Working in such a space allows you to easily compare data across subjects and experimental modalities.

This page documents how to use the Allen SDK to interact with a reference space. For more information and a list of reference spaces, see the atlas drawings and ontologies API documentation and the 3D reference models API documentation. For details about the construction of the Common Coordinate Framework space, see the CCFv3 whitepaper.

Structure Tree

Brain structures in our reference spaces are arranged in trees. The leaf nodes of the tree describe the very fine anatomical divisions of the space, while nodes closer to the root correspond to gross divisions. The StructureTree class provides an interface for interacting with a structure tree.

To download a structure tree, use the allensdk.core.reference_space_cache.ReferenceSpaceCache class as seen in this example

Annotation Volumes

An annotation volume is a 3d raster image that segments the reference space into structures. Each voxel in the annotation volume is assigned an integer value that describes the finest structure to which that point in space definitely belongs.

To download a nrrd formatted annotation volume at a specified isometric resolution, use the allensdk.core.reference_space_cache.ReferenceSpaceCache class. There is an example in the notebook.

ReferenceSpaceCache Class

The allensdk.core.reference_space_cache.ReferenceSpaceCache class provides a Python interface for downloading structure trees and annotation volumes. It takes care of knowing if you’ve already downloaded the files and reads them from disk instead of downloading them again.

The class contains methods for working with our reference spaces. Some use cases might include:

Please see the example notebook for more code samples.