Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
http://api.brain-map.org/api/v2/data/SectionDataSet/100141599.xml?include=equalization,section_images

http://api.brain-map.org/api/v2/section_image_download/102146167?range=0,923,0,987,0,4095&downsample=4

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

Code Block

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

Code Block

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:

Code Block

http://api.brain-map.org/api/v2/section_image_download/70679088

Parameters

filename

Integer

SectionImage.id identifying the image to download.

expression

Boolean (optional)

Set the value to true to retrieve the specified SectionImage's expression mask image.

downsample

Integer (optional)

The number of times to downsample the original image. For example, 'downsample=1' halves the number of pixels of the original image both horizontally and vertically. Specifying 'downsample=2' quarters the height and width values.

quality

Integer (optional)

The jpeg quality of the returned image. This must be an integer from 0, for the lowest quality, up to as high as 100. If it is not specified, it defaults to the highest quality.

left

Integer (optional)

Index of the leftmost column of the region of interest, specified in full-resolution (largest tier) pixel coordinates. SectionImage.x is the default value.

top

Integer (optional)

Index of the topmost row of the region of interest, specified in full-resolution (largest tier) pixel coordinates. SectionImage.y is the default value.

width

Integer (optional)

Number of columns in the output image, specified in tier-resolution (desired tier) pixel coordinates. SectionImage.width is the default value. It is automatically adjusted when downsampled.

height

Integer (optional)

Number of rows in the output image, specified in tier-resolution (desired tier) pixel coordinates. SectionImage.height is the default value. It is automatically adjusted when downsampled.

range

Array (optional)

Filter to specify the RGB channels. The range parameter consists of 6 comma delimited integers that define the lower (0) and upper (255) bound for each channel in red-green-blue order (i.e. "range=0,1500,0,1000,0,4095"). The default range values can be determined by referring to the following fields on the Equalization model associated with the SectionDataSet: red_lower, red_uppper, green_lower, green_upper, blue_lower, blue_upper. For more information, see the "Image Controls" section of the Allen Mouse Brain Connectivity Atlas: Projection Dataset help topic.

...