Neuroimaging workshop for beginners

Logo

MRI and EEG data analysis in Nilearn, FSL, Nipype, and more

View the Project on GitHub BCCL-IIITH/Workshop_Neuroimaging

Before the workshop: Installations and Data downloading

Hands-on

Installation options at your will

Python 3 via Miniconda

After conda installation, one can create a separate conda environment specific to this workshop, without necessarily disturbing your own research specific installation packaging versions.

conda create -n nimg_workshop python=3.9
conda activate nimg_workshop

Install Python packages

Pip is the most common package installer for Python. This session requires a few additional neuroimaging-specific Python packages that can be installed with:

pip install nibabel nilearn pybids

nilearn and nibabel are for Neuroimaging data loading & handling; pybids for organizing neuroimaging data in proper structure

pip install pandas

pandas is for non-imaging data loading

pip install matplotlib

matplotlib is for visualization

Install dcm2niix

dcm2niix software package for converting neuroimaging data from the DICOM format that is exported from the MRI scanner to the NIfTI format. Detailed installation instructions for various operating systems can be found on the dcm2niix README. With the Anaconda Python distribution which is recommended, dcm2niix can be installed by:

Install MRIcron GUI interface for DICOM to Nifti converter

Alternative to command line execution

MRIcron installation

Install Python Interface

Jupyter notebook

IPython Interpreter

Google Colab No installation as such, just use with Google login

Install FSL for brain templates and fMRI processing

FSL - FMRIB Software Library

Install freesurfer for T1-weighted MR processing

Freesurfer Software Suite

Installing Python Packages from a Jupyter Notebook

After installation, please check the installation

For e.g., Try importing nilearn in a python / iPython session:

import nilearn

If no error is raised, you have installed nilearn correctly.

Similary, check for nibabel pandas, etc.

Download sample DICOM data

You can download the sample data either using internet browser or via command line.

From an internet browser simply navigate to this link and click Download option there.

Command line download option for Linux/MaxOS

wget https://zenodo.org/record/3677090/files/0219191_mystudy-0219-1114.tar.gz

After the download

Navigate to the directory where data is downloaded, then you can unzip and extract files from the tarball (tar archive) using the following command:

tar -xvzf 0219191_mystudy-0219-1114.tar.gz
gzip -d 0219191_mystudy-0219-1114/dcm/*dcm.gz

Data source: A Big Thanks to The Princeton Handbook for Reproducible Neuroimaging¶