bioRxivNeurosciencePreprint
Automated extraction of electrode coordinates from structural MRI to assess tDCS placement accuracy
Sina StraubiD, Raphaela SchöpferiD, Sarah Godehardt, Florian WüthrichiD, Jessica PeteriD
Abstract
Accurate electrode placement is essential for studies using transcranial direct current stimulation (tDCS) since it determines whether - and to what extent - the intended brain region was modulated. Using in-scanner tDCS, placement accuracy can be determined by extracting electrode coordinates from structural MRI and by comparing actual and intended positions. Previous studies extracted coordinates manually, which is time-consuming and prone to error. Here, we present an algorithm to automate this process. The proposed algorithm first segments electrode and electrode-gel blobs visible on MRI. It then separates this segmentation into individual electrode regions and extracts their coordinates as the centroids of these regions. Finally, coordinates are assigned to the intended target positions using linear assignment. We evaluated the algorithm with T1-weighted MRI data from 65 individuals acquired at diferent scanners with diferent magnetic field strengths, image resolutions, and two high-definition montages by comparing the extracted coordinates with manual annotations from two independent readers. The median localization error of the algorithm was 2.4 mm (IQR 1.5 mm). The median variability between human readers was 2.7 mm (IQR 1.7 mm). Distances between algorithm-derived coordinates and the reference were smaller than distances between readers. Our proposed algorithm obviates the need for manual electrode segmentation and allows an objective evaluation of electrode placement accuracy for in-scanner tDCS. It may be used to relate electrode position errors to stimulation efects.
- Citations
- 0
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Deep learning to overcome human error and bias in electrode position extraction in tDCS-fMRI studies
Filip Niemann, Steffen Riemann, … Marcus Meinzer·bioRxiv·Dec 25, 2025
- The impact of brain lesions on tDCS-induced electric field magnitude
Ainslie Johnstone, Catharina Zich, … Sven Bestmann·bioRxiv·Mar 19, 2021
- Transcranial Electrical Stimulation Motor Threshold Combined with Reverse-Calculated Electric Field Modeling Can Determine Individualized tDCS Dosage
Kevin A. Caulfield, Bashar W. Badran, … Mark S. George·bioRxiv·Oct 11, 2019
- Optimizing transcranial direct current stimulation (tDCS) electrode position, size, and distance doubles the on-target cortical electric field: Evidence from 3000 Human Connectome Project models
Kevin A. Caulfield, Mark S. George·bioRxiv·Nov 21, 2021
- Harmonizing the stimulation dose of focal tDCS across target sites
Axel Thielscher, Dayana Hayek, … Daria Antonenko·bioRxiv·Jan 10, 2026
- Quantitative Impact of Coil Misalignment and Misplacement in Transcranial Magnetic Stimulation
Max Koehler, Thomas Kammer, Stefan M. Goetz·bioRxiv·Nov 18, 2023