Reducing image artefacts in concurrent TMS/fMRI by passive shimming

A signi ﬁ cant problem in the concurrent application of transcranial magnetic stimulation (TMS) and functional magnetic resonance imaging (fMRI) is the image artefact caused by the effect of the TMS-coil on the homogeneity of the static magnetic ﬁ eld ( B 0 ). The resulting ﬁ eld inhomogeneity can lead to spatial distortions and local signal loss in echo-planar (EP) images. Here we demonstrate that passive shimming using thin patches of austenitic stainless steel can reduce the effect of the TMS-coil on B 0 by ~80%, thus essentially eliminating the associated artefact. Initially the effect of the TMS-coil on B 0 was measured using the phase of gradient echo images. Consequently the ideal distribution for the steel was simulated using the magnetic properties of the steel and the effects of the TMS-coil. Finally we demonstrate the effect of two different implementations of the passive shim on a spherical phantom and in vivo .

B u n g e r t, And r e a s , C h a m b e r s , C h ris t o p h e r D. ORCID: h t t p s://o r ci d.o r g/ 0 0 0 0-0 0 0 1-6 0 5 8-4 1 1 4 , P hillip s, M a r k a n d Ev a n s, C h ri s t o p h e r Joh n ORCID: h t t p s://o r ci d.o r g/ 0 0 0 0-0 0 0 2-6 6 1 9-4 2 4 5 2 0 1 2. R e d u ci n g i m a g e a r t ef a c t s in c o n c u r r e n t TM S/fMRI by p a s siv e s hi m mi n g. N e u r oI m a g e 5 9 (3) , p p . 2 1 6 7-2 1 7 4. 1 0. 1 0 1 6/j. n e u r oi m a g e . Thi s v e r sio n is b ei n g m a d e a v ail a bl e in a c c o r d a n c e wit h p u blis h e r p olici e s. S e e h t t p://o r c a . cf. a c. u k/ p olici e s. h t ml fo r u s a g e p olici e s. Co py ri g h t a n d m o r al ri g h t s fo r p u blic a tio n s m a d e a v ail a bl e in ORCA a r e r e t ai n e d by t h e c o py ri g h t h ol d e r s .

Introduction
The combination of TMS and MRI has enormous potential in neuroscience by enabling the simultaneous manipulation and detection of human brain activity with high spatial resolution. The feasibility of this combination was proven by Bohning et al.(1998) and has since been advanced by various groups (Baudewig et al., 2001;Bestmann et al., 2008;Blankenburg et al., 2008;Bohning et al., 1999;Moisa et al., 2010;Sack et al., 2007). Several tools have been developed to overcome the problems that arise from the concurrent application of TMS and MRI, including positioning of the TMS-coil inside the MR scanner (Bohning et al., 2003;Moisa et al., 2009) and the reduction of the artefacts on MR images caused by leakage currents between TMS pulses (Weiskopf et al., 2009).
A main innovation to make this combination feasible was the development of a TMS-coil (Bohning et al., 1998) free of ferromagnetic materials, in order to ensure MR-safety and for sufficiently preserving the homogeneity of the main magnetic field (B 0 ) of the scanner to permit functional magnetic resonance imaging (fMRI). Nevertheless, the diamagnetic properties of the TMS-coil cause sufficiently strong effects on B 0 to cause severe artefacts in the area of the image under the TMS-coil (Baudewig et al., 2000). This is particularly problematic as image quality is most severely affected in the region directly under the TMS coil-often the region of most interest in a TMS-MRI study.
In gradient-echo echo-planar (EP) imaging, commonly used for fMRI, inhomogeneities in B 0 cause two main problems: (i) spatial distortions in the phase-encoding direction, and (ii) a reduction or a complete loss of the MR-signal due to intra-voxel dephasing. Both effects can be observed in EP-images from a human head and from a phantom when a TMS-coil is attached. The artefact arises merely from the presence of the TMS-coil and therefore independently of whether a pulse is delivered. The cause of this artefact is a difference in magnetic susceptibility, χ, between the TMS-coil and the surrounding air (χ air ≈ 0). Due to the irregular shape of the TMS coil, the magnitude of the field perturbation, ΔB, will depend on the relative orientations of the TMS coil and the static magnetic field.
The correction of B 0 inhomogeneity using magnetic materials (passive shimming) has been used to correct for variations in B 0 arising from magnet design (Romeo and Hoult, 1984), nearby ferromagnetic structures (Hoult and Lee, 1985) and air filled spaces in the head such as sphenoid and ethmoid sinuses (Wilson et al., 2002).
In this work, we demonstrate that the detrimental susceptibility effects of the TMS-coil on MR image quality can be substantially reduced using a thin distribution of weakly-ferromagnetic stainless steel foil attached to the back of the TMS-coil. The result is an improved B 0 homogeneity in the area underneath the TMS-coil, and our results show that the static artefacts caused by the TMS-coil on EP-images can be almost entirely eliminated through the use of passive shimming.

Theory
If a volume of a material with the susceptibility,χ St , described by the by coordinates (x', y', z') is placed in a uniform static For a thin sheet of steel with a thickness T ≪ (x 2 + y 2 + z 2 ) 1/2 which is distributed in one plane, the integral can be reduced to two dimensions. In our case this plane was assumed to be either perpendicular to B 0 ,( z′ = 0) for a given distribution of steel foil in axial orientation or parallel to B 0 ,( y′ = 0) for a distribution in coronal orientation.

Setup and materials
All experiments were conducted in a 3 Tesla General Electrics HDx whole-body scanner (GE Healthcare, Chalfont St. Giles, UK). The first series of tests was conducted using an MR-compatible figure-of-eight TMS coil with 10 turns on each side and a 70-mm average diameter (The Magstim Company Ltd, Spring Gardens,Whitland, Carmarthenshire, Wales, U.K., SA34 0HR). In collaboration with Magstim, an additional MR-compatible TMS-coil was developed, which incorporated the shim already during production, but which was apart from this largely identical with the previous coil. The TMS coil was either positioned as close as possible to a large cuboid gel phantom (400 × 200 × 150 mm 3 ), to a spherical gel phantom (180 mm diameter) or to the head of a human subject. The whole body transmit/ receive coil was used to acquire data on the cuboid phantom with the TMS-coil in an axial orientation. For all other images a quadrature transmit/receive coil with an inner diameter of 28 cm was used.
To generate B 0 field maps, two separate 3D gradient-echo images (FSPGR) were acquired with (2.7 mm) 3 resolution, TE = 2 ms and 4 ms respectively, TR = 13 ms, and bandwidth = 125 kHz. For the cuboid phantom the FOV was set to 350 × 350 × 135 mm 3 , and four averages were acquired to increase the signal-to-noise because the distribution of the shim was based on these images. Active shimming was disabled during this acquisition. For the spherical phantom and for in-vivo head images the FOV was set to 192 × 192 × 192 mm 3 , with a resolution of (3 mm) 3 , and first order active shimming activated and one average was acquired.
Field maps were generated from the complex data of the 3D GRE images as follows: Phase maps were produced from the imaging data and unwrapped using the PRELUDE algorithm (Jenkinson, 2003). A mask was applied to the phase maps, which was created using the absolute intensity image of TE = 2 ms (>10% of the maximum intensity) in order to eliminate areas where the phase cannot be reconstructed reliably. The phase maps of 4 ms and 2 ms were subtracted from each other and then converted into field maps (in μT).
The passive shim consisted of austenitic stainless steel (Type 302) foil with a thickness of 25 μm (Precision Brand, www.precisionbrand. com). This kind of steel foil is generally used as a fine spacer for mechanical shimming. For the external shim, the steel was enclosed by self-adhesive transparent plastic sheeting. For the integration of the shim into the TMS-coil, the steel was glued to the inside of the shell of the TMS-coil using instant adhesives (Loctite).
Unless stated otherwise, data analysis was carried out using Matlab (MathWorks, Massachusetts, U.S.A.).

Methods
The development of the shim consisted of the following steps. First, we determined the magnetic susceptibility of the steel foil. We then quantified the field inhomogeneities introduced by the TMScoil, ΔΒ, and performed simulations to determine the optimal spatial distribution of steel for the passive shim. We then constructed the shim according to the output of the simulations and measured the effect of the shim in field maps and in EP-images.

Susceptibility of the steel foil
Although austenitic stainless steel is often described to be nonmagnetic, it nevertheless exhibits weak ferromagnetic behavior. The magnetic properties of stainless steel are dependent on the alloy composition, and can change when the steel is processed-for example by welding or machining (Weber and Fajans, 1998). Furthermore, the magnetization of these materials saturates at field strengths of approximately 0.25 T, leading to a decrease of the effective magnetic susceptibility at high magnetic fields (Weber and Fajans, 1998). For these reasons, we empirically determined the effective magnetic susceptibility, χ St , of the steel foil used in this work. Note that the value of χ St measured here is only applicable for the same product at a magnetic field strength of 3 T.
To determine the susceptibility, field maps were acquired with a circular piece of steel foil shim (diameter 20 mm) placed either on the right or on the superior surface of the cuboid gel phantom. By subtracting the baseline (field maps of the phantom without steel shim present), the effect of the steel shim on the magnetic field in two shim orientations was measured (sagittal when placed on the right, axial when placed superior). The simulated magnetic field of the steel shim was calculated by integrating numerically over the shape of the steel disc using Eq. (1). This simulated field was then fitted to the measured magnetic field with 3 translational degrees of freedom (x, y, z position of the shim) for each field map and χ St in order to match the observed influence with a simulated field. The fit was performed over a volume of 100 × 100 × 50 mm 3 with the steel disc about 5 mm away from the surface of the volume. The fit was based on the Nelder-Mead method, minimising the root mean square of the remaining field.

Magnetic field inhomogeneity, ∆B, introduced by the TMS-coil
The TMS-coil was placed flat on the large surface of the cuboid phantom. The phantom with the coil was positioned inside the scanner so that the phantom surface was perpendicular to the scanner axis. Two field maps were then acquired, with the TMS coil initially placed on the phantom and then removed from the scanner. The difference between the field maps represents the field-offset introduced by the TMS-coil in the axial orientation. The measurement was repeated with the surface of the phantom facing anterior, thus providing ΔB of the TMS-coil in a coronal orientation.

Determination of the distribution of the passive shim
The rubber ring around the TMS-coil was visible in the TE = 2 ms GRE image, and, based on this information, the position of the TMScoil relative to the field map was determined. The allowed area for the shim material was restricted to a plane that was located on the backsurface of the TMS-coil-measured to be 13 mm further away than the plane with the rubber ring. Within this plane, the shim was restricted to the shape of the TMS-coil so that it corresponds to the back surface of the TMS-coil. Alternatively the same method was applied, but to an area that corresponds to the inner surface of the outer shell of the TMS-coil (12 mm distance to plane of rubber ring, see Fig. 1). Eq. (1) was used to determine the average coverage with steel foil in this restricted area, which minimized the field inhomogeneity. The simulated field from the shim (ΔB St ) was added to the measured field, ΔB M , which resulted in a shimmed field, ΔB Sh . For the optimization, a mask was created to ensure that the shim optimized the field over the imaging region of interest. The mask was a sphere of 300 mm diameter, positioned so that the surface of the sphere touched the TMS-coil at its centre. Furthermore, only a region of 20 slices (54 mm thickness), parallel to the surface of the TMS coil, was used, with the closest slice being between 9 and 13 mm away from the front surface of the TMS-coil. The sum of the squares of ΔB Sh in the voxels within this mask was used as the value to be minimized during the optimization. In the first step, the optimal average density of the steel foil was determined over the whole allowed area. In further steps the area of the steel was segmented into rectangular areas and then the ideal thickness of each of these areas was calculated. With each iteration these rectangles were split into four smaller areas. Seven iterations were permitted, resulting in a map of approximately 1400 independent elements that collectively describes the ideal distribution of the shim (Fig. 1). The shim was defined in a universal frame, which allowed transformation of the shim to the allowed location in the axial and coronal field maps. This enabled the simulation to be conducted simultaneously for the axial and the coronal distribution. The result was a distribution for the shim that was concurrently optimized for both orientations. A more detailed description of the procedure can be found in the Supplementary Information.

Production of the shim
The total required amount of steel was split into square patches with edge lengths of 7, 6 and 4 mm. These patches were distributed over the area of the shim so that a smoothed map of the patches (2-D Gaussian smoothing kernel of 20 mm FWHM) matched the smoothed average thickness map. A template of the shim consisting of squares with the locations of the steel patches was printed with the correct dimensions on a paper sheet. The steel foil was then cut into patches of the given sizes. Single-sided adhesive plastic sheet was fixed over the paper and the steel pieces were distributed over the foil. The prepared shim was then either attached the back face of the TMS-coil (Fig. 1D) or the adhesive film was used as a carrier medium to glue the steel into the shell of the TMS-coil (Fig. 1F).

Measurement of the effect of the shim
Field maps and EP-images were acquired to determine the effect of the shim on image quality. Field maps were acquired on a cuboid phantom without the TMS coil, with the TMS-coil only, and with the TMS-coil plus shim, in axial and coronal orientations.
EP-images along with field maps without TMS-coil, with TMS-coil without shim, with TMS-coil plus shim and with the TMS-coil with integrated shim were also acquired on a spherical phantom (18 cm diameter) and in vivo on a human participant. For the human experiments the TMS-coil was positioned approximately over the right prefrontal cortex with the centre of the coil touching the head of the participant. On the phantom the coil position was in a similar orientation with respect to the scanner axis and with the centre of the TMScoil touching the surface of the phantom. As a result the orientation of the TMS-coil was in both cases between coronal and axial. The experiment was approved by the School of Psychology Ethics Committee at Cardiff University and written informed consent was obtained from the volunteer.
To account for subject movement, human EPI data were corrected using the 'MCFLIRT' tool and co-registered to the EP-images acquired without TMS-coil using the 'FLIRT' tool of the FSL software package . Relative intensity maps for the TMS-coil only data, and the TMScoil with shim data were generated by dividing each dataset voxelby-voxel by the intensity of the image produced without the TMScoil present. A mask was applied which represents all voxels with intensities above 50% of the average intensity inside the volume acquired without the TMS-coil. This mask represented either the whole phantom or most of the brain. An integrated histogram was then generated from the voxels within this mask.
Signal to noise (SNR) maps of the EP-image data were generated by removing low frequency fluctuations (>100 s) from the timeseries and then dividing the temporal mean by the temporal standard deviation of each voxel.
Field maps of the spherical phantom and of the human head were acquired with first-order automatic shimming, which was optimized for each coil/shim configuration to achieve a picture of field inhomogeneities during real experiments. Higher order shimming was not reliable with the particular version of MRI scanner that was used. To simulate the effect of second-order active shimming, the components of the first and second order spherical harmonics were subtracted from the field-maps.

Susceptibility of the steel foil
The magnetic susceptibility for the steel foil at 3 T was determined as χ St = 0.0123 ± 0.001. The error is a combination of the error in the fit due to noise in the images and the deviation in the diameter of the disc. The field before and after the fit is reported in the Supplementary Information.

ΔB caused by the TMS-coil
The effect of the TMS-coil on the magnetic field inhomogeneity in the cuboid phantom is shown in Fig. 2A. In the axial orientation, the TMS-coil caused a reduction of the magnetic field in the area underneath the coil of~1μT with a peak in the area where the lead is connected to the TMS-coil. In the coronal orientation, the TMS-coil caused an increase of the magnetic field strength of~0.5μT under the coil and a reduction superior and inferior to the coil. The sign of these results is opposite to the effect of the ferromagnetic steel. This shows that diamagnetic materials, including the copper windings, dominate the magnetic properties of the TMS-coil.

Effects of the external shim on ΔB in a cuboid phantom
The effects of the shim attached to the TMS-coil on ΔBinthecuboid phantom are shown in Fig. 2. A good agreement was observed between the measured and predicted fields following the application of the passive shim, in both axial and coronal orientations. Fig. 3 shows that the shim reduces the magnetic field inhomogeneity introduced by the TMS coil by~75-85% up to a depth of 90 mm away from the coil surface.

Effects of the external and the integrated shim on the homogeneity in B 0 and on EP-images
Direct comparisons of EP-images and of field maps without TMScoil, with TMS-coil, with TMS-coil plus shim, and with TMS-coil with integrated shim on a spherical phantom and on a human brain are shown in Figs. 4 and 5, respectively. Quantitative measurements of effects of the shims on the whole acquired volumes are summarized in Table 1. The integrated histograms of the relative intensity maps are shown in Fig. 6. Note the signal dropout in EP-images in the presence of the TMS coil alone, and that the affected voxels are concentrated in the area beneath the TMS-coil (Figs. 4a and 5a). This signal dropout is in both cases largely alleviated by both implementations of the passive shim. The temporal SNR maps indicate that there is no major global effect of the passive shim on the stability of EP-images and that the signal from the areas improved by the shim is stable. However there is a small overall improvement in SNR in the data acquired using a TMScoil with an integrated compared to an external shim. The field maps show an improvement in the homogeneity of B 0 in the area under the TMS-coil that is still present after applying simulated second order shimming.

Summary of the effects of the shim
These results demonstrate that passive shimming using thin patches of austenitic stainless steel attached to the interior or exterior of a TMS coil can reduce the B 0 inhomogeneity introduced by the TMS-coil by between 75% and 85% at up to a depth of 90 mm away from the coil surface. The total mass of steel required is approximately 0.6 g in these cases.
In EP-images from a phantom and in vivo, this B 0 field improvement due to passive shimming resulted in a substantial improvement in image quality, particularly in reducing the signal dropout in the area directly underneath the TMS coil.
The improvement is sufficient to conclude that, under most conditions, concurrent TMS/MRI is no longer constrained by the effect of the TMS-coil on B 0 . The distributions of the shim that we had determined proved to be effective in two different orientations of the TMS-coil on a cuboid phantom or in random positions on a spherical phantom and on a human head. This indicates that the effectiveness of the shim is independent of coil orientation. The small amount of steel required enables it to be attached without changing the dimensions of the TMS-coil. Once attached, the external shim can remain in place indefinitely and no further action is required, but it can be removed if required. The TMS-coil with integrated shim provides a clean solution in which the shim is invisible for the user. The Fig. 3. Plots of the field ΔB along a line through the centre of the coil, perpendicular to the coil surface. On average, ΔB is reduced by~85% in the axial orientation and by~75% in the coronal orientation. The plot shows that the shim is effective even at large distances from the TMS-coil. Fig. 4. (A) Axial EP-images; (B) SNR maps; (C) field maps; and (D) field maps using simulated second-order shims of a spherical phantom without the TMS-coil, with the TMS-coil only and with the TMS-coil plus shim, and with the TMS-coil with an integrated internal shim. The colorscale for the SNR maps ranges from 0 (blue) to 150 (red), and for the fieldmaps ranges from − 0.5 (blue) to 0.5 (red) μT. The TMS-coil was positioned slightly anterior to the superior right of the phantom. The EP-images show clear artefacts caused by the TMS-coil, which are decreased significantly by the passive shim. The SNR level is decreased in the area under the TMS-coil along with the signal. The field maps show that the shim strongly decreases the inhomogeneities in B 0 caused by the TMS-coil. Second order shimming provides an overall improvement in the homogeneity in B 0 , but the effect of the TMScoil remains strong and is nevertheless strongly decreased when using a passive shim. simulations that we used to determine the optimal shim distribution are universal in the sense that they can be repeated readily for alternative coil configurations.
The effect of the TMS-coil on B 0 was observed despite the use of first-order active shimming. Simulations show that second order active shimming can compensate partially for the effect of the TMScoil on B 0 , but in the area under the TMS-coil, a passive shim still provides a significant additional improvement.

Limitations and side effects of the method
Our results indicate that the passive shim reduces the effect of the TMS-coil on B 0 . However the effect on EP-images can differ strongly dependent on the position of the TMS-coil with respect to the naturally occurring inhomogeneities in B 0 in a human brain. In Fig. 4c the effect of the TMS-coil reduces B 0 in an area where B 0 is already lower than in the surrounding areas, so that in this case the signal  Fig. 4 but from a human brain. (A) Axial EP-images; (B) SNR maps; (C) field maps; and (D) field maps using simulated second-order shims without the TMS-coil, with the TMS-coil only and with the TMS-coil plus shim, and with the TMS-coil with an integrated internal shim. The colorscale of the field maps ranges from − 1 (blue) to 1 (red) μT. The TMS-coil was positioned approximately over the right prefrontal cortex. The results are comparable to those of the spherical phantom shown in Fig. 4. A clear signal dropout is visible in the anterior right areas of the images, which is mostly eliminated when using a passive shim.

Table 1
Summary of effect of the shims on the quality of EPI data and on ΔB over the whole volumes. EPI: Voxel intensities b50% of EPI of 'No Coil' refers to the integrated histograms from Fig. 6. It shows that the signal drop-out under the TMS-coil is mostly eliminated by reducing the total fraction of the masked volume lost from about 2.5% to 0.4% in both, the human brain and the phantom. The SNR is in for both cases, the phantom and the human data, reduced slightly for the TMS-coil only and the TMS-coil with shim. The root mean square (rms) of ΔB is in all cases improved by a passive shim. In the phantom ΔB there is still a significant effect on ΔB from the TMS-coil when using it together with a shim, but for the human data the remaining effect of the TMS-coil on ΔB is very small when using a passive shim.

Phantom
No loss and the related artefacts are probably stronger than if the TMScoil would be positioned over other parts of the brain.
To facilitate the procedure, the potential locations for the shim were restricted to locations in one plane. In principle the procedure could be extended so that a more general placement of the steel is possible, thus allowing a better approximation of the field that has to be corrected. Also it would be possible to apply the method to other predominately diamagnetic objects that are used inside the MRI-scanner, but an application to predominantly paramagnetic objects is more difficult because the steel would amplify their effect on B 0 rather than reducing it.
Due to the discretization of the steel, the field close to the shim is inhomogeneous, which results in an effectively suppressed MR-signal from regions close to the shim. However this effect was not observed when the shim was placed in a distance of >25 mm (thickness of the TMS-coil) from the image.
SNR maps show a minor influence of the TMS-coil and the two versions of shims on the overall SNR, and that the best results were achieved with the integrated shim. Furthermore the SNR maps showed that the signal from the areas recovered by the shim is stable. Negative findings in BOLD contrast in studies using concurrent TMS/fMRI in the area under the TMS-coil are not necessarily related to inhomogeneities in B 0 . However the passive shim strongly reduces the chance of signal dropout in this area due to inhomogeneities in B 0 . As a result the quality of the signal from underneath the TMS-coil is increased.
Second-order active shimming was not used during this study. Had second-order active shimming been available, the amount of signal dropout seen at baseline would have been reduced. However, the second order shim simulations demonstrate that the passive shim yields substantial improvements in homogeneity even after a perfect second-order shim.
In Fig. 4A, ghosting artefacts are visible when the TMS-coil is attached, which are stronger when a passive shim is present. This increase in ghosting artefacts can be explained by a suppressed signal in the area under the TMS-coil when the shim is not attached which is also the area that provides the largest contribution to the ghost. Eddy currents inside the passive shim are possible, but the strength of these currents is very small compared to eddy currents inside the wires of the TMS-coil, rendering the negative influence on MR-images negligible.
Due to the small amount of steel, the shim will have no relevant effect on the field generated by the TMS-pulses. The field of the MRI scanner is changed by approximately 1 μT, which is about 0.3 parts per million. If the same effect size applies to TMS, then the strength of a TMS-pulse would change by 0.0003%.
In our opinion there are no further safety risks involved in the application of the passive shim. The forces on the external shim are very weak and certaintly too weak to cause any danger. The possibility of heating of the steel due to absorption of the radio field during MRI sequences cannot be excluded, but even when fitted externally, the shim is separated from the scalp by the insulated TMS-coil. When the shim is integrated internally into the TMS-coil, it remains separated from the wires inside the coil by several layers of insulating material, with a total thickness of more than 10 mm.
A more detailed discussion of potential side effects due to the passive shim can be found in the Supplementary Information.

Conclusion
Overall, our results indicate that a carefully designed passive shim can virtually eliminate one major source of image artefacts in concurrent TMS/fMRI. Our solution permits the acquisition of EP-images with reduced geometric distortions and reduced signal drop-out beneath the TMS-coil, which should benefit a range of TMS/fMRI applications.