Top-down view of the Allen Atlas in stereotaxic coords
ダウンロード: 53
更新 2023/5/26

Allen Atlas Top-Down Viewer

View AllenAtlasTopDown on File Exchange

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 visualisation functions. To build the top-down view you should download the Allen CCF mouse atlas from You will need the files structure_tree_safe_2017.csv and annotation_volume_10um_by_index.npy 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 Since this will have negligable impact on the top-down view, the brain is not un-tilted in this implementation.


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.

More info


  • 2023-01-05: Initial commit. Minor bugfixes and improvements.


Rob Campbell (2024). AllenAtlasTopDown (, GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2022b
Windows macOS Linux
Help Center および MATLAB AnswersMesoscale and Multiscale についてさらに検索
タグ タグを追加

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート

See release notes for this release on GitHub:


See release notes for this release on GitHub:

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。