No Description

Frederik Filip Stæger 87faa02a4f Delete 'data/mice/.DS_Store' 3 years ago
Example 5eab7544b6 Delete 'Example/.gitignore' 3 years ago
automatic_segmentation_program b9f0b7b428 Updated preprocess.py logs 3 years ago
data 87faa02a4f Delete 'data/mice/.DS_Store' 3 years ago
template_creation_pipline 90b7783d35 gin commit from rMBP-15-Malthe.local 3 years ago
Example_folder.zip 28a4bc992b gin commit from rMBP-15-Malthe.local 3 years ago
LICENSE 29ee819fbd gin commit from SUND33778 4 years ago
README.md 50369923e8 Update 'README.md' 3 years ago
ccf_to_dapi_affine_transformation.txt bc70314620 Uploaded ccf_to_dapi_affine_transformation.txt 3 years ago
datacite.yml fc3462b23e Opdaterede Malthe 3 years ago
requirements.txt f9a64253e2 Update to nibabel 3.0.2 3 years ago

README.md

Description of DAPI template

This repository contains a three-dimensional population-based average atlas, the DAPI template, of the C57BL/6 mouse brain stained with the commonly employed fluorescence nuclear stain DAPI. The DAPI template, accompanying segmentation, and a simplified segmentation can be found as nifti files in data/. Moreover, the repository contains all the raw data (data/mice/) and the full code base (template_creation_pipieline/) which was used in the construction of the template.

The DAPI template, is constructued from consecutive coronal brain slices of 12 male mice aged between 10-11 weeks. Each mouse brain is first reconstructed into a three-dimensional volume and then an iterative averaging process of these reconstructed brain volumes was employed to yield the final population-based average.

The repository also includes an automatic segmentation/spatial normalization pipeline (automatic_segmentation_program/) for novel coronal slices described below.

You can also find a guide on how to visualize the AllenCCF on top of the DAPI template.

Automatic slice segmentation

Program for automatic segmentation to a DAPI-stained coronal mouse brain slices.

Getting started

  • Setup your environment with the correct python version, python packages, and Advanced Normalization Tools (ANTs).
  • Download the and unzip the example folder.
  • In a terminal window, navigate into the unzipped example folder.
  • Run the runner_example.sh with the command bash runner_example.sh
  • The automatically created segmentation can be found in Brain_example/Segmentation.nii.
  • To visualize the segmentation, open one of the channels Brain_example/im_c2.nii as main image and open the segmentation image Brain_example/Segmentation.nii as segmentation. Can for instance be done in ITK-SNAP.

For detailed parameter and output description go to the automatic segmentation program.

Setting up the environment

Below is a quick guide to setup the enviroment on a UNIX (Mac and Linux) system

  • The program requires Python 3.7+. You can get the newest version of python by installing Anaconda (https://www.anaconda.com). To check your version of python, type python --version
  • Install or update all packages listed in requirements.txt. All packages can be installed/updated using pip. To install a package, e.g. nibabel: pip install nibabel. To check the version of a package pip freeze | grep nibabel
  • Install ANTs, preferably using precompiled binaries, available (for Mac/Linux) at https://github.com/ANTsX/ANTs/releases/tag/v2.1.0
  • Create ANTSPATH and add it to your path. This is done by editing the config file for the terminal shell. The config-file is often named ~/.bashrc or ~/.bashprofile. In the config-file add the following lines

    export ANTSPATH=usr/local/bin/ANTs
    export PATH=$PATH:$ANTSPATH
    

    Here, ANTs was installed in /usr/local/bin/ANTs.

    After adding this to the config-file, restart the terminal and test if the path was added correctly by typing

    which antsRegistration
    

    The correct path should then be printed. If permission is denied, the file needs to be made executable - this is done using the command chmod +x <...>/antsRegistration

Prerequisites

  • A high-resolution, DAPI modality TIFF image of a coronal mouse brain slice. Can have multiple channels.
  • The DAPI template file (.nii or .nii.gz)
  • A segmentation of the DAPI template (.nii or .nii.gz)

Usage

Use runner.py to preprocess and output a segmentation registred to the slice. For detailed parameter and output description go to the automatic segmentation program.

Overlay with AllenCCF

To visualize the Allen CCF on top of the DAPI template:

  1. Download the DAPI template.
  2. Download the current AllenCCF template in the desired resolution from the download page.
  3. Download the transformation.
  4. Apply the transformation to the AllenCCF template. Using average_template_25.nrrd as example, this can either be done with:

ANTs

antsApplyTransforms \
 -i average_template_25.nrrd \
 -d 3 \
 -r dapi_template.nii.gz \
 -o average_template_25_registered_to_dapi.nii.gz \
 -t ccf_to_dapi_affine_transformation.txt

ITK-SNAP

  1. Open the DAPI template (dapi_template.nii.gz) in ITK-SNAP
  2. Add the AllenCCF template (average_template_25.nrrd) as a seperate image (File->Add Another Image).
  3. Open Tools->Registration, which will open a panel to the right.
  4. In the bottom right, press the folder icon ('Load transformation from file') and choose the transformation (ccf_to_dapi_affine_transformation.txt).
  5. If you want to save the transformed AllenCCF, press the reslice icon ('Reslice the moving...') and choose ok. Now you have 3 small images in the top right corner of each plane. Press the bottom one, press the little drop-down in the small image, and choose 'save image'.
datacite.yml
Title A three-dimensional, population-based average of the C57BL/6 mouse brain from DAPI-stained coronal slices
Authors Stæger,Frederik Filip;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark;ORCID:0000-0002-2295-8637
Mortensen,Kristian;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark;ORCID:0000-0003-3726-0781
Nielsen,Malthe Skytte Nordentoft;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark;ORCID:0000-0002-7833-5877
Hirase,Hajime;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark;ORCID:0000-0003-3806-6905
Sigurdsson,Björn;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark;ORCID:0000-0002-7484-7779
Kaufmann,Louis;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark
Nedergaard,Maiken;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark and Center for Translational Neuromedicine, University of Rochester Medical Center, Rochester, NY 14642, USA.;ORCID:0000-0001-6502-6031
Description The full data set and pipeline for constructing the three-dimensional, population-based average of the C57BL/6 mouse brain form DAPI-stained coronal slices. This repository also contains a python implementation of automatic coronal brain slice segmentation. The data set constitutes of all the raw slice images (.tif) in full resolution, the pre-processed version (.nii), the individually reconstructed brain volumes, and the final population-based average.
License Creative Commons CC0 1.0 Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/)
References A three-dimensional, population-based average of the C57BL/6 mouse brain from DAPI-stained coronal slices [] (IsDescribedBy)
Funding
Keywords Neuroscience
Mouse brain template
C57BL/6 brain template
DAPI
Population-based average
Automatic segementation
Resource Type Dataset