Perelman School of Medicine at the University of Pennsylvania

Center for Magnetic Resonance & Optical Imaging

QAscripts


Description

QAscripts is a collection of BASH scripts which perform automated image quality checks on BOLD, DTI, and perfusion data sets. The scripts are written in BASH and intended to run in a Linux environment. AFNI and FSL must also be installed. The scripts output to text files using a tab-delimited format suitable for insertion into spreadsheets.

Procedure
  • Run any of the scripts w/o arguments to see the calling syntax.
  • The general syntax of each script is:

<scriptname> [-append] [-keep] <4Dniftifile> [<maskfile>] <resultfile>

  • –keep = do not delete intermediate files
  • –append = append results to <resultfile> (if it exists)
  • <maskfile> = optional 3D brain mask. If not provided one is automatically generated.
Requirements
  • AFNI and FSL must be installed and in your PATH environment.
Installation Instructions
  • Download the .zip file (see Downloading section below).
  • Unzip the files somewhere and add the location to your PATH.
  • In a terminal window, type the QA script name that you want to run.
Documentation

All of the scripts operate on NIFTI format image files for input and output. The input data set is expected to be a 4D (3D + time) NIFTI. The main routines are:

  • qa_pcasl_v1.sh – QA for Arterial Spin Labelled (ASL) data
  • qa_dti_v1.sh – QA for Diffusion Tensor Imaging (DTI) data
  • qa_bold_v1.sh – QA for fMRI (i.e BOLD) data

Several common sub-routine scripts are also included, but they can also be called individually if only certain QA metrics are desired. These include:

  • qa_tsnr_v1.sh – compute the temporal SNR (tSNR) of a 4D NIFTI data set
  • qa_motion_v1.sh – compute absolute and relative motion metrics from a 4D NIFTI

Additional notes:

  • qa_dti_v1.sh requires the <bval> and <bvec> files in the format returned by dcm2nii and as used by FSL.
  • qa_pcasl_v1.sh takes an optional -e <dicomfile> in order to read the Transmit Reference Voltage from the dicom file header.
Download

The QAscripts collection is available for download here in a .zip bundle.

Contact

For comments or questions, send e-mail to:

Mark Elliott at melliott@upenn.edu