1. Introduction: Sammba-MRI¶
Contents
1.1. What is sammba-MRI: small-mammal neuroimaging with Python¶
Sammba-MRI provides easy-to-use pipelines to process and analyze small mammals brain MRI multimodal images. Sammba-MRI will perform automatically several critical steps for MRI image analysis.
Conversion of Bruker DICOM files to NIFTI-1
Image quality assessment:
° Image registration and creation of a template
° Transformation of individual dataset to the template (or to an atlas)
° Evaluation of regional cerebral atrophy on the basis of an atlas
° Estimation of cerebral perfusion maps from FAIR EPI images
° Resting state fMRI analysis connectivity and brain images visualization are straightforward with nilearn once the registration is performed.
Sammba-MRI integrates functionalities from other packages (listed under the dependencies section below). Examples include (but are not restricted to) mouse models of Alzheimer disease and mouse lemur.
1.2. First: Install dependencies¶
For now, sammba-MRI has been tested only on Linux environment. Install the complete scientific Python distribution Anaconda. It contains all requirements of sammba-MRI. Then, install the version control system Git.
1.2.1. Installing Python packages¶
Sammba-MRI requires a Python environment and the following packages:
- setuptools
- ipython
- Nipype >= 1.0.4
- Nilearn >= 0.4.0
- Numpy >= 1.14
- SciPy >= 0.19
- Nibabel >= 2.0.2
- Sklearn >= 0.19
Our examples require a plotting library: matplotlib >= 1.5.1
If you want to run the tests, you need nose >= 1.2.1 and doctest-ignore-unicode.
If you want to convert DICOM files to NIFTI files, you will need the DICOM ToolKit (DCMTK) package
1.2.2. Installing required neuroimaging software¶
FSL (version 5.0):
Follow the instructions from FSL official installation guide. To be able to run FSL, your system first needs to know where the software is installed. On a Ubuntu system, this is usually under /usr/share/fsl
. Therefore, add the following code to your .bashrc
file. (To open and edit your .bashrc file on Ubuntu, use the following command: gedit ~/.bashrc
):
#FSL
FSLDIR=/usr/share/fsl
. ${FSLDIR}/5.0/etc/fslconf/fsl.sh
PATH=${FSLDIR}/5.0/bin:${PATH}
export FSLDIR PATH
AFNI:
If you have access to Neurodebian, then simply install the AFNI package through Neurodebian. Otherwise, go to AFNI installation page. Then add the following lines of code to your .bashrc
file:
# AFNI
export PATH=/usr/lib/afni/bin:$PATH
ANTs:
To install ANTS, we recommend that you build it from source for your own system. Go to the ANTs section in Michael Notter’s excellent tutorial and follow each step. When the installation is complete, add the following lines to your .bashrc
file
# ANTs
export PATH=/usr/local/antsbin/bin:$PATH
export ANTSPATH=/usr/local/antsbin/bin/
RATS: RATS allows brain extraction.
1.3. Second: Install sammba-MRI¶
Sammba-MRI is available as a development version.The most recent sammba-MRI version is found on Git Run the following command as a shell command (not a Python command):
git clone https://github.com/sammba-mri/sammba-mri.git
A sammba-mri
directory is created. Now, you need to change to this directory and install the package by running (again, as a shell command):
cd sammba-mri
python setup.py install --user
1.4. Third: Run sammba-MRI¶
To check your installation, open IPython by writing “ipython” in the terminal and type in the following line
In [1]: import sammba
If no error occurs, you have installed sammba-MRI correctly.