I am having a lot of troubles with getting all the raw slice data that was used for creating the Atlases.
A recent work in my field of AI was published for registration a 2d dataset from the Allen institute (DeepSlice), though I do not find a proper way of accessing all of it.
Specifically:
Where can I find all the urls of mouse coronal slice data? (one example is this id:71717640, with this url:Experiment Detail :: Allen Brain Atlas: Mouse Brain). How do I get all the list of available coronal sections?
Does all the datasets for coronal sections are with a thickness of 25 micron?
Hello Sivan,
The individual images can be found via the mouse atlas link Allen Reference Atlases :: Atlas Viewer (brain-map.org). Click on “coronal sections” to access the individual images. Details about the sectioning and imaging methods are available via the documentation link.
I want to get all the coronal data available and not how to get it, what are the urls?
Where can I read the entire data structure related to this experiment that Allen provides?
A bit late to the party but I was facing the same problem and I figured I might as well answer here. If it’s too late to help you, it might help someone else.
This example notebook references a URL that is no longer available but is meant to list the available atlas IDs. Luckily, it was saved by the Wayback Machine and is available here.
So, to answer your first question: to get a list of all the available image IDs, follow the instructions in the notebook I linked based on the atlas ID you find on the Wayback Machine
Here’s a code snippet that should do what you asked (if I understood correctly):
from allensdk.api.queries.image_download_api import ImageDownloadApi
import pandas as pd
image_api = ImageDownloadApi()
# Change the ID to reflect the atlas you're interested in
atlas_id = 2
# List the available image IDs
atlas_image_records = image_api.atlas_image_query(atlas_id)
atlas_image_dataframe = pd.DataFrame(atlas_image_records)
print(atlas_image_dataframe.id)
From there you can download the images by using allensdk.api.queries.image_download_api.ImageDownloadApi.download_atlas_image as shown in the same notebook (section titled “Download a single atlas image”).
If you’re interested in working with datasets that are not part of the reference atlases, instead use the ImageDownloadApi.section_image_query and ImageDownloadApi.download_section_image methods. The rest of the code should be the same.