Verification of neuronavigated TMS accuracy using structured-light 3D scans

Objective. To investigate the reliability and accuracy of the manual three-point co-registration in neuronavigated transcranial magnetic stimulation (TMS). The effect of the error in landmark pointing on the coil placement and on the induced electric and magnetic fields was examined. Approach. The position of the TMS coil on the head was recorded by the neuronavigation system and by 3D scanning for ten healthy participants. The differences in the coil locations and orientations and the theoretical error values for electric and magnetic fields between the neuronavigated and 3D scanned coil positions were calculated. In addition, the sensitivity of the coil location on landmark accuracy was calculated. Main results. The measured distances between the neuronavigated and 3D scanned coil locations were on average 10.2 mm, ranging from 3.1 to 18.7 mm. The error in angles were on average from two to three degrees. The coil misplacement caused on average a 29% relative error in the electric field with a range from 9% to 51%. In the magnetic field, the same error was on average 33%, ranging from 10% to 58%. The misplacement of landmark points could cause a 1.8-fold error for the coil location. Significance. TMS neuronavigation with three landmark points can cause a significant error in the coil position, hampering research using highly accurate electric field calculations. Including 3D scanning to the process provides an efficient method to achieve a more accurate coil position.


Introduction
Transcranial magnetic stimulation (TMS) is a non-invasive technique for neural stimulation of the brain.It has both scientific uses in brain research and clinical applications, such as presurgical functional mapping (Jung et al 2019), and treatment of neuropsychiatric diseases, such as depression (Brunoni et al 2017), obsessive compulsive disorder (Fitzsimmons et al 2022), addiction (Petit et al 2022), and chronic pain (Stilling et al 2019).TMS operates through a magnetic coil placed on the scalp that induces an electric field within the brain tissue beneath.Changes in the coil positioning affect the induced electric field, potentially altering which cortical region is stimulated (de Goede et al 2018, Laakso et al 2013Laakso et al , 2018)).This can cause issues in clinical TMS applications, such as errors in pre-surgical mapping and mislocation of the treatment.The effect is emphasized in a research setting where even a small inaccuracy can drastically alter the results.For instance, even a small difference in the coil position can change whether a sought response to stimulation is observed or not.Therefore, accurate coil positioning is essential.
Navigated TMS (nTMS) is a tool for placing the coil to stimulate the desired target.It provides image-based stereotactic neuronavigation, where the position of the coil is visualized on the brain in real time (Ruohonen and Karhu 2010).The navigation relies on a camera that tracks the locations of the TMS coil and the head reference marker attached to the head.This allows the positioning of the coil based on a pre-marked location on the structural magnetic resonance (MR) image of the brain.The navigation relies on a co-registration process, in which the reference points, typically the nasion and the pre-auricular points, are marked in the MR image and matched with the exact corresponding anatomical landmark locations on the real head.
However, the co-registration is prone to inaccuracies such as the instability of the head reference marker and slight errors in the manual pointing of the landmark locations (Nieminen et al 2022).In addition, the head is slightly distorted during an MRI scan due to the prone position that pulls the lower face posterior, and cushioning that pushes the sides and back of the head slightly inwards.This causes minor discrepancies between the real head and the head shown in the MR images, which hampers the landmark pointing and the alignment of the corresponding anatomical points.Some of these inaccuracies could be alleviated by increasing the number of landmark points in co-registration.Still, it is common practice to use just three points in nTMS measurements and software (Souza et al 2018, Caulfield et al 2022, Matsuda et al 2023), as it often provides sufficient accuracy, and increasing the number of points makes the process more time consuming.
There have been several previous studies evaluating the accuracy of nTMS.A common strategy to study the accuracy of the coil placement is to calculate the distance from the target location displayed by the neuronavigation system (Schönfeldt-Lecuona et al 2005, Caulfield et al 2022).The problem with such an implementation is that it does not take into account the error in the co-registration of the head, which can cause misplacement of the target location.The errors related to the co-registration process have only been examined in few studies.Nieminen et al (2022) used computer simulations to estimate navigation errors due to landmarkand surface-based head-to-MRI registrations.Yet, there seems to be no research that evaluates the coregistration errors with measured data.
In this study, we investigated the reliability and accuracy of the manual three-point co-registration of the nTMS with 3D scanning.The aim was to examine the extent of the error in coil positioning, and its effect to the modeled induced electric and magnetic fields.We compared the coil locations from the nTMS to the 3D scanned locations.In addition, we calculated the sensitivity of the coil location on landmark accuracy to demonstrate the error.To our knowledge, this is the first study to compare the coil location from nTMS with the actual coil location verified with 3D scanning.

Participants
The data were collected from 10 healthy right-handed participants (5 female, 5 male, mean age ± SD = 30.0± 4.2, age range: 26-40).All participants gave their written consent for participation.The study was approved by the Aalto University Research Ethics Committee (decisions D/574/03.04/2022and D/1006/ 03.04/2022).All procedures were conducted in accordance with the Declaration of Helsinki.
The MR images were segmented into different tissue types using the FreeSurfer image analysis software (Dale et al 1999, Fischl et al 1999) for brain tissues and a semi-automatic procedure described in Laakso et al (2015) for non-brain tissues.The segmented images were voxelized into cubical elements with a spatial resolution of 0.5 mm to generate volume conductor models.The segmented MR images were also used to generate a triangular mesh surface model of the head (figure 1(A)).

Navigated TMS experiments
The TMS was performed with a monophasic Magstim 200 2 stimulator (Magstim Company, UK) and an eightshaped TMS coil with two adjacent round wings of 9 cm diameter (D70 Alpha Flat Coil, Magstim Company, UK).The coil position was tracked and recorded with the Visor2 TMS neuronavigation system (ANT Neuro, Enschede, the Netherlands) and the associated Polaris Vicra optical tracking system (Northern Digital Inc., Canada).To validate the coil location measured by the navigation system, the participant's head together with the coil was 3D scanned (Artec Leo, Artec 3D, Luxembourg).The data were measured at Aalto TMS, Aalto NeuroImaging, Aalto University School of Science.
During the experiment, the participants were comfortably sitting on a chair with an individually shaped neck rest to support their head.The participants wore a tightly fitting neoprene cap to hold the neuronavigation head reference marker in place and to create a uniform surface for the 3D scan, as the 3D scanner cannot properly scan hair.The TMS coil was fixed with a coil holder.
First, the head location was registered by using a pointer tool to digitize the positions of three anatomical landmarks, nasion and ears.A 3D visualization of the head surface in which the landmarks had been premarked was used to aid the digitization process (figure 1(B)).After the registering process, the head and the coil on the scalp were 3D scanned.A zero-intensity TMS pulse was delivered before and after the 3D scan for Visor2 to register the coil and head location to the navigation system, and to validate that the head was not moved during the scan (figure 1(C)).
Visor2 returns the coil locations in nasion-ear coordinate system as described in its user manual.This coordinate system is established with the Y¢-axis aligned along the line connecting the ear points (l 1 and l 2 ), so that its direction u Y ¢ points from right to left.The origin (r 0 ) is the closest point on the Y¢-axis to the nasion point (l 3 ).X¢-axis direction u X¢ is from the origin to the nasion point.The Z¢-axis direction u Z¢ is orthogonal to both the Y¢ and X¢ axes, pointing to the superior direction.For analysis, coil locations in nasion-ear coordinate system (r¢) are transformed into the coordinates of the MR image (r) by The accuracy of the navigation system was verified prior the experiment.First, three landmark points were registered on known locations on a flat surface.Then, the the coil was positioned at 20 known reference points (measurement accuracy 0.5 mm) above the surface and the positions were measured with the navigation system.The accuracy of the navigation system was precise, as the mean difference between the reference and navigation was 0.20 ± 0.16 mm, which is smaller than the level of the reference measurement accuracy.

Head to head registration
To effectively compare the location of the real 3D scanned coil and the location where the navigation system assumes the coil to be, the locations had to be transformed to the same coordinate system.We did this by transforming the coordinates of the 3D scanned coil to the MRI coordinates.
First, the 3D scan was registered to the MR images using MATLAB.For the registration, a facial area around the nose was extracted and co-registered to the MR image (figure 2(A)-(B)).This specific area was chosen as it is mostly immutable between different body positions (Hironaga et al 2019).The surfaces were matched using an iterative closest point (ICP) algorithm.Next, a transformation matrix for transforming the 3D scanner coordinates to MRI coordinates was obtained from the co-registration.Finally, the transformation matrix was used to transform the coordinates of the 3D scan to the MRI coordinates (figure 2(B)).To obtain the exact coil location from the 3D scan, a model coil (generated from a highly detailed 3D scan) was registered to the coil obtained from the 3D scan (figure 2(C)).This allowed a direct comparison of the navigation and 3D scan coil locations in the same coordinate system (figure 2(D)).
We also studied the accuracy of the co-registration (figure 2(A)-(B)) and the differences between the head shape in supine (in MRI) and upright (in neuronavigation) positions.For meaningful comparison of differences, the facial area was divided into horizontal thirds, where the bottom segment was limited to a line drawn under the nose and the top segment to a line drawn under the brow ridge.In addition, the nasal area that was used for the co-registration was examined separately.

Accuracy of neuronavigation
To study the accuracy of the neuronavigated coil position, we calculated the distance between the 3D scanned and navigated coil positions along the X, Y, and Z axes.The X, Y, and Z components are defined as the coordinates in left-right, posterior-anterior, and inferior-superior directions, respectively (figure 3).We also calculated the difference in the coil position in yaw, pitch and roll angles, where the yaw axis is perpendicular to the round wings, pitch axis is parallel to the wings and the roll axis is parallel to the coil handle (figure 3).

Sensitivity of the coil location on landmark accuracy
To study the sensitivity of the coil position to mispositioning during the neuronavigation landmark pointing, we created the Jacobian matrix of r from (1): with three landmark points (L l l l , , ) as the input values and the location of the coil (r) as the output value.The coil location in nasion-ear coordinates (r¢) was fixed at the individually measured location for each participant.Altogether, nine degrees of freedom were included in the matrix as there were three coordinates for each landmark point.
Similarly, we used a Jacobian matrix to inspect the sensitivity to the coil rotation.The same three landmark points were used as the input values, but the output value was a vector including the coil rotation angles in yaw, pitch, and roll directions.
To calculate the maximal differences in the coil position that the mislocation of the landmark points can cause, we calculated the norm of the Jacobian matrix ∥J∥ 2 , which provides the maximum scale by which the mislocation of the landmark points can stretch the output vector.

Induced electric field
The induced electric fields in the brain were computationally estimated using a finite-element method (FEM) as described in Laakso et al 2018.The source code for the FEM solver is available at (https://version.aalto.fi/gitlab/ilaakso/vgm-fem).In the procedure, a computer model of an eight-shaped coil was placed on either the neuronavigated or the 3D scanned coil location over the individual volume conductor model of the head.The induced electric field originating from the coil was calculated in the whole head using the FEM with a uniform grid of first-order cubical elements with a 0.5 mm edge length.For this study, the field in the depth of 2 mm below the pial surface was selected to avoid the staircase approximation error at the tissue boundary between gray matter and cerebrospinal fluid.Electric conductivity values were assigned to the voxels similarly to Laakso et al (2018) (unit: S/m): gray matter (0.215), white matter (0.142), cerebrospinal fluid (1.79), compact and spongy bone (0.009 and 0.034), subcutaneous fat (0.15), scalp (0.43), muscle (0.18), dura mater (0.18), and blood (0.7). Volume conductor models were generated from the segmented MR images with the given conductivity values.Maximum stimulator output (MSO) intensity, corresponding to the dI/dt of 152 A μs −1 , was used for the computer simulated TMS pulses.
We simulated the differences in induced electric fields and magnetic fields between the two coil positions.For both, we calculated a L2-norm relative error of the field from the neuronavigation system (E nav and B nav ) to the field from the 3D scan (E scan and B scan ) as where ΔE = E nav − E scan and ΔB = B nav − B scan .The maximum electric field magnitude (E max ) and the magnitude at the cortical location of the first dorsal interosseous (FDI) muscle (E FDI ) were determined for the two coil positions.The cortical FDI location was preregistered to be [−41, −7, 63] in the MNI coordinates, which is a group-average activation site of the FDI muscle from Laakso et al (2018).The distances between the locations of the E max on the cortex were also calculated.Correlations between the L2-norm relative error and the coil distance and between the L2-norm relative error and the E max cortical location distance were calculated using the Pearsonʼs correlation coefficient.

Co-registration accuracy and differences in head shape
The co-registration of the 3D scanned face and the head surface constructed from the MR images is visualized in figure 4. Inaccuracies of the co-registration were focused on soft tissues and mutable parts in lower face.The mean distances between the co-registered 3D scan and the MRI surface were 4.6 ± 1.7, 1.4 ± 0.4, and 1.4 ± 0.6 mm for the bottom, middle, and top segment of the face, respectively.For the nasal area, the distance was 0.5 ± 0.2 mm.

Sensitivity of the coil location on landmark accuracy
The norms of the Jacobian matrix for each participant are listed in table 2. The mean norm for location was 1.82, i.e. an error of 1 mm in the landmark points (Euclidean norm) can lead to approximately 1.8 mm error in the location of the coil center.The largest measured deviation was 18.7 mm, which could be then caused by a combined error of ∼10 mm in the landmark points.For a single landmark point this could mean a smaller error around 4 mm.For the rotation, the mean norm was 0.7°mm −1 .The largest deviation was 7°, which could likewise be caused by a combined landmark error of ∼10 mm.One-way ANOVA supports that the landmark point has a significant effect on the stretch level of the output vector (coil location) (F(2, 27) = [23.7],p < 0.005).When the coil is located closer to a landmark point, the vector is stretched more, e.g. the mislocation of the left pre-auricular point has the strongest effect to the error of the coil position.

Effect of coil location error on the magnetic field and induced electric field
The L2-norm relative error between the neuronavigated and scanned coil positions was 29% ± 16% for the induced electric field (err E ) and 33% ± 17% for the magnetic field (err B ) (table 3).The err E ranged from 9% to 51% and err B from 19% to 58%.There was a clear correlation between the coil distance and the err E (p < 0.005, r = 0.92).Linear regression for the relationship was D err 0.025 0.033, 5 where D is the coil distance in millimeters.
For the majority of the subjects, the cortical location of the E max did not change or changed less than 1 mm.However, for three subjects the distance between the E max locations on the cortex was notable, ranging from 11  Table 3. Column 1 and 2, the relative error in the induced electric field (err E ) and the magnetic field (err B ) from the change in position between the neuronavigated and 3D scanned coil.The third column presents the distance between the cortical locations with the maximum induced electric field magnitude with the two coil locations.Columns 4 and 5 present the maximum induced electric field magnitude on the cortex for neuronavigated and 3D scanned coil positions and columns 6 and 7, the induced electric field at cortical FDI location.
to 30 mm.There was no evidence for correlation between the E max cortical location distance and the error level (p = 0.29, r = 0.37).The total differences in electric fields are visualized in figure 5.The difference in the maximum electric field magnitudes were on average 43 V m −1 ranging from 6 to 153 V m −1 and the difference in electric field magnitudes at FDI cortical location were on average 33 V m −1 ranging from 10 to 101 V m −1 .

Discussion
We studied the accuracy of the three-point navigated TMS that is still a commonly used approach for neuronavigation (Souza et al 2018, Caulfield et al 2022, Matsuda et al 2023).We also performed computer simulations to detect its sensitivity to errors in landmark pointing.The landmark sensitivity simulations indicated that on average, the total error in the landmark points causes even a 1.8-fold error for the coil location.
The closer the landmark is to the coil, the bigger the impact of the error is.Similarly, the effect to the Euclidean rotation was 0.7°mm −1 .According to previous studies, the induced electric field is less sensitive to errors in orientation than location (Gomez et al 2021) and changes less than 10 degrees do not drastically alter the induced electric field (Janssen et al 2015).The measured mean Euclidean distance between the neuronavigated and scanned coil location was 10.2 mm and orientation difference in each direction was less than 3 degrees.The previous study of Nieminen et al (2022) reported the computer simulated coil position error to be about 4 mm, which is smaller than the result on this paper.However, their study based the size of the landmark pointing error on studies that use the average of the intersession group mean variability of the pointed locations to estimate the error (Schönfeldt-Lecuona et al 2005).This approach does not properly consider the error in trying to match the landmark point with the point in the MR image, which can be significant due to various factors.MRI is a crucial part in co-registration, and potentially a substantial error source.If the quality of the MR image is poor or the image is heavily distorted, it can cause inaccuracies in the landmark point matching.As the figure 4 shows, the surfaces from the MRI and the 3D scan are not a perfect copy of each other.Generally, the largest difference can be observed in the jaw region, as the jaw moves when changing from the MRI supine position to the sitting position in TMS.In addition, the cushioning pillows squeeze the cheeks during an MRI causing some differences especially in the middle facial area and ears.The ears are also susceptible to deformation caused by ear muffs, and the digitizer pen used in landmark pointing can press the soft tissue of the ears several millimeters.Slight changes in facial expression can also cause minor differences between the surfaces.To minimize the co-registration errors, it is important to consider which facial areas are prone to change when selecting the reference points.The best practice is to use clear targets that are as immutable as possible and are not affected by the measurement.No force should be applied when using the digitizer pen, the tip should only lightly touch the skin.
The coil misplacement has a great impact on the induced electric field, as the relative error in the electric field due to coil movement was on average 29% and up to 51%.It is much larger than other sources of error in TMS induced electric fields.For example, the numerical error causes an error smaller than 2% (Gomez et al 2020), a 20% change in conductivity values generates a 5% error (Saturnino et al 2019, Stenroos andKoponen 2019) and the accuracy of the MRI segmentation can cause a 15% error (Puonti et al 2020).Additionally, brain movement due to the different posture has only a small effect (Mikkonen and Laakso 2019).To reduce the error from coil misplacement to 10% or less, the navigation inaccuracy should not be larger than 2.6 mm, estimated using equation (5).This would require the landmark points to be placed with an approximately 1.5 mm accuracy, which cannot be easily achieved with a standard pointer tool.However, even though the severity of coil misplacement correlates with the relative error of the electric field, there is no correlation with movement of the field maximum.The cortex is a complex anatomy, and it seems probable that individual differences affect the field maximum location more than the coil placement.
The error in the induced electric field can have a significant effect on research where highly accurate individual cortical models are used.The more accurate the model is, the more the effect is emphasized.With precisely replicated anatomy, even a few millimeter error in coil location may alter the results, and the repercussion of a centimeter-scale error is even larger.One recent example is novel research estimating the locations that TMS activates in the brain with anatomically accurate dosimetric models (Bungert et al 2017, Laakso et al 2018, Aonuma et al 2018, Weise et al 2020, Kataja et al 2021, Numssen et al 2021).Including these models to the neuronavigation system used with TMS would provide more realistic electric field estimations, but the system is also more vulnerable to coil misplacement.
There are several potential methods to improve the accuracy of nTMS, but none are without limitations.The simplest method is to increase the number of anatomical landmark locations matched with the MR image and to complement it with a surface based approach by adding several hundred surface points for the co-registration.However, the surface based approach requires that the points are collected from a rigid scalp to ensure the optimal co-registration.In reality, the location is affected by the influence of soft skin, thick hair (e.g.braids) and different caps worn for example for TMS-EEG.Another option is to remove the markers from the neuronavigation and use computer-vision techniques to track the patientʼs head and the TMS coil (Matsuda et al 2023).This removes the inaccuracies from the misplacement of landmarks and the movement of the head marker.Yet, this technique relies on face detection and is vulnerable to changes in facial expression.
Our solution for minimizing the error in the TMS co-registration process is using a 3D scanner that can reliably locate the coil position relative to the head.The scanning eliminates the errors related to manual landmark pointing, and the actual co-registration is reliable and fairly straightforward by matching the two surfaces based on carefully chosen immutable parts of the head.Another advantage is that unlike methods requiring surface points on the scalp, this method is not affected by hair or electrode caps.The downside of the scanning is that it involves an extra step in the preparation procedure, lasting approximately one minute per scan, but one scan is sufficient.Other disadvantage is that the coil needs to be fixed during the scanning to prevent the movement that could ensue from a handheld coil.
3D scanning is also usable without additional neuronavigation and is not restricted to the head, but can be used with other body parts as well.Besides TMS, 3D scanning can be used in other applications such as transcranial direct current stimulation (tDCS) to verify the location of the electrodes.

Conclusion
TMS neuronavigation with three landmark point co-registration has inaccuracies that could hinder research with highly accurate individual cortical models.The error in landmark pointing causes a severalfold misplacement of the coil location, which can be a major source of error in accurate electric field calculations.Complementing the procedure with 3D scanning provides a reliable way to record the actual coil location for the induced field.

Figure 1 .
Figure 1.(A) T1-and T2-weighted MRI was used to generate a surface model of the head.(B) Pre-marked landmark points on nasion and both ears (black dots) on the surface head model aided the digitization process with the pointer tool.(C) Coil position on the head was recorded by neuronavigation with optical tracker and by a 3D scan during 0% intensity TMS pulse.Neuronavigated coil is visualized with the MRI surface model of the head.

Figure 2 .
Figure 2. 3D scanned head and coil matched with the MR image of the head and the neuronavigated coil with two example subjects.(A) Co-registration of the 3D scan (blue) to the MR image of the head (gray) and the neuronavigated coil (orange).The extracted facial area around the nose used for the co-registration is marked with a black border line.(B) Co-registered 3D scans on the MRI surface model of the head and the neuronavigated coil.(C) Modeled coil co-registered with the 3D scanned coil to provide a complete structure of the coil.(D) Neuronavigated (orange) and 3D scanned (blue) coil locations visualized with modeled coil at their corresponding locations.

Figure 3 .
Figure3.The axes of the TMS coil and the head.Yaw axis is perpendicular to the round wings, pitch axis is parallel to the wings and the roll axis is parallel to the coil handle.X, Y, and Z components are defined as the coordinates in left-right, posterior-anterior, and inferior-superior directions on the head.

Figure 4 .
Figure 4. Distances between the co-registered 3D scan and the head surface model reconstructed from MR images.(A) Boxplot visualization of the mean distances (mm) in different facial areas.Graphs represent the minimum, maximum, median, first quartile and third quartile in the data set.(B) The measured distances of two participants visualized on 3D scan over the head models.Facial areas are bordered with black lines.

Figure 5 .
Figure 5. Induced electric fields for neuronavigated (E nav ) and 3D scanned (E scan ) coil position and their subtraction (ΔE) on individual cortices for each subject.Locations of the electric field maximums are marked with black and white circles, and the number indicates the magnitude of the electric field in that location.

Table 1 .
Distance and rotation between the neuronavigated and the 3D scanned coil positions.

Table 2 .
The norm of a Jacobian matrix for the coil location and rotation.The value indicates the maximum scale by which the mislocation of the landmark points can stretch the error in coil position.For the location, the scale is presented for the total mislocation of all three landmarks as well as for each landmark separately.