, Volume 11, Issue 3, pp 291–300 | Cite as

A Graphics Processing Unit Accelerated Motion Correction Algorithm and Modular System for Real-time fMRI

  • Dustin ScheinostEmail author
  • Michelle Hampson
  • Maolin Qiu
  • Jitendra Bhawnani
  • R. Todd Constable
  • Xenophon Papademetris
Original Article


Real-time functional magnetic resonance imaging (rt-fMRI) has recently gained interest as a possible means to facilitate the learning of certain behaviors. However, rt-fMRI is limited by processing speed and available software, and continued development is needed for rt-fMRI to progress further and become feasible for clinical use. In this work, we present an open-source rt-fMRI system for biofeedback powered by a novel Graphics Processing Unit (GPU) accelerated motion correction strategy as part of the BioImage Suite project ( Our system contributes to the development of rt-fMRI by presenting a motion correction algorithm that provides an estimate of motion with essentially no processing delay as well as a modular rt-fMRI system design. Using empirical data from rt-fMRI scans, we assessed the quality of motion correction in this new system. The present algorithm performed comparably to standard (non real-time) offline methods and outperformed other real-time methods based on zero order interpolation of motion parameters. The modular approach to the rt-fMRI system allows the system to be flexible to the experiment and feedback design, a valuable feature for many applications. We illustrate the flexibility of the system by describing several of our ongoing studies. Our hope is that continuing development of open-source rt-fMRI algorithms and software will make this new technology more accessible and adaptable, and will thereby accelerate its application in the clinical and cognitive neurosciences.


Real-time fMRI Motion correction Graphics processing unit Open-source software 



We thank J. Brewer and P. Worhnsky for the development of the front-end used for the current meditation study and for the example feedback shown in Fig. 3a. We also thank E. Finn for her helpful comments on the manuscript. This study was funded by the Dana foundation (M. Hampson) and NIH (R01 EB006494, R03 EB012969, RO1 EB009666, R01 NS051622, R21 MH090384).


  1. Bagarinao, E., Matsuo, K., & Nakai, T. (2003). Real-time functional MRI using a PC cluster. Concepts in Magnetic Resonance Part B: Magnetic Resonance Engineering, 19B, 14–25.CrossRefGoogle Scholar
  2. Caria, A., Sitaram, R., Veit, R., Begliomini, C., & Birbaumer, N. (2010). Volitional control of anterior insula activity modulates the response to aversive stimuli. A real-time functional magnetic resonance imaging study. Biological Psychiatry, 68, 425–432.PubMedCrossRefGoogle Scholar
  3. Caria, A., Sitaram, R., & Birbaumer, N. (2012). Real-Time fMRI: A tool for local brain regulation. Neuroscientist, 18, 487–501.Google Scholar
  4. Christopher deCharms, R. (2008). Applications of real-time fMRI. Nature Reviews Neuroscience, 9, 720–729.PubMedCrossRefGoogle Scholar
  5. Cox, R. W., & Jesmanowicz, A. (1999). Real-time 3D image registration for functional MRI. Magnetic Resonance in Medicine, 42, 1014–1018.PubMedCrossRefGoogle Scholar
  6. Cox, R. W., Jesmanowicz, A., & Hyde, J. S. (1995). Real-time functional magnetic resonance imaging. Magnetic Resonance in Medicine, 33, 230–236.PubMedCrossRefGoogle Scholar
  7. Cusack, R., Veldsman, M., Naci, L., Mitchell, D. J., & Linke, A. C. (2011). Seeing different objects in different ways: Measuring ventral visual tuning to sensory and semantic features with dynamically adaptive imaging. Human Brain Mapping, 33(2):387–397.Google Scholar
  8. deCharms, R. C. (2007). Reading and controlling human brain activation using real-time functional magnetic resonance imaging. Trends in Cognitive Sciences, 11, 473–481.PubMedCrossRefGoogle Scholar
  9. deCharms, R. C., Christoff, K., Glover, G. H., Pauly, J. M., Whitfield, S., & Gabrieli, J. D. E. (2004). Learned regulation of spatially localized brain activation using real-time fMRI. NeuroImage, 21, 436–443.PubMedCrossRefGoogle Scholar
  10. deCharms, R. C., Maeda, F., Glover, G. H., Ludlow, D., Pauly, J. M., & Soneji, D. (2005). Control over brain activation and pain learned by using real-time functional MRI. Proceedings of the National Academy of Sciences of the United States of America, 102, 18626–18631.PubMedCrossRefGoogle Scholar
  11. Eklund, A., Ohlsson, H., Andersson, M., Rydell, J., Ynnerman, A., & Knutsson, H. (2009). Using Real-Time fMRI to Control a Dynamical System by Brain Activity Classification. Medical Image Computing and Computer-Assisted Intervention – MICCAI, 5761, 1000–1008.Google Scholar
  12. Esposito, F., Seifritz, E., Formisano, E., Morrone, R., Scarabino, T., Tedeschi, G., et al. (2003). Real-time independent component analysis of fMRI time-series. NeuroImage, 20, 2209–2224.PubMedCrossRefGoogle Scholar
  13. Gembris, D., Taylor, J. G., Schor, S., Frings, W., Suter, D., & Posse, S. (2000). Functional magnetic resonance imaging in real time (FIRE): sliding-window correlation analysis and reference-vector optimization. Magnetic Resonance in Medicine, 43, 259–268.PubMedCrossRefGoogle Scholar
  14. Goebel, R., Zilverstand, A., & Sorger, B. (2011). Real-time fMRI-based brain computer interfacing for neurofeedback therapy and compensation of lost motor functions. Imaging in Medicine, 2, 407–415.CrossRefGoogle Scholar
  15. Hamilton, J. P., Glover, G. H., Hsu, J.-J., Johnson, R. F., & Gotlib, I. H. (2011). Modulation of subgenual anterior cingulate cortex activity with real-time neurofeedback. Human Brain Mapping, 32, 22–31.PubMedCrossRefGoogle Scholar
  16. Hampson, M., Scheinost, D., Qiu, M., Bhawnani, J., Lacadie, C. M., Leckman, J. F., et al. (2011a). Biofeedback of real-time functional magnetic resonance imaging data from the supplementary motor area reduces functional connectivity to subcortical regions. Brain Connectivity, 1, 91–98.PubMedCrossRefGoogle Scholar
  17. Hampson, M., Stoica, T., Saksa, J., Scheinost, D., Qiu, M., Bhawnani, J., Pittenger, C., Papademetris, X., Constable T. (2012). Real-time fMRI biofeedback targeting the orbi to frontal cortex for contamination anxiety. Journal of Visual Experiments, (59):e3535.Google Scholar
  18. Hinds, O., Ghosh, S., Thompson, T. W., Yoo, J. J., Whitfield-Gabrieli, S., Triantafyllou, C., et al. (2011). Computing moment-to-moment BOLD activation for real-time neurofeedback. NeuroImage, 54, 361–368.PubMedCrossRefGoogle Scholar
  19. Joshi, A., Scheinost, D., Okuda, H., Belhachemi, D., Murphy, I., Staib, L., et al. (2011). Unified framework for development, deployment and robust testing of neuroimaging algorithms. Neuroinformatics, 9, 69–84.PubMedCrossRefGoogle Scholar
  20. LaConte, S. M. (2011). Decoding fMRI brain states in real-time. NeuroImage, 56, 440–454.PubMedCrossRefGoogle Scholar
  21. LaConte, S. M., Peltier, S. J., & Hu, X. P. (2007). Real-time fMRI using brain-state classification. Human Brain Mapping, 28, 1033–1044.PubMedCrossRefGoogle Scholar
  22. Lee, S., Ruiz, S., Caria, A., Veit, R., Birbaumer, N., & Sitaram, R. (2011). Detection of cerebral reorganization induced by real-time fMRI feedback training of insula activation. Neurorehabilitation and Neural Repair, 25, 259–267.PubMedCrossRefGoogle Scholar
  23. Mathiak, K., & Posse, S. (2001). Evaluation of motion and realignment for functional magnetic resonance imaging in real time. Magnetic Resonance in Medicine, 45, 167–171.PubMedCrossRefGoogle Scholar
  24. McCaig, R. G., Dixon, M., Keramatian, K., Liu, I., & Christoff, K. (2011). Improved modulation of rostrolateral prefrontal cortex using real-time fMRI training and meta-cognitive awareness. NeuroImage, 55, 1298–1305.PubMedCrossRefGoogle Scholar
  25. Nakai, T., Bagarinao, E., Matsuo, K., Ohgami, Y., & Kato, C. (2006). Dynamic monitoring of brain activation under visual stimulation using fMRI–The advantage of real-time fMRI with sliding window GLM analysis. Journal of Neuroscience Methods, 157, 158–167.PubMedCrossRefGoogle Scholar
  26. Papademetris, X., Vives, K. P., DiStasio, M., Staib, L. H., Neff, M., Flossman, S. et al. (2006). Development of a research interface for image guided intervention: initial application to epilepsy neurosurgery. Biomedical Imaging: Nano to Macro, 2006. 3rd IEEE International Symposium on, pp. 490–493.Google Scholar
  27. Phan, K. L., Fitzgerald, D. A., Gao, K., Moore, G. J., Tancer, M. E., & Posse, S. (2004). Real-time fMRI of cortico-limbic brain activity during emotional processing. NeuroReport, 15, 527–532.Google Scholar
  28. Posse, S., Binkofski, F., Schneider, F., Gembris, D., Frings, W., Habel, U., et al. (2001). A new approach to measure single-event related brain activity using real-time fMRI: feasibility of sensory, motor, and higher cognitive tasks. Human Brain Mapping, 12, 25–41.PubMedCrossRefGoogle Scholar
  29. Rota, G., Sitaram, R., Veit, R., Erb, M., Weiskopf, N., Dogil, G., et al. (2009). Self-regulation of regional cortical activity using real-time fMRI: the right inferior frontal gyrus and linguistic processing. Human Brain Mapping, 30, 1605–1614.PubMedCrossRefGoogle Scholar
  30. Rota, G., Handjaras, G., Sitaram, R., Birbaumer, N., & Dogil, G. (2011). Reorganization of functional and effective connectivity during real-time fMRI-BCI modulation of prosody processing. Brain and Language, 117, 123–132.PubMedCrossRefGoogle Scholar
  31. Sander, J., & Kandrot, E. (2010). CUDA by Example: An Introduction to General-Purpose GPU Programming. Addison-Wesley Professional.Google Scholar
  32. Shibata, K., Watanabe, T., Sasaki, Y., & Kawato, M. (2011). Perceptual learning incepted by decoded fMRI neurofeedback without stimulus presentation. Science, 334, 1413–1415.PubMedCrossRefGoogle Scholar
  33. Sitaram, R., Lee, S., Ruiz, S., Rana, M., Veit, R., & Birbaumer, N. (2010). Real-time support vector classification and feedback of multiple emotional brain states. NeuroImage, 56, 753–765.PubMedCrossRefGoogle Scholar
  34. Studholme, C., Hill, D. L., & Hawkes, D. J. (1996). Automated 3-D registration of MR and CT images of the head. Medical Image Analysis, 1, 163–175.PubMedCrossRefGoogle Scholar
  35. Thesen, S., Heid, O., Mueller, E., & Schad, L. R. (2000). Prospective acquisition correction for head motion with image-based tracking for real-time fMRI. Magnetic Resonance in Medicine, 44, 457–465.PubMedCrossRefGoogle Scholar
  36. Tokuda, J., Fischer, G. S., Papademetris, X., Yaniv, Z., Ibanez, L., Cheng, P., et al. (2009). OpenIGTLink: an open network protocol for image-guided therapy environment. The International Journal of Medical Robotics and Computer Assisted Surgery, 5, 423–434.CrossRefGoogle Scholar
  37. Voyvodic, J. T. (1999). Real-time fMRI paradigm control, physiology, and behavior combined with near real-time statistical analysis. NeuroImage, 10, 91–106.PubMedCrossRefGoogle Scholar
  38. Weiskopf, N., Mathiak, K., Bock, S. W., Scharnowski, F., Veit, R., Grodd, W., et al. (2004). Principles of a brain-computer interface (BCI) based on real-time functional magnetic resonance imaging (fMRI). Biomedical Engineering, IEEE Transactions on, 51, 966–970.CrossRefGoogle Scholar
  39. Weiskopf, N., Sitaram, R., Josephs, O., Veit, R., Scharnowski, F., Goebel, R., et al. (2007). Real-time functional magnetic resonance imaging: methods and applications. Magnetic Resonance Imaging, 25, 989–1003.PubMedCrossRefGoogle Scholar
  40. Yoo, S.-S., & Jolesz, F. A. (2002). Functional MRI for neurofeedback: feasibility studyon a hand motor task. NeuroReport, 13, 1377–1381.PubMedCrossRefGoogle Scholar
  41. Yoo, S.-S., Fairneny, T., Chen, N.-K., Choo, S.-E., Panych, L. P., Park, H., et al. (2004). Brain-computer interface using fMRI: spatial navigation by thoughts. NeuroReport, 15, 1591–1595.PubMedCrossRefGoogle Scholar
  42. Yoo, S.-S., O’Leary, H. M., Fairneny, T., Chen, N.-K., Panych, L. P., Park, H., et al. (2006). Increasing cortical activity in auditory areas through neurofeedback functional magnetic resonance imaging. NeuroReport, 17, 1273–1278.PubMedCrossRefGoogle Scholar
  43. Zotev, V., Krueger, F., Phillips, R., Alvarez, R. P., Simmons, W. K., Bellgowan, P., et al. (2011). Self-regulation of amygdala activation using real-time fMRI neurofeedback. PLoS One, 6, e24522.PubMedCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  • Dustin Scheinost
    • 1
    • 4
    Email author
  • Michelle Hampson
    • 2
  • Maolin Qiu
    • 2
  • Jitendra Bhawnani
    • 2
  • R. Todd Constable
    • 1
    • 2
    • 3
  • Xenophon Papademetris
    • 1
    • 2
  1. 1.Department of Biomedical EngineeringYale UniversityNew HavenUSA
  2. 2.Department of Diagnostic RadiologyYale UniversityNew HavenUSA
  3. 3.Department of NeurosurgeryYale UniversityNew HavenUSA
  4. 4.Magnetic Resonance Research CenterNew HavenUSA

Personalised recommendations