Signal Processing Toolbox for Simultaneously Acquired fMRI and EEG

Listed in Datasets publication by group Laboratory of Integrated Brain Imaging

By Rodrigo Castellanos1, Zhongming Liu2

1. School of Electrical and Computer Engineering, Purdue University 2. Weldon School of Biomedical Engineering, School of Electrical and Computer Engineering, Purdue University

This Matlab toolbox includes signal processing functions to remove gradient and pulse artifacts in EEG data recorded simultaneously with fMRI. It is distributed as a GUI plugin for EEGLAB.

Additional materials available

Version 1.1 - published on 07 Jun 2016 doi:10.4231/R7DB7ZSC - cite this Archived on 20 Oct 2016

Licensed under GNU General Public License 3.0


EEG signals simultaneously acquired during fMRI are noisy and contain artifacts that primarily arise from MRI gradient switching and cardiac pulsation. This toolbox includes a set of open-source Matlab functions implementing several published algorithms for removing such artifacts from EEG. These functions can be called individually or through a graphic user interface (GUI) compatible with the widely used EEG processing software (EEGLab).

This work is supported by the National Institute of Mental Health through a grant (R01-MH104402) to Dr. Zhongming Liu.

Cite this work

Researchers should cite this work as follows:



Signal Processing Toolbox for Simultaneous fMRI-EEG


     This software is distributed under the terms of the GNU General Public
     License v3, dated 2007/06/29 (see
     Use of this software is at the user's OWN RISK. Functionality is not
     guaranteed by creator nor modifier(s), if any. This software may be freely
     copied and distributed. The original header MUST stay part of the file and
     modifications MUST be reported in the 'MODIFICATION HISTORY'-section,
     including the modification date and the name of the modifier.

    June 12, 2015
    Miguel Rodrigo Castellanos 
    Electrical and Compute Engineering
    Zhongming Liu, PhD
    Assistant Professor of Biomedical Engineering 
    Assistant Professor of Electrical and Computer Engineering

This toolbox can be used in conjunction with EEGLAB software ( to remove
gradient and ballistocardiac artifacts from EEG datasets using a variety of algorithms. The toolbox
comes with a GUI to easily choose the desired settings for artifact removal.


- Use EEGLAB v13.4.4 for optimal performance.

- Place the file "eegplugin_gac_cbc.m" in the plugins folder of your EEGLAB directory in
  order to utilize the toolbox as an eeglab plug-in.

- To initiate the gui as a plug-in, load an EEG dataset using EEGLAB and then click
  GAC-CBC Removal under Tools. Use the "Output Name" option to determine the name 
  of the corrected dataset that will be assigned in the MATLAB workspace.

- Alternatively, load an EEG dataset using EEGLAB and use the command
  OUTEEG = amri_gui_init(EEG);

  where EEG is the uncorrected data and OUTEEG is the corrected output.


If you want to report a bug or need help with troubleshooting issues please contact:

Miguel Rodrigo Castellanos
Zhongming Liu

Laboratory of Integrated Brain Imaging

Laboratory of Integrated Brain Imaging group image

The Purdue University Research Repository (PURR) is a university core research facility provided by the Purdue University Libraries, the Office of the Executive Vice President for Research and Partnerships, and Information Technology at Purdue (ITaP).