No Description

Frederik Filip Stæger f9a64253e2 Update to nibabel 3.0.2 4 years ago
Example fb6ff3c3c6 gin commit from rMBP-15-Malthe.local 4 years ago
automatic_segmentation_program f92028e933 gin commit from rMBP-15-Malthe.local 4 years ago
data 468e4a6cd2 gin commit from rMBP-15-Malthe.local 4 years ago
Example_folder.zip a21303c9b6 gin commit from rMBP-15-Malthe.local 4 years ago
LICENSE 29ee819fbd gin commit from SUND33778 4 years ago
README.md 04bfa12bb5 gin commit from rMBP-15-Malthe.local 4 years ago
datacite.yml 8461c30c0b Update 'datacite.yml' 4 years ago
requirements.txt f9a64253e2 Update to nibabel 3.0.2 4 years ago

README.md

Description

This repository contains the full data set for constructing the DAPI template, the full DAPI template creation pipeline and the automatic slice segmentation.

Automatic slice segmentation

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

How to setup the enviroment

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

  • To run the program, Python 3.7+ is required. You can get the newest version of python by installing Anaconda. To check the version of the python instalation typing

    python --version
    
    • Install ANTs. This is done by adding a precompiled binaries to the libary directory. The precompiled binaries for Mac/Linux is avaliable at
      https://github.com/ANTsX/ANTs/releases/tag/v2.1.0

    • Make sure to add ANTs to the path. This is done by editing the config file for the terminal shell. The config file would often be named

      ~/.bashrc
      

In the configfile add the path. This can be done by inserting

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

Here the path to the ANTs registration was $/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 denied, then the file needs to be made executable - this is done using the command

    chmod +x <...>/antsRegistration
    
    • Make sure to have installed or updated all packages listed in requirements.txt. All the packages can be updated using pip. It is espicially crucial to have installed to have installed the non standard packages Nibabel and nipype. To install a a package i.e. Nibabel
    pip install nibabel
    

To check the version of a package

  pip freeze | grep nibabel

Prerequisites

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

Usage

  • Use runner.py to preprocess and output a sgementation registred to the slice in a designated output folder
  • Use preprocess.py to prepare input slice for automatic registration

Example_folder.zip

In the repository is included a zip file that contains all the files and scripts used in order to run an Example of the program. To run the example, download and unzip the folder and open the folder in a terminal window. Make sure that the enviroment is setup correct as descirbed above, and then run the shell fill by

bash runner_example.sh

Details

Detailed parameter description.

runner.py

Usage

python3 runner.py sliceloc segloc templateloc bregma [coord] outputdir

In the subfolder 'Example' a shell script is provided that runs the programs as intended with test brainslice.

Positional/Required Arguments

sliceloc Location of the slice you wish to register (.nii or.nii.gz)
segloc Location of file containing segmentation of the template (.nii or.nii.gz)
templateloc Location of template file (.nii or .nii.gz)
bregma [coord] Bregma coordinate of input slice
outputdir Location for the output of the registration files

Optional arguments

--dapi [index] Index of the DAPI channel in the slice, by default the DAPI channel is assumed to be the last channel

preprocess.py

Usage

python3 preprocess.py file dir -s Series --pdim [pixeldimensions]  

Positional/Required Arguments

file Location of the file to be preprocessed (.tiff or .nd2)
dir Directory to output preprocessed files (will output .nii files)
-s The series to extract (If input file is single-series, use 0 for this argument)

Optional arguments

--pdim [pixeldimensions] Dimensions of pixels, if not provided, these will be extracted from image metadata

This repository contains the full data set for constructing the DAPI template, the full DAPI template creation pipeline and the automatic slice segmentation.

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
Kaufmann,Louis;Center for Translational Neuromedicine, Faculty of Health and Medical Sciences, University of Copenhagen, 2200 Copenhagen, Denmark
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
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