Some code to work with the Allen Inst Mouse Brain CCF data, specifically the 10µm voxel 2017 version. See the Wiki for detailed instructions.
- A computer mouse with a scroll wheel
- MATLAB (R2017 on a Windows computer was used for all testing)
- Curve Fitting and Image Processing Toolboxes
- This repository (add all folders and subfolders to your MATLAB path)
- The npy-matlab repository
- The Allen Mouse Brain Atlas volume and annotations (download both files from this link) If you have access, you could also locate the data files at //zserver/Lab/Atlas/allenCCF. Alternatively, see setup_utils to download and preprocess the files yourself. See also https://alleninstitute.github.io/AllenSDK/reference_space.html to access the data directly via the Allen Inst python API.
This is a browser sort of like Paxinos - scroll through coronal slices, see labeled areas, etc.
>> tv = readNPY('template_volume_10um.npy'); % grey-scale "background signal intensity"
>> av = readNPY('annotation_volume_10um_by_index.npy'); % the number at each pixel labels the area, see note below
>> st = loadStructureTree('structure_tree_safe_2017.csv'); % a table of what all the labels mean
>> file_save_location = 'C:\Histology\Mouse1'; % where will the probe locations be saved
>> probe_name = 'test'; % name probe to avoid overwriting
>> f = allenAtlasBrowser(tv, av, st, file_save_location, probe_name);
>> plotBrainGrid();
The original volume has numbers that correspond to the "id" field in the structure tree, but since I wanted to make a colormap for these, I re-indexed the annotation volume by the row number of the structure tree. So in this version the values correspond to "index"+1. This also allows using uint16 datatype, cutting file size in half. See setup_utils.m.
© 2015 Allen Institute for Brain Science. Allen Mouse Brain Atlas (2015) with region annotations (2017). Available from: http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/
See Allen Mouse Common Coordinate Framework Technical White Paper for details http://help.brain-map.org/download/attachments/8323525/Mouse_Common_Coordinate_Framework.pdf?version=3&modificationDate=1508178848279&api=v2