# Downloading 3-D Expression Grid Data

**URL:** <https://community.brain-map.org/t/downloading-3-d-expression-grid-data/2859>\
**Category:** Allen Brain Atlas API\
**Created:** [January 8, 2024, 3:40pm UTC](https://community.brain-map.org/t/downloading-3-d-expression-grid-data/2859 "2024-01-08T15:40:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SvenOtto](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/svenotto/32/893_2.png) [@SvenOtto](https://community.brain-map.org/u/SvenOtto)\
**Post date:** [January 8, 2024, 3:40pm UTC](https://community.brain-map.org/t/downloading-3-d-expression-grid-data/2859/1 "2024-01-08T15:40:29Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/brainobservatory/original/2X/2/25a77a582c6ccb66a7729ba721d8e03bbd302354.png) Download 3-D expression grid data packaged into a compressed archive file (.zip).

## Prototype

```auto
http://api.brain-map.org/grid_data/download/[SectionDataSet.id]&include=[images]

```

## Examples

Download the 200um density volume for the Mouse Brain Atlas SectionDataSet 69816930:

```auto
http://api.brain-map.org/grid_data/download/69816930

```

Download the 200um energy and intensity volumes for Mouse Brain Atlas SectionDataSet 69816930:

```auto
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):

```auto
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:

```auto
http://api.brain-map.org/grid_data/download/72109410?include=energy

```

## Parameters

| ID | Integer | ID of the desired SectionDataSet. |
| --- | --- | --- |
| include | String (optional) | Explicitly choose the desired image volumes. Valid volumes are energy, density, and intensity. Supply multiple volumes in a comma-delimited list (e.g. “include=energy,density,intensity”). By default, only energy is returned. |

## Response

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

| data\_set.xml | XML file with details regarding the specimen and images that is only returned if the volumes parameter is null. |
| --- | --- |
| energy.mhd | A simple text header file in MetaImage format describing the volume. This file is returned by default if the volumes parameter is null. |
| energy.raw | 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. |
| density.mhd | A simple text header file in MetaImage format describing the volume. |
| density.raw | A raw uncompressed float (32-bit) little-endian volume representing average expression density per voxel. A value of “-1” represents no data. |
| intensity.mhd | A simple text header file in MetaImage format describing the volume. |
| intensity.raw | A raw uncompressed float (32-bit) little-endian volume representing average expression intensity per voxel. A value of “-1” represents no data. |
| injection.mhd | A simple text header file in MetaImage format describing the volume. |
| injection.raw | A raw uncompressed float (32-bit) little-endian volume representing the proportion of pixels within each voxel that were within the manually annotated injection site. |

# DOWNLOADING 3-D PROJECTION GRID DATA

![image](https://canada1.discourse-cdn.com/flex027/uploads/brainobservatory/original/2X/2/25a77a582c6ccb66a7729ba721d8e03bbd302354.png) Download 3-D projection grid data packaged into a compressed .nrrd image.

## Prototype

```auto
http://api.brain-map.org/grid_data/download_file/[SectionDataSet.id]&image=[image]&resolution=[resolution]

```

## Examples

Download the 100um density volume for the Mouse Connectivity Atlas SectionDataSet 181777177:

```auto
http://api.brain-map.org/grid_data/download_file/181777177

```

Download the 25um injection\_fraction volume for Mouse Connectivity Atlas SectionDataSet 181777177:

```auto
http://api.brain-map.org/grid_data/download_file/181777177?image=injection_fraction&resolution=25

```

## Parameters

| ID | Integer | ID of the desired SectionDataSet. |
| --- | --- | --- |
| image | String (optional) | Explicitly choose the desired image volume. Valid volumes are projection\_density, projection\_energy, injection\_fraction, injection\_density, injection\_energy, and data\_mask. |
| resolution | Integer (optional) | Available resolutions for projection data are 10, 25, 50, and 100 (in microns). |

## Response

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.

| projection\_density | Density of projecting signal (number of projecting pixels / volume) |
| --- | --- |
| projection\_energy | Density of projecting signal multiplied by total signal intensity |
| injection\_fraction | Fraction of pixels belonging to the injection site |
| injection\_density | Density of projecting signal for pixels belonging to the injection site |
| injection\_energy | Injection density multiplied by total signal intensity for pixels belonging to the injection site |
| data\_mask | Binary image where a value of ‘1’ indicates that greater than 50% of a grid voxel contains valid data. |

---

<div class="post-metadata">

**Author:** ![AKAnderson](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@AKAnderson](https://community.brain-map.org/u/AKAnderson)\
**Post date:** [January 12, 2026, 1:52am UTC](https://community.brain-map.org/t/downloading-3-d-expression-grid-data/2859/2 "2026-01-12T01:52:06Z")

</div>

Hello, I tried downloading the Grid data and was able to. But when I open the xml file it says this is the developing mouse brain atlas. I selected section ID based off of the DEG ISH mouse brain data. Is there is something I need to change or specify in the command to get the Mouse Brain Atlas versus the Developing Brain Atlas? Also is there a variable guide, for example what is “trv, tvr, tsv,” etc. Thanks!
