Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2015 Jul 1.
Published in final edited form as: Brain Stimul. 2014 Mar 30;7(4):521–524. doi: 10.1016/j.brs.2014.03.009

Clinician accessible tools for GUI computational models of transcranial electrical stimulation: BONSAI and SPHERES

Dennis Q Truong 1, Mathias Hüber 1, Xihe Xie 1, Abhishek Datta 2, Asif Rahman 1, Lucas C Parra 1, Jacek Dmochowski 1, Marom Bikson 1
PMCID: PMC4108562  NIHMSID: NIHMS581061  PMID: 24776786

Abstract

Computational models of brain current flow during Transcranial Electrical Stimulation (tES), including transcranial Direct Current Stimulation (tDCS) and transcranial Alternating Current Stimulation (tACS), are increasingly used to understand and optimize clinical trials. We propose that broad dissemination requires a simple graphic user interface (GUI) software that allows users to explore and design montages in real-time, based on their own clinical/experimental experience and objectives. We introduce two complimentary open-source platforms for this purpose: BONSAI and SPHERES. BONSAI is a web (cloud) based application (available at Neuralengr.com/bonsai) that can be accessed through any flash-supported browser interface. SPHERES (available at Neuralengr.com/spheres) is a stand-alone GUI application that allow consideration of arbitrary montages on a concentric sphere model by leveraging an analytical solution. These open-source tES modeling platforms are designed go be upgraded and enhanced. Trade-offs between open-access approaches that balance ease of access, speed, and flexibility are discussed.

Broad need but limited access to tES (tDCS) computational models

Computational “forward” models predict brain current flow during tDCS (1,2) as well as during other non-invasive transcranial electrical stimulation (tES) techniques (3) such as CES(4), tACS (5). Because the relationship between stimulation dose (defined as those electrode and waveform parameters controlled by the operator;(6)) and resulting brain low is complex and non-intuitive(7), computational forward models underpin how protocols are designed and understood. Though model validation efforts are ongoing (8,9), these models represent a standard to understand brain current flow and optimize tES dose and so inform clinical practice and behavior research on an ongoing basis (1012).

Yet despite increased interest in tES modeling, as supported by the number of tES publications about or including a modeling component (from 82 per year in 2009 when we proposed the first gyri-precise model to >359 per year expected for 2013), access to modeling tools by clinicians remains highly limited. And ironically much of the effort to enhance the relevance of modeling through increases sophistication (complexity;(13)) in fact hinders both reproduction and dissemination. Efforts to automate a modeling “pipeline” still require some engineering/computational proficiency (14,15)). Though several recent effort have compartmentalized the tools needed (16,17).

We propose that broad dissemination requires an intuitive, simple, and stand-alone software. Moreover, the ability to user to explore and design montages in real-time, based on their own clinical/experimental experience and objectives, is critical to develop intuition on dose strategies(18). This is because decision about what dose and related brain current flow pattern is “optimal” will be dependent on the specific study objective and investigator bias on neuromodulation mechanisms (e.g. role of collateral targets). Here we introduce two complimentary open-source platforms for this purpose: SPHERES and BONSAI

Fundamental challenge in dissemination

Any attempt to enhance access for clinicians and behavior researchers to tES modeling must address two fundamental challenges. First and foremost is the myriad of potential montages that can be evaluated (variations in electrode number and for each electrode: waveform, current, size, position, and shape;(6)) compounded by individual variations in current flow for any given montage(3,19). Inevitably, modeling publications on dose design can consider only a very limited selection of montages, and one or a limited set of “representative” head models. Pipeline computational processes accelerate this process but do not remove the underlying problem. Ironically, it is precisely because models illustrate the importance of montage and anatomy, that generic models may be imprecise. Our recent invention leveraging linearity allows for an approach where individual High-Definition electrode activation are pre-solved for a given head model, and then any HD and conventional pad montage (by grouping adjacent electrodes) is instantly predicted by linear summation(20); moreover an optimal montage can be predicated for any given target and orientation (21) without the need for iterative search. None-the-less, these new approaches do not remove the need for extensive computational resource for preprocessing, are individual head specific, and are further limited by assumptions on tissue segmentation and tissue conductivity(22).

The second fundamental challenge relates to representation of brain current flow. Most modeling studies follow the “quasi-uniform” assumption and presume neuromodulation is represented by local tissue current density or electric field(23). Even so, the combination of multiple regions being stimulated (a large fraction of the entire brain for conventional tDCS montages;(24)) compounded by the details of idiosyncratic current flow (changing even with a single gyri (25)) make representation complicated. Even for a given montage and head, the regions and details of interest will vary across investigators. Inevitably, publications cannot with limited figures detail brain current flow in every region of potential interest.

The SPHERES and BONSAI software each address these limitations in a distinct manner while meeting our requirement that modeling tools be instantly and simply accessible. The overall objective is to encourage exploration, and analysis, and optimization of tES dose by the behavioral scientists and clinicians.

SPHERES

SPHERES (available at Neuralengr.com/spheres) is a stand-alone graphical user interface (GUI) application that allow consideration of arbitrary montages on a concentric sphere model by leveraging an analytical solution(26). SPHERES further allows adjustment of “tissue” parameters, namely sphere thickness and conductivity. The technique is rooted in the spherical harmonic expansion of the applied scalp currents and induced electric fields, allowing for a linear systems formulation of the TES forward problem. SPHERES can reproduce and expand on any numerical simulation study on tES.

At a time when increasing complexity often drives modeling efforts, the rationale for concentric sphere simulations should be emphasized. It is precisely because head anatomy is irregular, and indeed highly individual, that sphere modeling provides an initial basis to consider the principles of dose design (1,13,27,28). For example, using spheres the role of inter-electrode distance or CSF conductivity can be considered independent, while in a realistic head multiple confounds from other anatomical factors (e.g. inhomogeneous skull thickness under the electrode, proximity for foramen;(29,30)) cannot be excluded. Spherical models ignore the critical role of tissue inhomogeneity and anatomical detail, especially cortical folding(24,25,31). None-the-less, spherical models are useful to understand what features of dose design and tissue properties are thus valuable tool to both experts and novices.

In regards to the first challenge to dissemination, SPHERES uses a closed-form analytical solution to allow modeling of any arbitrary electrode montage (the “point spread function of the head”; (26)) with little computation (seconds on a conventional PC); moreover, tissue properties, including frequency-specific tissue resistivity, can be readily adjusted. Inter-individual variation can be considered in the abstract sense by individual sphere radius or conductivity (32). In regards to the second challenge of dissemination (for better or for worse), it is straightforward to represent current flow through the spheres precisely because anatomical detail is absent - though quantitative inferences about current spread (focality and deep structures) should be made with caution. The overall result of the SPHERES program is a tool-box that allows infinite variations in dose and analysis by users, specifically for their given application, consistent with the overall objective.

BONSAI

BONSAI is a web (cloud) based application (available at Neuralengr.com/bonsai) that can be accessed through any flash-supported browser interface. Data from any simulation of current flow, regardless of how it was generated, can be uploaded as serial images and then viewed using the BONSAI web interface. Evidently, users cannot consider changes in montage of head models not already included (uploaded) – BONSAI does not support, for example, adjusting the position of an electrode to an arbitrary location. To automatically parse data from commercial FEM solvers to BONSAI scripts may be developed. Regardless of FEM package, solutions can be exported in a text format as a list of nodes and elements with corresponding electric field values. Scripts in software packages like Matlab or Python can be used to interpolate, scale, and export slice images co-registered to the original model MRI. If the data was derived from a given publication, that publication is referenced both providing insight into the given approach and enhancing the impact of the publication. If a suitable approximation of simulation montage is available in BONSAI, it can be used to inform dose design and in subsequent publications.

In regards to the first and second challenge of dissemination BONSAI takes a highly accessible and simple (if “brute force”) approach of simply coalescing individual modeling efforts in indexed images. However, in contrast to dispersed individual publications, 1) BONSAI represents a growing database on montages and approaches that can be compared and contrasted, 2) the methods and results are fully disclosed allowing reproduction and further analysis; 3) and the BONSAI interface allows sharing of more images (cross-sections) than possible in any publication. Though limited in flexibility, the overall result of the BONSAI “library” is a tool-box that encourages analysis and optimization by users for their given application consistent with the overall objective of dissemination.

Figure 1. SPHERES modeling software allows simple and rapid simulation ina concentric spheres head representation (available free at neuralengr.com/spheres).

Figure 1

(1) Head Parameters: Users are able to adjust the tissue thickness for brain, CSF, skull, and scalp with their respective slider in meters, as well as entering the corresponding conductivity values for each tissue. (2) Electrode Parameters: Users are able to select the size of the electrode being used in the drop down menu, and enter the amount of current being applied in mA at the specific positions. Note the anode current positive while the cathode current is negative, the sum of the currents entered in the table should add up to zero. (3) Entering a frequency of stimulation value will automatically change the tissue conductivities to tACS values. To return to tDCS values, the user needs to press “Reset to Default Values” as tDCS is the default option. (4) “Generate Field” button will compute your input values and generate the corresponding figure. The movement of the slider changes how deep you are looking inside the human head. The current depth is displayed in meters. (5) “Export Data” will allow the users to save the data used to generate the current image in a “.mat” file, only usable by matlab. “Export Figure” will directly allow users to save the figure.

Figure 2. BONSAI modeling software allows selection from pre-solved high-resolution MRI-derived models simulations and web-based exploration of current flow (available free at neuralengr.com/bonsai).

Figure 2

Bonsai user interface walkthrough: Click start (1). Select a “Basic Head” or a “Case Study” (2). If a “Basic Head” was selected, now select the electrode configuration. Left click a box under “active electrode” and under “return electrode”, and then click “Load the data now” (3). After loading, a 3-D rendering of the electric field intensity can be rotated left or right by clicking the respective arrows or by clicking and dragging over the image. Information about the electrode configuration and intensity scale are given on the right (4). Alternate views of the data, 2-D slices (5) or a rendering of the segmentation (6), can be selected from the tabs at the top of the window. Under “2-D View” coronal, axial, and sagittal slices of the Electric field intensity are displayed along with their respective MRI slice. The images can be overlaid by clicking the converging arrows between the FEM solution and MRI. Pen/Highlighting tools are available at the top left (5).

Footnotes

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

References

  • 1.Datta A, Elwassif M, Battaglia F, Bikson M. Transcranial current stimulation focality using disc and ring electrode configurations:FEM analysis. J Neural Eng. 2008;5(2):163–74. doi: 10.1088/1741-2560/5/2/007. [DOI] [PubMed] [Google Scholar]
  • 2.Ruffini G, Wendling F, Merlet I, Molaee-Ardekani B, Mekonnen A, Salvador R, et al. Transcranial current brain stimulation (tCS): models and technologies. IEEE Trans Neural Syst Rehabil Eng Publ IEEE Eng Med Biol Soc. 2013 May;21(3):333–45. doi: 10.1109/TNSRE.2012.2200046. [DOI] [PubMed] [Google Scholar]
  • 3.Edwards D, Cortes M, Datta A, Minhas P, Wassermann EM, Bikson M. Physiological and modeling evidence for focal transcranial electrical brain stimulation in humans: A basis for high-definition tDCS. NeuroImage. 2013 Jul 1;74:266–75. doi: 10.1016/j.neuroimage.2013.01.042. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Datta A, Dmochowski JP, Guleyupoglu B, Bikson M, Fregni F. Cranial electrotherapy stimulation and transcranial pulsed current stimulation: a computer based high-resolution modeling study. NeuroImage. 2013 Jan 15;65:280–7. doi: 10.1016/j.neuroimage.2012.09.062. [DOI] [PubMed] [Google Scholar]
  • 5.Manoli Z, Grossman N, Samaras T. Theoretical investigation of transcranial alternating current stimulation using realistic head model. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2012;2012:4156–9. doi: 10.1109/EMBC.2012.6346882. [DOI] [PubMed] [Google Scholar]
  • 6.Peterchev AV, Wagner TA, Miranda PC, Nitsche MA, Paulus W, Lisanby SH, et al. Fundamentals of transcranial electric and magnetic stimulation dose: definition, selection, and reporting practices. Brain Stimul. 2011 Nov 1; doi: 10.1016/j.brs.2011.10.001. Internet. Available from: http://www.ncbi.nlm.nih.gov/pubmed/22305345. [DOI] [PMC free article] [PubMed]
  • 7.Bikson M, Datta A, Rahman A, Scaturro J. Electrode montages for tDCS and weak transcranial electrical stimulation: Role of “return” electrode's position and size. Clin Neurophysiol Off J Int Fed Clin Neurophysiol. 2010 Dec 1;121(12):1976–8. doi: 10.1016/j.clinph.2010.05.020. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Antal A, Bikson M, Datta A, Lafon B, Dechent P, Parra LC, et al. Imaging artifacts induced by electrical stimulation during conventional fMRI of the brain. NeuroImage. 2012 Oct 23; doi: 10.1016/j.neuroimage.2012.10.026. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Datta A, Zhou X, Su Y, Parra LC, Bikson M. Validation of finite element model of transcranial electrical stimulation using scalp potentials: implications for clinical dose. J Neural Eng. 2013 Jun 1;10(3):036018. doi: 10.1088/1741-2560/10/3/036018. [DOI] [PubMed] [Google Scholar]
  • 10.Mendonca ME, Santana MB, Baptista AF, Datta A, Bikson M, Fregni F, et al. Transcranial DC Stimulation in Fibromyalgia: Optimized Cortical Target Supported by High-Resolution Computational Models. J Pain. 2011;12(5):610–7. doi: 10.1016/j.jpain.2010.12.015. [DOI] [PubMed] [Google Scholar]
  • 11.Bikson M, Rahman A, Datta A. Computational models of transcranial direct current stimulation. Clin EEG Neurosci Off J EEG Clin Neurosci Soc ENCS. 2012 Jul;43(3):176–83. doi: 10.1177/1550059412445138. [DOI] [PubMed] [Google Scholar]
  • 12.Bai S, Loo C, Dokos S. A review of computational models of transcranial electrical stimulation. Crit Rev Biomed Eng. 2013;41(1):21–35. doi: 10.1615/critrevbiomedeng.2013007163. [DOI] [PubMed] [Google Scholar]
  • 13.Bikson M, Datta A. Guidelines for precise and accurate computational models of tDCS. Brain Stimulat. 2012 Jul;5(3):430–1. doi: 10.1016/j.brs.2011.06.001. [DOI] [PubMed] [Google Scholar]
  • 14.Dannhauer M, Brooks D, Tucker D, MacLeod R. A pipeline for the simulation of transcranial direct current stimulation for realistic human head models using SCIRun/BioMesh3D. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2012;2012:5486–9. doi: 10.1109/EMBC.2012.6347236. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Huang Y, Su Y, Rorden C, Dmochowski JP, Datta A, Parra LC. An Automated Method for High-Definition Transcranial Direct Current Stimulation Modeling. 34th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. 2012:5376–9. doi: 10.1109/EMBC.2012.6347209. 2012 EMBS'12. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Jung YJ, Kim JH, Im CH. COMETS: A MATLAB toolbox for simulating local electric fields generated by transcranial direct current stimulation (tDCS) Biomed Eng Lett. 2013 Mar 1;3(1):39–46. [Google Scholar]
  • 17.Windhoff M, Opitz A, Thielscher A. Electric field calculations in brain stimulation based on finite elements: an optimized processing pipeline for the generation and usage of accurate individual head models. Hum Brain Mapp. 2013 Apr;34(4):923–35. doi: 10.1002/hbm.21479. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.de Berker AO, Bikson M, Bestmann S. Predicting the behavioral impact of transcranial direct current stimulation: issues and limitations. Front Hum Neurosci. 2013;7:613. doi: 10.3389/fnhum.2013.00613. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Datta A, Truong D, Minhas P, Parra LC, Bikson M. Inter-Individual Variation during Transcranial Direct Current Stimulation and Normalization of Dose Using MRI-Derived Computational Models. Front Psychiatry Front Res Found. 2012;3:91. doi: 10.3389/fpsyt.2012.00091. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Dmochowski JP, Datta A, Bikson M, Su Y, Parra LC. Optimized multi-electrode stimulation increases focality and intensity at target. J Neural Eng. 2011 Aug 1;8(4):046011. doi: 10.1088/1741-2560/8/4/046011. [DOI] [PubMed] [Google Scholar]
  • 21.Dmochowski JP, Bikson M, Datta A, Richardson J, Fridriksson J, Parra LC. On the role of electric field orientation in optimal design of transcranial current stimulation. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2012;2012:6426–9. doi: 10.1109/EMBC.2012.6347465. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Salvador R, Ramirez F, V'yacheslavovna M, Miranda PC. Effects of tissue dielectric properties on the electric field induced in tDCS: a sensitivity analysis. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2012;2012:787–90. doi: 10.1109/EMBC.2012.6346049. [DOI] [PubMed] [Google Scholar]
  • 23.Bikson M, Dmochowski J, Rahman A. The “quasi-uniform” assumption in animal and computational models of non-invasive electrical stimulation. Brain Stimulat. 2013 Jul;6(4):704–5. doi: 10.1016/j.brs.2012.11.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Datta A, Bansal V, Diaz J, Patel J, Reato D, Bikson M. Gyri-precise head model of transcranial direct current stimulation: improved spatial focality using a ring electrode versus conventional rectangular pad. Brain Stimulat. 2009 Oct;2(4):201–207. 207.e1. doi: 10.1016/j.brs.2009.03.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Rahman A, Reato D, Arlotti M, Gasca F, Datta A, Parra LC, et al. Cellular effects of acute direct current stimulation: somatic and synaptic terminal effects. J Physiol. 2013 May 15;591(Pt 10):2563–78. doi: 10.1113/jphysiol.2012.247171. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Dmochowski JP, Bikson M, Parra LC. The point spread function of the human head and its implications for transcranial current stimulation. Phys Med Biol. 2012 Oct 21;57(20):6459–77. doi: 10.1088/0031-9155/57/20/6459. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Miranda PC, Faria P, Hallett M. What does the ratio of injected current to electrode area tell us about current density in the brain during tDCS? Clin Neurophysiol. 2009;120(6):1183–7. doi: 10.1016/j.clinph.2009.03.023. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Faria P, Leal A, Miranda PC. Comparing different electrode configurations using the 10-10 international system in tDCS: a finite element model analysis. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2009;2009:1596–9. doi: 10.1109/IEMBS.2009.5334121. [DOI] [PubMed] [Google Scholar]
  • 29.Mekonnen A, Salvador R, Ruffini G, Miranda PC. The relationship between transcranial current stimulation electrode montages and the effect of the skull orbital openings. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2012;2012:831–4. doi: 10.1109/EMBC.2012.6346060. [DOI] [PubMed] [Google Scholar]
  • 30.Suh HS, Lee WH, Kim TS. Influence of anisotropic conductivity in the skull and white matter on transcranial direct current stimulation via an anatomically realistic finite element head model. Phys Med Biol. 2012 Nov 7;57(21):6961–80. doi: 10.1088/0031-9155/57/21/6961. [DOI] [PubMed] [Google Scholar]
  • 31.Salvador R, Mekonnen A, Ruffini G, Miranda PC. Modeling the electric field induced in a high resolution head model during transcranial current stimulation. Conf Proc IEEE Eng Med Biol Soc. 2010;2010:2073–6. doi: 10.1109/IEMBS.2010.5626315. [DOI] [PubMed] [Google Scholar]
  • 32.Deng ZD, Lisanby SH, Peterchev AV. Effect of anatomical variability on neural stimulation strength and focality in electroconvulsive therapy (ECT) and magnetic seizure therapy (MST) Conf Proc Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Conf. 2009;2009:682–8. doi: 10.1109/IEMBS.2009.5334091. [DOI] [PubMed] [Google Scholar]

RESOURCES