h1. DOWNLOADING 3-D EXPRESSION GRID DATA

{toc:style=none|minLevel=2|maxLevel=3|class=toc-style}

!voxel_level_expression.png|width=32! Download 3-D expression grid data packaged into a compressed archive file (.zip).

h2. Prototype

{noformat}
http://api.brain-map.org/grid_data/download_file/[SectionDataSet.id]&include=[volumes]&resolution=[resolution]
{noformat}

h2. Examples

Download the intensity and density volumes for SectionDataSet 69816930:

{noformat}
http://api.brain-map.org/grid_data/download_file/69816930?include=intensity,density
{noformat}

Download the 100um density volume for the Mouse Connectivity Projection experiment 183282970:

{noformat}
http://api.brain-map.org/grid_data/download_file/183282970
{noformat}
Download the 25um density volume for the Mouse Connectivity Projection experiment 183282970:

{noformat}
http://api.brain-map.org/grid_data/download_file/183282970?resolution=25
{noformat}
Download the energy volume for the Mouse Brain Atlas' coronal Adora2a experiment.

    First, search for relevant experiments' IDs (SectionDataSets):

{noformat}
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']
{noformat}
    Then, download the energy volume for each of the experiments' IDs:

{noformat}
http://api.brain-map.org/grid_data/download/72109410?include=energy
{noformat}

h2. Parameters

| filename | Integer | ID of the desired SectionDataSet. |
| volumes | Array (optional) | Explicitly list the desired volumes as a comma-separated list. Valid volumes are energy, intensity and density. An additional volume of injection is available for projection SectionDataSets.  |
| resolution | Integer | For projection data, available resolutions are 10, 25, 50, and 150 (in microns). For adult mouse gene expression SectionDataSets, only 200um resolution data is available and will be returned regardless of the input value. |

h2. Response

Zip file (.zip) containing a folder filled with the default files (data_set.xml, energy.mhd, energy.raw) or the requested data volumes.

| energy_{resolution}.nrrd | A simple text header file in MetaImage format describing the volume. This file is returned by default if the volumes parameter is null. |
| density_{resolution}.nrrd | A raw uncompressed float (32-bit) little-endian volume representing average expression energy per voxel. A value of "-1" represents no data. This file is returned by default if the volumes parameter is null. |
| intensity_{resolution}.nrrd | A simple text header file in MetaImage format describing the volume. |
| injection_{resolution}.nrrd | A raw uncompressed float (32-bit) little-endian volume representing average expression density per voxel. A value of "-1" represents no data. |