Anatomical Preprocessing


The main purpose of this workflow is to process T1 scans. Raw mprage file is deobliqued, reoriented into RPI and skullstripped. Also, a whole brain only mask is generated from the skull stripped image for later use in registration.

anat_preproc : workflow
Anatomical Preprocessing Workflow


Workflow Inputs:

inputspec.anat : mprage file or a list of mprage nifti file 
    User input anatomical(T1) Image, in any of the 8 orientations

Workflow Outputs:

outputspec.refit : nifti file
    Deobliqued anatomical data 
outputspec.reorient : nifti file
    RPI oriented anatomical data 
outputspec.skullstrip : nifti file
    Skull Stripped RPI oriented mprage file with normalized intensities.
outputspec.brain : nifti file
    Skull Stripped RPI Brain Image with original intensity values and not normalized or scaled.

Order of commands:

  • Deobliqing the scans. For details see 3drefit:

    3drefit -deoblique mprage.nii.gz
  • Re-orienting the Image into Right-to-Left Posterior-to-Anterior Inferior-to-Superior (RPI) orientation. For details see 3dresample:

    3dresample -orient RPI -prefix mprage_RPI.nii.gz -inset mprage.nii.gz 
  • SkullStripping the image. For details see 3dSkullStrip:

    3dSkullStrip -input mprage_RPI.nii.gz -o_ply mprage_RPI_3dT.nii.gz
  • The skull stripping step modifies the intensity values. To get back the original intensity values, we do an element wise product of RPI data with step function of skull Stripped data. For details see 3dcalc:

    3dcalc -a mprage_RPI.nii.gz -b mprage_RPI_3dT.nii.gz -expr 'a*step(b)' -prefix mprage_RPI_3dc.nii.gz

High Level Workflow Graph:


Detailed Workflow Graph:

>>> import anat
>>> preproc = create_anat_preproc()
>>> preproc.inputs.inputspec.anat='sub1/anat/mprage.nii.gz'