You can view our reference atlases online at atlas.brain-map.org, but what if you want to download the images from an atlas (or SVG polygons describing the structures in one of an atlas’ sections)? What if you want to download these data for a whole atlas? There are a couple of ways to go about this:
1. using the AllenSDK
We recommend that you download atlas images using the AllenSDK, a Python package containing tools for accessing and using our data. Using the AllenSDK lets you easily download and organize many atlas images or SVG. Please see the notebook of image download examples for more information. If you run into problems using the AllenSDK, let us know on the AllenSDK’s Github page.
I’m new to the whole concept of API and i’m having trouble downloading the images i want. For example i want to download an image from Aging, Dementia and TBI atlas (lets say specimen number H14.09.010) and i want the original image of amyloid beta IHC FFPE expression in the hippocampus. How would the API link look like? I just can’t find the right link and the examples on image download instructions don’t help either.
Thank’s for the reply and sorry if it this is something simple, but i’m really having a hard time with this.
ask our public api for all of the sub_images associated with the donor named H14.09.010. To get this, we have to traverse a few layers of association: donors -> specimens -> data sets -> sub images.
build a table of sub_images that lists the name of the imaged structure (e.g. hippocampus), the treatment applied (e.g. IHC:a-beta (FFPE)), and the ids of any corresponding sub_images (we need these to actually do the download). I chose to do this part in Python.
query this table for the structure & treatment combination that we are interested in.
Thanks very much Nile! It worked!!!
I only have a question about obtaining the original size, i.e. raw image file. Do i then type downsample=1 instead of 2?
The downsample parameter specifies the number of times to downsample the image by a factor of 2 along each axis (this is documented here). If you want a full-size image you need to set downsample=0 (watch out - these can end up being pretty big).