Updated 26 May 2023
Allen Atlas Top-Down Viewer
This package provides code to generate a top-down view of the Allen Atlas from the full Common Coordinate Framework (CCF) and visualize it interactively in stereotaxic coordinates expressed in mm with respect to bregma. There are two functions for plotting the view as well as all code needed to generate the plots from scratch using the CCF.
The easiest way to to install and stay up to date is directly via MATLAB: Go to "APPS" in the ribbon then select "Get More Apps" and search for AllenAtlasTopDown to install.
Alternatively you can download the Zip archive or clone the repo then add the
code directory to your MATLAB path.
No need to "Add with Subfolders".
This package requires the Image Processing Toolbox.
To launch an interactive top-down viewer:
To show a static image with labels:
To modify details of the plotted areas
The area borders are generated from the full CCF volume. Following installation of the requirements described below, the borders can be re-generated as follows.
>> t = aratopdown.atlas.build_topdown t = struct with fields: bregma: [540 44 570] dorsal_brain_areas: [43×1 struct] whole_brain: [1×1 struct] plot_areas: [50×1 uint16] top_down_annotation: [1×1 struct] % Then plotted as above >> aratopdown.draw_top_down_ccf(t); >> aratopdown.area_highlighter(t)
Requirements for building the top-down view from the Allen CCF volume
These requirements are for re-building the area borders and are not needed for running the two
To build the top-down view you should download the Allen CCF mouse atlas from http://data.cortexlab.net/allenCCF/.
You will need the files
These files are a re-formatted version of the original atlas, which has been processed with this script)
Place the files somewhere in your MATLAB path.
Download/clone npy-matlab and add to your MATLAB path.
Mouse CCF scaling, rotation, and bregma notes
Bregma has been approximated in AP by matching the Paxinos atlas slice at AP=0 to the CCF, the ML position is the midline, and the DV position is a very rough approximation from matching an MRI image (this DV coordinate shouldn't be used - all actual coordinates should be measured from the brain surface for better accuracy)
The CCF is slightly stretched in the DV axis (because it's based on a single mouse with an unusually tall brain), currently estimated here as 94.3%. This stretch has not been taken into account in this package.
The CCF AP rotation is arbitrary with reference to the skull. It is estimated that this angle is 5 degrees nose-down (from https://www.biorxiv.org/content/10.1101/2022.05.09.491042v3). Since this will have negligable impact on the top-down view, the brain is not un-tilted.
This code is derived from work done by Andy Peters in his neuropixels_trajectory_explorer. Furthermore, Andy kindly provided an additional script that demonstrated how to elegantly get the top-down ARA view in coordinates with respect to bregma. Some text from this README is taken from the neuropixels_trajectory_explorer README.
- 2023-01-05: Initial commit. Minor bugfixes and improvements.
Rob Campbell (2023). AllenAtlasTopDown (https://github.com/Zapit-Optostim/AllenAtlasTopDown/releases/tag/v0.1.4), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
See release notes for this release on GitHub: https://github.com/Zapit-Optostim/AllenAtlasTopDown/releases/tag/v0.1.4
See release notes for this release on GitHub: https://github.com/Zapit-Optostim/AllenAtlasTopDown/releases/tag/v0.1.3
See release notes for this release on GitHub: https://github.com/raacampbell/AllenAtlasTopDown/releases/tag/v0.1.2
See release notes for this release on GitHub: https://github.com/raacampbell/AllenAtlasTopDown/releases/tag/v0.1.1