
Download whole or partial two-dimensional images from the Allen Institute with the Image and AtlasImage Download Services.
The Image download service serves whole and partial two-dimensional images presented on the Allen Brain Atlas Web site. Some images can be downloaded with expression or projection data. Glioblastoma images’ color block and boundary data can also be downloaded.
http://api.brain-map.org/api/v2/image_download/[SubImage.id]?downsample=[#]&quality=[#]&view=[expression|projection|tumor_feature_annotation|tumor_feature_boundary]
Download a downsampled SectionImage of one sagittal section from the Mouse Brain Pdyn SectionDataSet:
http://api.brain-map.org/api/v2/image_download/69750516?downsample=4
Download a downsampled expression mask for a SectionImage of one sagittal section from the Mouse Brain Pdyn SectionDataSet:
http://api.brain-map.org/api/v2/image_download/69750516?downsample=4&view=expression
Download a region of interest at full resolution from the same sagittal SectionImage:
[type or paste code here](http://api.brain-map.org/api/v2/image_download/69750516?left=6174&top=2282&width=1000&height=1000)
Download SectionImage 71592261 downsampled 3 times with 50% image quality:
http://api.brain-map.org/api/v2/image_download/71592261?downsample=3&quality=50
Download the downsampled SectionImage 126862583 with projection:
http://api.brain-map.org/api/v2/projection_image_download/126862583?downsample=4&view=projection
Determine the default range values for a Mouse Connectivity Projection experiment by referring to its associated Equalization model (red_lower=0, red_upper=923, green_lower=0, green_upper=987, blue_lower=0, blue_upper=4095), then download one of its downsampled SectionImages:
http://api.brain-map.org/api/v2/data/SectionDataSet/100141599.xml?include=equalization,section_images
http://api.brain-map.org/api/v2/image_download/102146167?range=0,923,0,987,0,4095&downsample=4
Download the color block or color boundary image designating tissue features of Glioblastoma tumor:
http://api.brain-map.org/api/v2/image_download/311175878?downsample=4&view=tumor_feature_annotation
http://api.brain-map.org/api/v2/image_download/311174547?downsample=4&view=tumor_feature_boundary
Find the closest NISSL image to SectionImage 71592261 and download it:
First, search for the closest NISSL image:
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::SectionImage,
rma::criteria,[id$eq71592261], rma::include,associates(data_set(treatments[name$eq'NISSL']))
Second, download the NISSL image using the Associate.id:
http://api.brain-map.org/api/v2/image_download/71592412
Download all of the sagittal images in the Mouse Brain Atlas for the gene Adora2a at full resolution.
First, search for relevant experiments’ IDs (SectionDataSets):
http://api.brain-map.org/api/v2/data/query.xml?criteria= \
model::SectionDataSet,
rma::criteria,[failed$eq'false'],products[abbreviation$eq'Mouse'],plane_of_section[name$eq'sagittal'],genes[acronym$eq'Adora2a']
Second, retrieve a list of all images for one of the experiments (SectionImages):
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::SectionImage,
rma::criteria,[data_set_id$eq70813257]
Finally, iterate through the list of images and call the SectionImage Download Service with their IDs:
http://api.brain-map.org/api/v2/image_download/70679088
A jpeg file of the requested image.
The AtlasImage download service serves whole and partial two-dimensional images with annotations presented on the Allen Brain Atlas Web site.
http://api.brain-map.org/api/v2/atlas_image_download/[AtlasImage.id]?downsample=[#]&quality=[#]&annotation=[true|false]&atlas=[#]
Download the downsampled AtlasImage 100883869 with annotations:
http://api.brain-map.org/api/v2/atlas_image_download/100883869?downsample=4&annotation=true
Request P56 Mouse Brain Atlas’ annotations:
http://api.brain-map.org/api/v2/atlas_image_download/100883869?downsample=4&annotation=true&atlas=2
Request P56 Developing Mouse Brain Atlas’ annotations:
http://api.brain-map.org/api/v2/atlas_image_download/100883869?downsample=4&annotation=true&atlas=181276165
Download all of the Mouse, P56 Sagittal Atlas’ Nissl images.
First, review the list of current Atlas Drawings and Ontologies to determine the Mouse, P56 Sagittal Atlas’ ID (Atlas id=2).
Second, retrieve a list of the Mouse, P56 Sagittal Atlas’ Nissl images (Atlas id=2):
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::Atlas,
rma::criteria,[id$eq2],
rma::include,atlas_data_sets(atlas_images(treatments))
Finally, iterate through the list of AtlasImages and call the AtlasImage Download Service to download the Nissl images:
http://api.brain-map.org/api/v2/atlas_image_download/100883771
A jpeg file of the requested image.
Explore how brain atlases are created and organized through ontologies. Learn about anatomical structure hierarchies and classification systems.

A set of high resolution digital reference atlases have been created to provide neuroanatomical context to in situ hybridization, microarray, RNA-sequencing and axonal projection data.
From the API, you can:
The following Atlases are available through the API (click on Atlas ID to launch the interactive atlas viewer):
The sections for each Atlas come from a single AtlasDataSet (child class of SectionDataSet) and single Specimen. Typically, only a subset of AtlasImages (child class of SectionImage) is used for the reference atlas. An “annotated” image is identified by the SubImage “annotated” attribute and the corresponding image type. Please note that multiple line example RMA queries on this page use the “+” character to represent spaces for browser compatibility.
Examples:
http://api.brain-map.org/api/v2/data/query.xml?criteria=model::AtlasImage,
rma::criteria,
[annotated$eqtrue],
atlas_data_set(atlases[id$eq1]),
alternate_images[image_type$eq'Atlas+-+Adult+Mouse'],
rma::options[order$eq'sub_images.section_number'][num_rows$eqall]
http://api.brain-map.org/api/v2/data/query.xml?criteria=model::AtlasImage,
rma::criteria,
[annotated$eqtrue],
atlas_data_set(atlases[id$eq138322605]),
alternate_images[image_type$eq'Atlas+-+Developing+Human'],
rma::options[order$eq'sub_images.section_number'][num_rows$eqall]

Once the annotated images have been identified, the image ID can be used to download the colorized and labeled images using the Image Download Service and the vector graphics using the SVG Download Service.
Examples:
http://api.brain-map.org/api/v2/atlas_image_download/100960248?downsample=4&annotation=true
http://api.brain-map.org/api/v2/svg/112360908?groups=31,113753815,113753816,141667008&downsample=8
http://api.brain-map.org/api/v2/svg_download/112360908?groups=31,113753815,113753816,141667008&downsample=8
In the API, a Structure represents a neuroanatomical region of interest. Structures are grouped into Ontologies and organized in a hierarchy or StructureGraph. With the exception of the “root” structure, each Structure has one parent and denotes a “part-of” relationship. Structures are assigned a color to visually emphasize their hierarchical position in the brain. See the Structure model page for listing of attributes and associations.
Major structural ontologies used in the Allen Brain Atlas Data Portal:
From the API, Structure and Ontology information can be downloaded in various formats.
Examples:
http://api.brain-map.org/api/v2/data/query.csv?criteria=model::Structure, rma::criteria,[ontology_id$eq7], rma::options[order$eq%27structures.graph_order%27][num_rows$eqall]
http://api.brain-map.org/api/v2/structure_graph_download/1.json
http://api.brain-map.org/api/v2/structure_graph_download/16.jsonMaster image-to-image synchronization for comparing brain atlas data. Navigate corresponding sections across multiple datasets simultaneously.

The following set of image synchronization services uses the image alignment results from the Informatics Data Processing Pipeline. Note: all locations on SectionImages are reported in pixel coordinates and all locations in 3-D ReferenceSpaces are reported in microns.
For a specified Atlas, find the closest annotated SectionImage and (x,y) location as defined by a seed SectionImage and seed (x,y) location.
http://api.brain-map.org/api/v2/image_to_atlas/[SectionImage.id].[xml|json]?x=[#]&y=[#]&z=[#]&atlas_id=[#]
For a seed location in SectionImage 68173101, locate the closest image and (x,y) position within the P56 coronal Atlas:
http://api.brain-map.org/api/v2/image_to_atlas/68173101.xml?x=6208&y=2368&atlas_id=1
XML or JSON document containing the following:
For a list of target SectionDataSets, find the closest SectionImage and (x,y) location as defined by a seed SectionImage and seed (x,y) pixel location.
http://api.brain-map.org/api/v2/image_to_image/[SectionImage.id].[xml|json]?x=[#]&y=[#]§ion_data_set_ids=[#,#,#...]
For seed location in SectionImage 68173101, locate the closest 3-D position in each input SectionDataSet.
http://api.brain-map.org/api/v2/image_to_image/68173101.xml?x=6208&y=2368§ion_data_set_ids=67810540,69782969
XML or JSON document containing the following for each SectionDataSet in the section_data_set_ids:
For a list of target SectionImages, find the closest (x,y) location as defined by a seed SectionImage and seed (x,y) location.
http://api.brain-map.org/api/v2/image_to_image_2d/[SectionImage.id].[xml|json]?x=[#]&y=[#]§ion_image_ids=[#,#,#...]
For a seed location in SectionImage 68173101, locate the closest 2-D position in each input SectionImage:
http://api.brain-map.org/api/v2/image_to_image_2d/68173101.xml?x=6208&y=2368§ion_image_ids=68173103,68173105,68173107
XML or JSON document containing the following for each SectionImage in the section_image_ids:
For a list of target SectionDataSets, find the closest SectionImage and (x,y) location as defined by a (x,y,z) location in a specified ReferenceSpace.
http://api.brain-map.org/api/v2/reference_to_image/[ReferenceSpace.id].[xml|json]?x=[#]&y=[#]&z=[#]§ion_data_set_ids=[#,#,#...]
For a 3-D seed location in the P56 ReferenceSpace, locate the closest image and (x,y) location for each input SectionDataSet.
http://api.brain-map.org/api/v2/reference_to_image/10.xml?x=6085&y=3670&z=4883§ion_data_set_ids=68545324,67810540
XML or JSON document containing the following for each SectionDataSet in the section_data_set_ids:
For a specified SectionImage and (x,y) location, return the (x,y,z) location in the ReferenceSpace of the associated SectionDataSet.
http://api.brain-map.org/api/v2/image_to_reference/[SectionImage.id].[xml|json]?x=[#]&y=[#]
For a location in SectionImage 68173101, return the (x,y,z) position in the associated ReferenceSpace.
http://api.brain-map.org/api/v2/image_to_reference/68173101.xml?x=6208&y=2368
RMA query to return the associated ReferenceSpace:
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::SubImage, rma::criteria,[id$eq68173101],
rma::include,data_set,
rma::options[only$eq'data_sets.id,data_sets.reference_space_id,sub_images.id']
XML or JSON document containing the (x,y,z) location in the associated ReferenceSpace.
For a list of target structures, find the closest SectionImage and (x,y) location as defined by the centroid of each Structure.
http://api.brain-map.org/api/v2/structure_to_image/[SectionDataSet.id].[xml|json]?structure_ids=[#,#,#...]
For each Structure in the input list, locate the closest image and (x,y) location in SectionDataSet 68545324:
http://api.brain-map.org/api/v2/structure_to_image/68545324.xml?structure_ids=315,698,1089,703,477,803,512,549,1097,313,771,354
XML or JSON document containing the following for each Structure in the structure_ids:
Learn to download 3-D expression grid data as NRRD files. Access voxel-level gene expression values for computational brain analysis.

Download 3-D expression grid data packaged into a compressed archive file (.zip).
http://api.brain-map.org/grid_data/download/[SectionDataSet.id]&include=[images]
Download the 200um density volume for the Mouse Brain Atlas SectionDataSet 69816930:
http://api.brain-map.org/grid_data/download/69816930
Download the 200um energy and intensity volumes for Mouse Brain Atlas SectionDataSet 69816930:
http://api.brain-map.org/grid_data/download/183282970?include=energy,intensity
Download the energy volume for the Mouse Brain Atlas’ coronal Adora2a experiment.
First, search for relevant experiments’ IDs (SectionDataSets):
http://api.brain-map.org/api/v2/data/query.xml?criteria= model::SectionDataSet, rma::criteria,[failed$eq'false'],products[abbreviation$eq'Mouse'],plane_of_section[name$eq'coronal'],genes[acronym$eq'Adora2a']
Then, download the energy volume for each of the experiments’ IDs:
http://api.brain-map.org/grid_data/download/72109410?include=energy
Zip file (.zip) containing a folder filled with the default files (data_set.xml, energy.mhd, energy.raw) or the requested data volumes.

Download 3-D projection grid data packaged into a compressed .nrrd image.
http://api.brain-map.org/grid_data/download_file/[SectionDataSet.id]&image=[image]&resolution=[resolution]
Download the 100um density volume for the Mouse Connectivity Atlas SectionDataSet 181777177:
http://api.brain-map.org/grid_data/download_file/181777177
Download the 25um injection_fraction volume for Mouse Connectivity Atlas SectionDataSet 181777177:
http://api.brain-map.org/grid_data/download_file/181777177?image=injection_fraction&resolution=25
The response will be a single 32-big floating point Nrrd image named for the requested image type and resolution. If no image is specified, the density volume is returned. If no resolution is specified, 100um resolution is assumed.