Skip to content

Jfortin1/MNITemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNITemplate

The goal of MNITemplate is to provide the MNI Template of T1-weighted MRI imaging from http://www.bic.mni.mcgill.ca/ServicesAtlases/ICBM152NLin2009. In addition to the standard template, the image has been segmented into gray matter, white matter, and cerebrospinal fluid (’CSF’) using the ‘FAST’ algorithm from ‘FSL’ https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST..

For a template with a full white-matter parcellation map, see our EveTemplate package.


Creator: Jean-Philippe Fortin, fortin946@gmail.com

Authors and Maintainers: Jean-Philippe Fortin, John Muschelli

Software status
Resource: Travis CI
Platform: Linux
R CMD check Build status

Table of content

1. Introduction

The MNI152 template that is included with FSL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases

2. Reading the data into R

We first load the package into R:

library(MNITemplate)

Once the package is loaded into R, use the command readMNI() to import the MNI template T1-w image as a nifti object into R:

mni_t1 <- readMNI()

One can use the function orthographic from the oro.nifti package to visualize the template:

orthographic(mni_t1)

In many preprocessing pipelines, the path of the template file in the system must be specified. For this, use the following:

mni_path <- getMNIPath()

and to get brain mask:

mni_brain_mask_path <- getMNIPath("Brain_Mask")

3. Segmentation

We performed a 3-tissue class segmentation of the T1w MNI template using the FSL FAST segmentation algorithm via the fslr package. The script that was used to perform the segmentation can be found here. The segmentation labels are 0 for Background (outside of the brain), 1 for cerebrospinal fluid (CSF), 2 for grey matter (GM) and 3 for white matter (WM). Let's read the segmentation classes into R:

seg <- readMNISeg()
orthographic(seg)

If one wishes to create a WM mask, could do the following:

wm_mask <- seg
wm_mask[wm_mask!=3] <- 0

and similarly for the other tissues.

3. Files

File Description Reader
MNI152_TI_1mm.nii.gz T1-w MNI Template, 1mm readMNI("T1")
MNI152_TI_1mm_Brain.nii.gz T1-w MNI Template, 1mm, skull stripped readMNI("Brain")
MNI152_TI_1mm_Brain_Mask.nii.gz T1-w MNI Template, 1mm, brain mask readMNI("Brain_Mask")
MNI152_TI_2mm.nii.gz T1-w MNI Template, 2mm readMNI("T1", res="2mm")
MNI152_TI_2mm_Brain.nii.gz T1-w MNI Template, 2mm, skull stripped readMNI("Brain", res="2mm")
MNI152_TI_2mm_Brain_Mask.nii.gz T1-w MNI Template, 2mm, brain mask readMNI("Brain_Mask", res="2mm")
Tissue Segmentation:
MNI152_TI_1mm_Brain_FAST_seg.nii.gz FSL FAST tissue classes (1=CSF, 2=GM, 3=WM) for 1mm res readMNISeg()
MNI152_TI_2mm_Brain_FAST_seg.nii.gz FSL FAST tissue classes (1=CSF, 2=GM, 3=WM) for 2mm res readMNISeg(res="2mm")