The impact of large structural brain changes in chronic stroke patients on the electric field caused by transcranial brain stimulation

Transcranial magnetic stimulation (TMS) and transcranial direct current stimulation (TDCS) are two types of non-invasive transcranial brain stimulation (TBS). They are useful tools for stroke research and may be potential adjunct therapies for functional recovery. However, stroke often causes large cerebral lesions, which are commonly accompanied by a secondary enlargement of the ventricles and atrophy. These structural alterations substantially change the conductivity distribution inside the head, which may have potentially important consequences for both brain stimulation methods. We therefore aimed to characterize the impact of these changes on the spatial distribution of the electric field generated by both TBS methods. In addition to confirming the safety of TBS in the presence of large stroke-related structural changes, our aim was to clarify whether targeted stimulation is still possible. Realistic head models containing large cortical and subcortical stroke lesions in the right parietal cortex were created using MR images of two patients. For TMS, the electric field of a double coil was simulated using the finite-element method. Systematic variations of the coil position relative to the lesion were tested. For TDCS, the finite-element method was used to simulate a standard approach with two electrode pads, and the position of one electrode was systematically varied. For both TMS and TDCS, the lesion caused electric field “hot spots” in the cortex. However, these maxima were not substantially stronger than those seen in a healthy control. The electric field pattern induced by TMS was not substantially changed by the lesions. However, the average field strength generated by TDCS was substantially decreased. This effect occurred for both head models and even when both electrodes were distant to the lesion, caused by increased current shunting through the lesion and enlarged ventricles. Judging from the similar peak field strengths compared to the healthy control, both TBS methods are safe in patients with large brain lesions (in practice, however, additional factors such as potentially lowered thresholds for seizure-induction have to be considered). Focused stimulation by TMS seems to be possible, but standard tDCS protocols appear to be less efficient than they are in healthy subjects, strongly suggesting that tDCS studies in this population might benefit from individualized treatment planning based on realistic field calculations.


Introduction
Transcranial brain stimulation (TBS) methods are useful tools to induce and to quantify neural plasticity, and as such are increasingly being used in stroke research and as potential adjunct therapies in stroke rehabilitation. The cerebral lesions caused by stroke result in persisting physical or cognitive impairments in around 50% of all survivors (Di Carlo, 2008;Leys et al., 2005;Young and Forster, 2007), meaning that new therapies are urgently needed. Transcranial magnetic stimulation (TMS) and transcranial direct current stimulation (TDCS) are two TBS approaches which are being increasingly utilised in stroke research. Single-pulse TMS combined with electromyography (EMG) or electroencephalography (EEG) can be used to assess cortical excitability, for example to index the functional state of the perilesional tissue. The neuromodulatory effects of repetitive TMS protocols (rTMS) may, in association with neuro-rehabilitative treatments, enhance motor recovery (Liew et al., 2014). Similar results have been demonstrated for TDCS. For example, anodal TDCS of the hand area in the primary motor cortex has been shown to improve motor performance of the affected hand (Allman et al., 2016;Hummel et al., 2005;Stagg et al., 2012) and anodal TDCS applied over the left frontal cortex enhanced naming accuracy in patients with aphasia (Baker et al., 2010). However, not all studies report a clear-cut positive impact of TBS on the stroke symptoms. Rather, the observed effects are often weak and not consistent across patients, demonstrating the need for a better understanding of the underlying biophysical and physiological mechanisms.
Compared with healthy subjects, several factors might contribute to a change in the neuroplastic response to TBS protocols in stroke patients, including changes in the neural responsiveness to the applied electric fields, as well as differences in the underlying physiology and metabolism (Blicher et al., 2009;Blicher et al., 2015;O'Shea et al., 2014). When the lesions are large, they may also substantially alter the generated electric field pattern, meaning that the assumptions on spatial targeting as derived from biophysical modelling and physiological experiments in healthy subjects might no longer be valid. Stroke lesions are often accompanied by secondary macrostructural changes such as cortical atrophy and enlargement of the ventricles (e.g., Skriver et al., 1990), which may further contribute to changes in the field pattern. In addition, the safety of TBS in patients with large lesions needs to be further clarified, as it is possible that the lesions might cause stimulation "hot spots". In chronic patients, the stroke cavity becomes filled with corticospinal fluid (CSF), which might cause shunting of current, funnelling the generated currents towards the surrounding brain tissue and potentially causing localized areas of dangerously high Fig. 1. A) Coronal view of patient P01 with a cortical lesion in the right hemisphere. The top shows the T1-weighted MR image and the bottom the reconstructed head mesh. The view was chosen to include the lesion centre. The lesion is marked by red dashed circles. B) Corresponding view of patient P02 with a large subcortical lesion at a similar location in the right hemisphere. C) Corresponding view of the data set of the healthy control. D) The coil and electrode positions were systematically moved along two directions that were approximately perpendicular to each other. Five positions were manually placed every 2 cm in posterioranterior direction symmetrically around the centre of the cortical lesion. The same was repeated along the lateralmedial direction. Both lines share the same centre position above the lesion, resulting in 9 positions in total. E) At each position, two coil orientations were tested which resulted in a current flow underneath the coil centre from anterior to posterior (top) and from lateral to medial, respectively (bottom). F) For each position of the yellow "stimulating" electrode, two positions of the blue return electrode were tested. First, the contralateral equivalent of the electrode position above the centre of the cortical lesion was used (top). In addition, a position on the contralateral forehead was tested (bottom). field strengths.
Here, using finite-element calculations and individual head models derived from structural MR images, we focused on the impact of a large cortical lesion in chronic stroke on the electric field pattern generated in the brain by TMS and TDCS, respectively. Firstly, we assessed the safety of the stimulation by comparing the achieved field strengths with those estimated for a healthy control. Secondly, we tested how reliably we can accurately target the perilesional tissue, often the desired target for TBS, as reorganisation here is thought to underpin functional recovery (Kwakkel et al., 2004). Finally, we were also interested to see whether any observed changes in the field pattern were specific to a patient with a cortical lesion (which is connected to the CSF layer underneath the skull), or whether similar effects might occur in case of large chronic subcortical lesion. We therefore additionally tested the field distribution in a head model of a patient with a subcortical lesion occurring at a similar position as the cortical lesion.

Selection of patients
The aim of this study was to characterize the effect of a large chronic cortical stroke lesion on the electric field distribution generated by TBS, and to compare the effects of this lesion to that caused by a large chronic subcortical lesion. MR images of several patients were visually inspected to select two datasets, which had a cortical [P01] and subcortical lesion [P02], respectively, within the same gross anatomical regions.
Patient P01 was a 36 year old female with episodic migraine; she was admitted with left hemiparalysis, fascial palsy and a total NIHSS score of 16 due to a right ICI/MCI occlusion. She was treated with IV thrombolysis and thrombectomy and recanalization was achieved 5 h after symptom onset. One year post-stroke she still suffered from motor impairment (Wolf Motor Function Test [WMFT] score of 30) and was scanned as part of a clinical study investigating the effect of combining Constraint-Induced Movement Therapy and tDCS (Figlewski et al., 2017; Clinical trials NCT01983319, Regional Ethics approval: 1-10-72-268-13). The structural scans showed a cortical lesion in the right parietal lobe (Fig. 1A). The lesion volume, delineated manually with reference to T1-and T2-weighted imaging, was 26,415 mm 3 .
Patient P02 was a 44 year old female. She woke up with a left hemiparesis and an acute CT scan showed no bleeding. No IV thrombolysis was given due to uncertain timing of symptom onset. An embolic stroke was suspect due to a patent foramen ovale, which was subsequently closed. She was scanned with MRI 9 months post stroke showing a right subcortical infarct, at which time she had a WMFT score of 8. The lesion volume, delineated as for P01, was 56,010 mm 3 . She was scanned as part of a clinical study investigating the effect of combining tDCS with daily motor training (Allman et al., 2016; Regional Ethics approval: Oxfordshire REC A; 10/H0604/98).
The left hemispheres appeared to be unaffected in both patients. In the patient with the subcortical lesion [P02], visual inspection of structural scans indicated that the cortical structures were mostly spared by the lesion.
An existing head model of a 26 year old, right handed female was used as healthy control (Opitz et al., 2015), based on T1-and T2weighted MR images collected on a Siemens 3 T TIM Trio scanner at the MPI for Biological Cybernetics (Tübingen, Germany). Please refer to (Opitz et al., 2015) for the MR sequence details. Fig. 1C (upper row) shows a coronal slice of the T1-weighted MRI at a similar parietal position as for the patient MRIs.

Head modelling
For all three subjects, tetrahedral head models were created using a modified version of SimNIBS (Simulation of Non-Invasive Brain Stimulation; Thielscher et al., 2015;Windhoff et al., 2013; lower rows of Fig. 1A-C). The meshes consisted of eight tissue types, namely brain white matter (WM), brain grey matter (GM), cerebro-spinal fluid (CSF), compact bone of the skull, spongy bone, the vitreous bodies of the eyes, the surrounding eye regions and skin. In addition, the paranasal sinuses were modelled as air cavities. A more detailed description of the meshing process can be found in (Opitz et al., 2015). SimNIBS obtains surface reconstructions of brain grey and white matter using FreeSurfer (Dale et al., 1999). As FreeSurfer is not designed to cope with cerebral lesions, manual editing of the patient data sets was performed to achieve a good anatomical accuracy of the surfaces (see https://surfer. nmr.mgh.harvard.edu/fswiki/Edits). The surfaces of the skin, the bone layers, CSF, the eyes and the paranasal sinuses were created in a semiautomatic way: First, volume segmentations were obtained using FSL tools (Functional MRI of the Brain Software Library; Jenkinson et al., 2012) which were manually corrected if required and then used to reconstruct the surfaces. The anatomical accuracy of the final segmentations was confirmed by careful visual control against the highresolution T1-weighted MR images, which were of similarly high quality for all three datasets. Axial slices through the T1-weighted images and the final segmentations are shown in Figs. S1 and S2. The surface resolution near the TDCS electrodes was enhanced to ensure a good mesh quality when modelling the electrodes. Before final volume meshing, all surfaces underwent cleaning steps to ensure a good triangle quality. In addition, they were rescaled in order to rule out that general differences in the head size caused differences in the electric field patterns. After rescaling, the distances between nasion and inion as well as between left ear and right ear were 17.6 cm and 14.5 cm, respectively, for all three head models. The final volume meshes consisted of around 615,000 nodes and 3.4 million tetrahedra. The latter had an average volume of 0.86 mm 3 . The quality of the tetrahedra was similar for all three meshes. As control, the "gamma" parameter based on the ratio between inscribed and circumscribed radii was used as quality measure and compared (as listed in Table II of Windhoff et al., 2013). Gamma ranges between 0 (very low tetrahedral quality) and 1 (perfect quality). The average gamma parameter was 0.62 (P01), 0.62 (P02) and 0.61 (healthy control). Gamma values < 0.1 occurred for 0.0036% (P01), 0.0066% (P02) and 0.0263% (healthy control) of the tetrahedra, and thus occurred at the same low frequency as originally reported in (Windhoff et al., 2013).

Electric field calculations
The electric fields were calculated assuming a quasi-static regime (Opitz et al., 2015;Thielscher et al., 2011). For TMS, the equation was solved, with E being the electric field vector and φ denoting the electric potential. The time derivative of the magnetic vector potential A of the chosen TMS coil was given as input to the FEM calculations. For TDCS, the equation was solved, applying Dirichlet boundary conditions at the electrodes. The FEM solver applied the Galerkin method based on tetrahedral first order elements to determine φ at the nodes. The residuals for the conjugate gradient solver were required to be < 10 − 9 . The electric fields and current densities were then determined in each mesh element by numerical differentiation of φ and applying the above equations. One simulation took around 6 min and used a maximum of~4GB memory. The conductivities of all tissues including WM were taken as isotropic, as high-quality diffusion MRI data was not available for the patients that could have been used for estimation of the conductivity anisotropy.  . For TMS, a Magstim 70 mm figure-of-eight coil was simulated and its magnetic vector potential was determined by means of a superposition of magnetic dipole fields ( Fig. 1E; Thielscher and Kammer, 2004). For calculating the time derivative of the vector potential ∂A ∂t as input to the FEM calculations, the rate of change of the coil current (dI/ dt) was set to 1 A/μs. The choice of this rate of change was arbitrary. Stimulation intensities during TMS are usually determined relative to the individual motor threshold. This precluded the selection of a single, fixed rate of change for the simulations, which matched those used in the practical applications (in contrast to TDCS, where "standard" current strengths such as 1 mA are mostly used). However, as this study focused on the relative comparison of the fields induced in the patients versus the healthy control, the choice for the rate of change did not affect the results. The distance between coil and scalp was set to be 3 mm and the coil was automatically determined to be tangential to the local scalp orientation underneath the coil centre.
For TDCS, two circular electrodes were modelled with a diameter of 30 mm and a thickness of 5 mm (Fig. 1F). The electrodes were automatically meshed on top of the scalp surface of the head model (see Saturnino et al., 2015 for details). We used a circular electrode shape to prevent influences of the electrode orientation on the electric field distribution. The relatively small electrode area of~7 cm 2 was chosen with the goal of increasing the sensitivity of the simulations to systematic changes of the position of the stimulation electrode (for details, please see next paragraph). In particular, the electrode area was chosen to be in the range of the cortical lesion of P01. In order to rule out that the choice of the electrode size biased our findings, additional simulations of rectangular sponge electrodes (5 × 7 cm 2 ) were performed (Supplementary Figs. S3 & S4). For the FEM calculations, the upper surfaces of the electrodes were set to common electric potentials (1 and − 1 V for the anode and cathode, respectively). After calculation of φ, the current passing through the electrode-scalp interface was determined by numerical integration of the current density and used to rescale the solution to match a value of 1 mA.

Coil and electrode positions
Our goal was to investigate changes in the electric field distribution when systematically changing the coil and electrode positions relative to the lesion site. Patient head model P01 was taken as reference and several positions were defined relative to the lesion centre (Fig. 1D). Two lines of positions were defined, one arranged from posterior to anterior (upper image of Fig. 1D) and the second from medial to lateral (lower image of Fig. 1D). Both lines share the same central position directly above the lesion, resulting in a total of 9 stimulation positions. Each position had a distance of about 2 cm to the next point. The positions tested for patient P02 and the healthy control were matched as close as possible to those defined for patient P01, and were thus also set relative to the lesion centre of patient P01. The chosen positions were manually transferred by matching the underlying cortical areas. Specifically, the positions were projected onto the cortical reconstruction of P01 and the same anatomical position was then manually chosen in the other subjects and projected back on the head surfaces. To increase the accuracy of this procedure, the positions were additionally mirrored to the hemisphere contralateral to the cortical lesion so that the underlying anatomical structures could be unambiguously determined. In particular, this was necessary for the position above the lesion centre. For TMS, all positions were tested with two different orientations of the stimulation coil, offset by 90° (Fig. 1E) in order to rule out that the results were biased by the choice of a particular orientation. For TDCS, all simulations were repeated for two different positions of the return electrode ( Fig. 1F), again to test the robustness of the findings. Specifically, the contralateral supraorbital region was chosen for the return electrode, as often used in TDCS experiments, as well as the contralateral motor cortex.

Data analysis
We then tested whether systematic differences existed between the electric field patterns generated in the patients compared to the healthy subject. As it is generally assumed that both TBS methods stimulate grey matter (Bindman et al., 1964;Thielscher et al., 2011), the analyses were focused on the electric field generated in this tissue type.
• For TMS, the 99th percentile of the field strength in overall grey matter was determined. Strong increases in the peak field strengths observed in the patient head models would suggest that the maximally used stimulation intensities might require adaptations in stroke patients. For completeness, we also calculated the peak field strengths, which correspond to stimulation at 100% resting motor threshold (rMT) with the optimal coil orientation. These field strengths were obtained by rescaling the original results obtained for a dI/dt of 1 A/μs. The combination of the Magstim 70 mm coil and the Magstim 200 stimulator reaches a dI/dt of 171 A/μs at maximal stimulator output (MSO; Thielscher and Kammer, 2002), and has a rMT of 39.3% MSO (Kammer et al., 2001). This results in a dI/dt of 67.0 A/μs at rMT, which was used as multiplicative factor for rescaling. The Magstim 70 mm coil and the Magstim Rapid stimulator reach a dI/dt of 102 A/μs at MSO (using Eq. (1) from Thielscher and Kammer, 2002 with: capacitance 185 μF, energy 252, inductance 16.35 μH), and have an rMT of 50.3% MSO (Kammer et al., 2001). This results in a dI/dt of 50.8 A/μs at rMT.
• It is usually assumed that stimulation takes places preferentially underneath the centre of a figure-of-eight coil. In order to test whether this assumption is still reasonable for patient with large lesions, the centre of gravity (CoG) of the grey matter volume in which the field strength exceeded the 99th percentile was calculated. Subsequently, the shortest distance of the CoG to a line through the coil centre and perpendicular to the coil plane was determined. This value was not assessed for the central position, as in this case the average distance between the coil centre and brain tissue was too high for head model P01 to give useful results.
• The falloff of the field strength with increasing stimulation depth was determined. For each coil position, the field strength was read out in a cylinder of 30 mm diameter and oriented perpendicular to the local skin orientation. The cylinder was centred underneath the coil centre and divided into 20 segments of 5 mm height, so that an overall depth of 100 mm was tested, with the starting point being the skin surface (having a depth of 0 mm). For most coil positions, the first grey matter tetrahedra occurred in the segments centred at a depth of 10 mm (encompassing distances to the skin surface from 7.5 mm to 12.5 mm). Within each cylinder segment, the average field strength in grey matter was determined. As the segments directly underneath the skin surface did not contain grey matter, this resulted in 17-19 segments with data.
• As a further measure, the "affected" grey matter volume in which the field strength exceeded a certain fixed threshold was calculated. An arbitrary threshold of 1.3 V/m was used, which was slightly less than the minimal peak value across all coil positions and subjects (i.e., the volume approached zero for coil positions which induced weaker fields relative to the other tested positions). That is, the value was chosen to be able to depict clearly the differences between positions and subjects. It corresponds roughly to the volume in which the field strength exceeded 82% of the peak field strength of the healthy control. For motor cortex stimulation, this would relate to the area stimulated at around 120% of the motor threshold, under the simplified assumption that stimulation at 100% motor threshold excites a point-like cortical area. Of notice, changing it led to qualitatively similar results.
• For TDCS, similar measures were applied to allow relating the results to those obtained for TMS. Given that TDCS does not necessarily stimulate most strongly underneath the electrode centres, the relation of the positions with peak field strengths to the centres was NOT assessed. In addition, as TDCS is less focal than TMS, the diameter of the cylinders was increased to 80 mm when determining the depth profiles while keeping all other parameters constant. That is, the cylinders were centred under the stimulation electrode, and the average field in grey matter was read out in successive cylinder segments of 5 mm height. For comparison of the grey matter volume, the threshold was set to 0.15 V/m. Again, this value was arbitrarily determined such that the electrode positions causing the weakest stimulation resulted in a volume of only slightly above 0. The reported grey matter volumes correspond roughly to the volumes in which the field exceeded 80% of the peak values seen in the healthy control.
All simulation results were first visually checked in order to look for localized field peaks or minima that might have went unnoticed when considering only the above summary measures. In addition, the summary measures were compared across all coil (or electrode) positions for each single head model. This was done to check whether one position behaved distinctly differently to the remaining ones. Finally, when appropriate, averages of the measures were calculated to simplify the presentation of the results and comparison across head models. More details can be found in the corresponding Results sections. In order to rule out that results were influenced by general differences of the thicknesses of skin, skull or CSF across head models, these values were assessed at the centres of all stimulation positions for comparison.
When appropriate, two-way ANOVAs with factors "subject" and "position" were performed, followed by post-hoc t-tests (controlled for multiple comparisons via Tukey's HSD) to assess whether the results obtained for the head models of the patients differed significantly from those of the healthy control. The statistics toolbox of Matlab R2016A (MathWorks, Inc.) was used.

Electric fields induced by TMS
The peak electric field strengths were similar in the head models of the patients compared to the healthy control (Table 1, first to third lines). For the healthy control, the centre of the region with peak field strengths was displaced by 3.5 mm from a position directly underneath the coil centre (Table 1, fourth line). This displacement was moderately enhanced for the patient head models, indicating that the "spatial resolution" of TMS can be lower in stroke patients. A less dense "packing" of the gyri in the patient head models might be the underlying reason, as further outlined below.
In patient P01, the field distribution induced by TMS exhibits a similar decay with depth as in the healthy control. Interestingly, this is the case for all coil positions. For illustration, the positions are pooled according to their distance to the lesion centre ( Fig. 2A). Neither the absolute field strength nor the decay with depth appears to be markedly influenced by the lesion. Still, closer visual inspection of the field distribution rendered on the reconstructed grey matter revealed some positions where the field was locally increased, likely as a result of the pathology. Fig. 2C depicts an example in which the coil is positioned centrally above the lesion (indicated by the green dots) and coil orientation is in anterior-posterior direction. The gyrus position highlighted by the red arrow is neighboured by wide CSF regions on both sides and angled approximately perpendicular to the current flowing in anterior-posterior direction, resulting in a high local electric field strength despite being distant to the coil centre (see Thielscher et al., 2011 for a further discussion of this effect). Similar results were obtained for patient P02. Fig. 2B shows the decay with depth of the field strength pooled across all coil positions, which is again closely resembles the decay observed for the healthy control.
One would intuitively assume that the affected grey matter volume depends on the distance to the lesion centre in a systematic way, with the affected volume being lowest when the coil is positioned directly above the lesion centre and highest for positions being distant to the lesion site. This U-shaped dependency can indeed be qualitatively observed in both P01 and P02 (blue and green bars in Fig. 3A & B). However, it is interesting to note that the overall amount by which the affected volume varies with coil position is just as large as observed for the healthy subject. As example, Fig. 3B shows the detailed results for variation of the coil positions from posterior to anterior with the coil orientation pointing from anterior to posterior. In addition, the expected U-shaped dependency is not observed when moving the coil from lateral to medial (detailed results not shown), suggesting the influence of additional anatomical factors on the affected volume. Except for the coil position directly above the cortical lesion, the skincortex distance is largely similar across positions (as indicated by the Table 1 Peak field strengths (99th percentiles ± SD) in cortical grey matter for TMS and TDCS. Similar or slightly lower peak values are reached in the patient head models compared to the healthy control. For TMS, the peak field strengths for the arbitrarily chosen threshold of dI/dt = 1 A/μs is reported, in addition to the corresponding field strengths which would be reached at 100% rMT when stimulating with Magstim 200 (monophasic) and Magstim Rapid (biphasic) stimulators. Also for TMS, the centre of gravity (CoG) of the grey matter volume experiencing the peak field strengths was determined, and the distance of the CoG to a line through the coil centre and perpendicular to the coil plane determined (reported as "TMS distance to centre"). The distance is higher for the patient P01 compared to the healthy control (unpaired t-tests, thresholded at p < 0.05, asterisk: Bonferroni-corrected for 2 comparisons per line, plus: uncorrected trend). low SD values for SCD as listed in Table 2) and thus cannot be the cause of the observed results. Instead, closer visual inspection of the results for the healthy control suggested the existence of two additional factors: First, the local curvature of the brain surface underneath the coil centre might systematically bias the affected volume. It seems that a larger amount of cortex is close to the coil centre for a flat (Fig. 4A: most anterior coil position in the healthy control with coil orientation anterior-posterior) compared to a more curved brain surface (Fig. 4B: most posterior coil position), resulting in a larger affected volume (rightmost vs. leftmost red bars in Fig. 3B). Second, the "packing" of the gyri can be less dense close to a large lesion, caused by brain atrophy or simply due to the additional space given by the lesion cavity. Fig. 4C & D demonstrate this effect for the most medial coil positions in the healthy control and the patient with the cortical lesion (coil orientation was AP). This again results in a lower affected volume.
To summarize, the electric fields induced by TMS seem to be only weakly affected by the CSF cavities caused by the lesions. The absolute field strength in grey matter and its decay with depth are very similar to those obtained in healthy subjects. As a tendency, the affected grey matter volume seems to be lower when the coil is positioned directly above the lesion site compared to far away. However, this effect is not stronger than the influence of other anatomical factors on the affected volume, such as the local curvature of the brain surface underneath the coil centre, the gyral "packing" and likely also the skin-cortex distance (which was very similar in our case).

Electric fields generated by TDCS
In contrast to TMS, the electric fields generated by TDCS in cortical grey matter are clearly influenced by the presence of the lesions in both patient models. The peak electric field strengths were moderately lower in the head models of the patients compared to the healthy control (Table 1, fifth line). However, the main finding is a strong reduction (> 30%) of the average field strength at almost all distances to the electrode and independent of the position of the return electrode ( Fig. 5A & B). This is linked to a strong decrease of the affected grey matter volume across all tested positions (blue and green bars versus red bars in Fig. 6A). Additional simulations demonstrated that the For none of the distances, a systematic difference between the results obtained for patient P01 and the healthy control is seen. B) Decay of the field strength with depth for patient P02, averaged across all nine positions and both coil orientations. The results are very similar to those of the healthy control. C) Sagittal cut through the head model of patient P01. The coil was positioned above the lesion centre (the green dots indicate a line perpendicular to the coil plane and starting at the coil centre) and the current orientation was anterior-posterior. The position at the lesion boundary highlighted by the red arrow experiences high field strengths, despite being distant to the coil centre. This effect is caused by the anterior-posterior currents induced in the lesion cavity which hit the gyrus approximately perpendicularly. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) qualitative pattern of these findings did not depend on the specific electrode type that was modelled (Fig. S3), and that they were robust to changes in the threshold used to distinguish between "affected" and "non-affected" grey matter (Fig. S4). Further, decreasing the diameter of the cylinders for creating the depth profiles of the electric fields to 30 mm, as used for TMS, did not change the finding of generally reduced field strengths for the patient head models (Fig. S5). Visual inspection revealed that the current flow was shunted through the wellconducting CSF cavity and the ventricles, in part circumventing the brain tissue, and therefore resulting in lower electric field strengths in grey matter. Importantly, this effect occurred even when the lesion site was not situated between the electrode positions. For example, in the case of the tested medial electrode position and the return electrode above the contralateral parietal cortex (rightmost green and blue bars in Fig. 6B), the lesion was located laterally to both electrodes. The results further suggest an expected systematic dependence of the affected grey matter volume on the electrode distance for the healthy control (red bars in Fig. 6B): Once the two electrodes get close to each other, current shunting through the skin layer and superficial CSF seems to be dominant and diminish the current flow through the brain.
Local "hot-spots" in grey matter were often observed which were caused by the tunnelling effect of the lesion cavities: In Fig. 7A, the electrode was positioned lateral to the cortical lesion with the return electrode on the forehead (not visible in the image), resulting in a strong current flow through a grey matter slab that is situated between the electrode and the lesion cavity. In contrast to most other electrode positions, this resulted in localized high field strengths in the grey matter part close to the electrode also in case of the cortical lesion (orange curve highlighted by the red arrows in Fig. 5C). The area around the fundus of the cortical lesion experienced increased field strengths consistently for most electrode positions (Fig. 7C), even when both electrodes were anterior to the lesion cite. This effect was caused by this region being a "short cut" for the currents flowing from the lesion cavity to the underlying ventricle. In some cases, this resulted in a noticeable increase of the average field strengths in depth (pointed out by the second arrow in Fig. 5C). Finally, Fig. 7B shows an area of high field strength, which was neither under nor between both electrode positions. Rather, it is located at a rather thin grey matter part next to the subcortical lesion, and thus again acts as a short cut for currents flowing in well-conducting CSF. However, despite the occurrence of hot spots in grey matter with high field strength, the predominant impact of the lesions was to reduce the field strength in large parts of the brain.

Differences in skin, skull and CSF thickness
The three head models were rescaled to have the same distances between nasion and inion and left and right ear, respectively, in order to rule out that differences in gross anatomical features systematically biased the results. In addition, we further assessed the thicknesses of skin, skull and CSF underneath the electrode and coil, respectively, to control for their potential impact on the observed differences in the electric fields (Table 2).
The skin-to-cortex distance (SCD) was around 2-3 mm greater for the head models of the patients compared to the healthy control, which was mostly driven by thicker CSF layers. For TMS, field strength decreases with increasing SCD, resulting in higher motor thresholds (McConnell et al., 2001;Thielscher and Kammer, 2004). This effect did not result in observable differences in the peak field strengths presented here, suggesting that the other factors as discussed above were more dominant. However, for TDCS in the patient models, an increased current shunting in the thicker superficial CSF layers might have contributed to the observed lower average field strengths.
Skin and skull thickness were generally well matched between the three head models. The skin layer of the head model with the subcortical lesion was slightly thicker than those of the two other models were. This is only relevant for TDCS, for which this might have  Fig. 2A). While a twoway ANOVA indicated differences between the head models (factor "subject" was significant at p = 0.01), pairwise comparisons of the volumes for the two patient heads with those of the healthy control were not significant (tested at p = 0.05 using post-hoc t-tests, corrected via Tukey's HSD). Factor "position" of the ANOVA was significant at p = 0.0066, the interaction between "subject" and "position" was not significant (p = 0.43). No statistical testing was performed for the positions above the lesion due to the low number of data points (one position with two coil orientations per head model). B) Detailed results for variation of the coil positions from posterior to anterior, with the coil orientation from anterior to posterior. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

Table 2
Average thicknesses ( ± standard deviation, SD) of skin, skull, CSF and average skin-tocortex distance (SCD) across all positions except the central position directly above the lesion. The latter was omitted from the analysis, as its CSF thickness and SCD could not be determined in the head model of P01. For the two patient head models, significant differences to the healthy control are marked in bold (unpaired t-tests, thresholded at p < 0.05, asterisk: Bonferroni-corrected for 2 comparisons per line).

Summary of findings
We used finite-element calculations in realistic head models to explore the impact of structural brain changes in patients with large cortical and sub-cortical lesions on the electric field patterns generated by TMS and TDCS. We varied the coil and electrode positions in relation to the lesion to test for systematic influences of the lesion on the field patterns. The calculation results suggest that the lesions had surprisingly little influence on the fields induced by a TMS figure-of-eight coil. The field direction in relation to the lesion boundaries had a clear impact on the field strength, but this effect was mostly in the range as previously reported for the gyral orientation (Thielscher et al., 2011). A few current "hot spots" were observed that were likely influenced by the lesions. However, the peak field strength was not substantially different to that observed in a head model of a healthy control. In addition, the decay of the field strength with stimulation depth and the extent of the stimulated volume seemed to be largely unaffected by the lesions.
In contrast, the combination of a stroke lesion and enlarged ventricles appears to have a substantial effect on the fields generated by standard TDCS montages based on two large electrodes. In the simulations, a substantial amount of current was shunted through the CSF pathway created by the lesion cavities and further into the ventricles. This had two effects. First, some "hot spots" occurred in the cortical regions at the interface between the ventricles and lesions cavities. These hot spots were within the bounds of the current density observed in healthy controls, but were comparatively stable across tested electrode positions. Second, in most of the cortex, the field strength was substantially decreased compared to the healthy control. Again, this effect was stable across the tested positions. The peak field strength was not substantially different between the head models with the lesions and the healthy control.

TMS results: further aspects
In the healthy control, changing the TMS coil position resulted in surprisingly clear differences in the grey matter volume where the induced field exceeded the set threshold value. Visual exploration of the results of both the patient and healthy control suggest that the local curvature of the brain surface and brain atrophy might be factors influencing the brain volume affected by TMS. While these observations need further validation, it might be interesting to test in future studies whether the two factors explain a part of the observed variability of the physiological TMS effects, in addition to the coil-cortex distance (McConnell et al., 2001;Stokes et al., 2007).
Given that our specific interest was in comparing the relative results across head models, we arbitrarily choose a rate of change of the coil current of 1 A/μs. For completeness, we further rescaled the reported values to get absolute field strengths that would be achieved in practical experiments when stimulating at 100% rMT for two different combinations of stimulator and coil. For this, we applied average rMT Fig. 4. TMS simulations. Anatomical features, which likely contribute to the variability in the stimulated grey matter volume. A) Electric field distribution for the most anterior coil position for the healthy control with the coil orientation from anterior-posterior. For this position, the grey matter volume above threshold was comparatively high (rightmost red bar in Fig. 3B). This is likely caused by a rather flat brain surface underneath the coil centre, as indicated by the red line. B) Electric field distribution for the most posterior coil position for the healthy control with the same coil orientation as in A. The grey matter volume above threshold is lower in this case (leftmost red bar in Fig. 3B), likely caused by the higher local curvature of the brain surface (as indicated by the red line). C) Electric field distribution on the grey matter surface of the healthy control for the most medial coil position with the current flow in anterior-posterior direction. D) Field distribution for the same coil position as used in C, but for patient P01. The gyri underneath the coil centre seem to be less densely packed compared to the healthy control, resulting in a smaller grey matter volume above threshold (leftmost red and green bars in Fig. 3C). (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) values of healthy subjects taken from the literature (Kammer et al., 2001). However, this approach still allowed for a coarse estimate of the range of field strengths reached in practice. The values are lower than those reported for a similarly sized coil in a recent paper (Bungert et al., 2016), which is due to different ways in determining the peak field strengths (99th percentile across the grey matter of the whole brain versus absolute maximum). Importantly, while we simulated a specific figure-of-eight coil, we are confident that our results also hold for other similarly sized TMS coils which all have rather similar field distributions (Deng et al., 2013;Thielscher and Kammer, 2004).

TDCS results: further aspects
It is very likely that the observed atrophy in the patient head models, in particular the secondary enlargement of the ventricles, contributed markedly to the shunting effects in addition to the lesion cavity itself (Aoi et al., 2012;Takeda and Matsuzawa, 1984;Kutlubaev et al., 2013). Atrophy is typical finding in chronic stroke (Skriver et al., 1990) initially developing as a direct consequence of the stroke insult, and further increasing in the chronic phase due to Wallerian degeneration. In addition, brain regions which have lost a significant proportion of their connectivity after the stroke are often seen to undergo degeneration and therefore reduce in volume (Seghier et al., 2014;Kraemer et al., 2004;Gauthier et al., 2013). In addition, the presence of a causative factor such as small vessel disease can result in both cortical atrophy and a stroke (Nitkunan et al., 2011). The cortical atrophy observed here in our patients led to a slightly enlarged CSF layer in the patient head models. In addition to the current pathway created by the lesion cavity and the ventricles, a larger superficial CSF layer will increase the proportion of the applied current shunted into the CSF, thereby lowering the fields in the brain and further decreasing the effectiveness of TDCS in this patient group. However, irrespective of the underlying cause, the changes in brain structure seen in our two patients are good representations of the typical changes seen after a major stroke, suggesting that the findings reported here will be generalizable to many stroke patients with large lesions. . The profiles were assessed underneath the stimulation electrode above the right hemisphere, averaged across all nine tested electrode positions. The vertical lines indicate the standard deviation. The results obtained for the healthy control are shown for comparison (red). Left: Return electrode above the contralateral forehead. Right: Return electrode above the contralateral parietal cortex, created by mirroring the electrode position directly above the lesion. Except for the very superficial cortex, the field strength in the head model with the cortical lesion is consistently lower than seen in the healthy control. B) Average field profiles for patient P02, averaged across all nine positions. The results are very similar to those obtained for the model of the cortical lesion. The position of the return electrode is above the left forehead (left) and the parietal cortex (right). C) Detailed results for patient P01 (return on the left forehead, variation of electrode position from lateral to medial). At some positions, an increase in the field strength close to the brain surface is clearly visible. Similarly, a slight increase in the field strength rather deep in the brain (~45 mm) is observed for some positions. Both effects are highlighted by red arrows. They are further investigated in Fig. 7 and the corresponding parts of the Results section. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) A threshold of 0.15 V/m was chosen for comparing the extent of stimulated grey matter volume of the different head models, due to the generally low field strength generated by TDCS in the head models of the two stroke patients. This value is in the lower range of the experimentally determined thresholds for modulation of neuronal activity by weak electric fields (Bindman et al., 1962;Francis et al., 2003) and was selected to yield volumes larger than 0 for the weakest stimulation result. In general, estimating the extent of brain tissue in which TDCS exerts effects on neural activity based on electric field estimates is a non-trivial problem. Several factors in addition to the field strength play a role. Among others, this likely comprises the local field orientation relative to the cortical sheet (Bindman et al., 1964), but also factors such as detailed neural morphology and orientation (Kabakov et al., 2012;Radman et al., 2009;Rahman et al., 2013) or the neural state of the targeted brain area (Bortoletto et al., 2015;Fricke et al., 2011;Thirugnanasambandam et al., 2011). In particular, the latter might contribute to a different neuroplastic response to the stimulation protocol in stroke patients compared to healthy humans. However, as it is reasonable to assume that the electric field has to exceed a minimal threshold to be able to affect neural activity at all, our results suggest that TDCS at 1 mA (as simulated here) might run into the risk of being ineffective in many stroke patients with large lesions. In our opinion, this is an important finding, which should be explored further using field calculations in larger patient groups, ideally combined with the assessment of the clinical TDCS effects.

Relation to prior modelling work
To our knowledge, only a few prior studies tested the effects of lesion cavities on the field distribution in TBS. Wagner et al. (2006) simulated the effects of lesions in a coarse head model, and reported changes of the current flow pattern when the TMS coil was simulated as being close to the lesion. This is not surprising, as the lesion introduced CSF-brain boundaries, which were approximately perpendicular to the current flow. However, as gyrification was not modelled in this study, it remained unclear that these effects were actually in the same range as caused by the gyral folding pattern also for healthy brains.
Our results confirm the observations of Datta et al. (2011) that the CSF-filled lesion cavity together with the ventricles are a preferred pathway for the currents injected by TDCS, resulting in a marked reconfiguration of the field distribution, and that the field strengths generated in brain tissue are still in a safe range. We extend these findings by two important aspects: First, this effect still occurs even when the lesions are largely confined to subcortical areas. Second, the comparison with the distribution in the head model of a healthy subject with matching head dimensions suggests that a main effect of the lesion is a reduction in the average field strength in the brain. Two prior studies (Dmochowski et al., 2013;Galletta et al., 2015) used computational modelling to individualize the electrode montages for a patientspecific stimulation. Our results suggest that this strategy is highly needed in case of extended lesions.

Limitations
We used only two head models of patients in this study. MR scans of patients are usually optimized for clinical diagnostics and often not suited for building head models. In addition, the segmentation and modelling procedure is still time-consuming, as the automated tools were optimized for application in healthy subjects. Both factors precluded the simulation of a large number of stroke patients. However, by systematically varying the coil and electrode positions, and by testing two types of lesions situated in the same brain region, we ensured that the reported findings are robust. Furthermore, the differences in overall skin and skull thickness between the head models of the patients and the healthy control were small enough to exclude that they caused the observed differences in the field distributions in the brain. Considering that studies in epilepsy patients have shown conductivity values in cerebral tissue to vary from patient to patient (Akhtari et al., 2006), the assignment of the same conductivity values to the patients and the healthy control is subject to some uncertainty, but is necessary as more accurate individual conductivity values would require invasive measurements. Importantly, however, the results reported here are driven by CSF having a markedly higher conductivity than brain tissue, which will robustly hold irrespective of a certain amount of individual variability in these values. An exception could be stroke patients with extended regions of fibrosis or scar tissue in the lesion, which might reduce the shunting effects to some extent. This was not the case for the patient head models tested here. In order to limit the complexity of building the head models (Windhoff et al., 2013), white matter was modelled as being fully contained in grey matter. This resulted in an artificial grey matter sheet also in the lesion cavities which, however, was too thin (~1 mm) to have strong effects on the overall current configuration. It should be also noted that the head models were truncated below the nose. We do not expect this to have any noticeable impact of the fields injected by TMS in the brain. It might have affected the TDCS current flow patterns mainly for the most Fig. 6. TDCS simulations. Grey matter volumes in which the field strength is above 0.15 V/m (green: P01; blue: P02; red: healthy control). The most striking observation are the much lower volumes, which are affected in the lesion models compared to the healthy control. A) Average plots over electrode positions grouped according to their distance to the lesion centre (indicated on the head model shown in Fig. 2A). For the two patient head models, significant differences to the healthy control are marked by the asterisk (p < 0.05; post-hoc pairwise ttests, corrected via Tukey's HSD). Factor "subject" of the underlying two-way ANOVA was highly significant (p = 1.4e−23), while factor "position" was not (p = 0.63). The interaction was not significant (p = 0.61). No statistical testing was performed for the positions above the lesion due to the low number of data points (one position with two positions of the return electrode per head model). B) Detailed results for variation of the electrode positions from lateral to medial with the return electrode over the left parietal cortex. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) lateral and posterior electrode positions, since this eliminates current flow through the bottom of the head. However, we do not expect that these limitations had marked effects on the reported results that would change our conclusions qualitatively.
An obvious avenue for future studies to explore would be the relative impact of the lesion size and other factors such as the enlargement of the ventricles and cortical atrophy on the field changes. This might be also important for other patient groups with substantial amounts of atrophy, e.g. patients suffering from Dementia. Overall, this is likely less important for TMS compared to TDCS, given that the large structural brain changes simulated here did not have strong effects on the field distribution. It is worth noting that patient-specific head models in case of stroke might still be important even for small lesions, which will not result in gross reconfigurations of the current flow, but will still likely have effects on the directly surrounding regions.

Conclusion: Using TBS in stroke research and rehabilitation
To summarize, in terms of the induced electric field strengths, both stimulation methods seem to be still safe also for patients with large chronic brain lesions, given that the established safety guidelines are followed (Fertonani et al., 2015;Rossi et al., 2009). However, additional factors such as a generally higher risk for seizures after stroke (Zelano, 2016) exist, which might, for example, decrease the threshold for seizure-induction by repetitive TMS protocols. While our findings are encouraging, they should thus be interpreted with some caution. We demonstrated that TMS in stroke patients has a moderately decreased spatial resolution and that it induces similar field strengths and field distributions in grey matter compared to healthy participants. As such, TMS seems to be well suited to target superficial brain areas for therapy and diagnostics. In particular, combined with EEG (Sato et al., 2015), it might be an interesting tool to test the functional state of superficial areas close to lesions. Using field calculations based on individual head models would likely help to increase its spatial accuracy more than it would in healthy controls.
The efficient usage of TDCS in patients with large lesions seems to be more challenging. Our results suggest the need for individualized calculations to get estimates of the field distribution and to open up the possibility to optimize electrode placement. Even though outside the scope of this study, approaches for current steering by multiple electrodes might be particularly beneficial in this patient group (Dmochowski et al., 2011;Dmochowski et al., 2013;Ruffini et al., 2014). Currently, a major obstacle in this respect is the lack of computational tools, which allow for the time-efficient automatic or semi-automatic construction of individual head models from the MR data of the stroke patients.
A further challenge for both TMS and TDCS is the selection of a relevant target area. For example, in the cases simulated here, high field strengths in grey matter areas near the lesion site occurred for some coil positions and electrode configurations (e.g. Fig. 7A for TDCS). As it is often the goal of stroke treatment to support the neighbouring and functionally related brain tissue around the lesion core, these areas might be potential targets for TBS intervention. However, a proper selection will need further information, in particular whether the surrounding grey matter is still functional and is structurally connected so that its stimulation might help to improve behaviour. This question is particularly relevant for thin cortical slabs above or next to the lesion, as observed here. While it seems to be easier to generate therapeutically relevant field strengths in these areas, they have also a higher risk of being structurally disconnected. This motivates the exploration of combining field calculations with functional and structural neuroimaging for the effective planning of TBS. Coronal cut through grey matter when placing the stimulation electrode just lateral to the lesion and the return electrode above the left forehead (corresponding to the orange line in Fig. 5C). There are several grey matter structures, which experienced high field strength. The hot spot directly underneath the stimulation electrode (indicated by the red arrow) is caused by the currents passing from superficial CSF to the CSF in the lesion. B) Patient P02: Coronal cut through grey matter with the stimulation electrode placed at the medial position and the return electrode above the left parietal cortex. Surprisingly, a small hot spot distant to the electrodes occurs in the right hemisphere (indicated by the red arrow). This is caused by a current pathway through CSF, as favoured by its comparatively good conductivity. Starting in superficial CSF, it goes further into the lesion cavity (thereby causing the hotspot in GM), the ventricles and back into superficial CSF. C) Coronal cut through the head model of patient P01. The return electrode is placed on the left forehead and three positions of the stimulation electrode are shown (most posterior, centrally above the lesion and most anterior). The transition area between lesion and the ventricle continuously experiences high field strength. This results again from currents, which flow predominantly within CSF. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)