Skip to content

Instantly share code, notes, and snippets.

@alexrockhill
Last active August 19, 2021 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexrockhill/6428d3b1c54109780cfb6623936898d4 to your computer and use it in GitHub Desktop.
Save alexrockhill/6428d3b1c54109780cfb6623936898d4 to your computer and use it in GitHub Desktop.
Google Summer of Code Alex Rockhill iEEG GUI Project Final Report

My GSoC project to make a graphical user interface (GUI) to locate the positions of electrical recording contacts inside a patient's head who has been implanted with intracranial electrodes was a huge success.

I started by developing the accompanying routines to prepare the input data and process the data once the GUI has been used first. This process is described here:

https://mne.tools/dev/auto_tutorials/clinical/10_ieeg_localize.html

The pull requests (PRs) that contributed to this development are here:

mne-tools/mne-python#9484 mne-tools/mne-python#9544 mne-tools/mne-python#9601

These were also accompanied by maintenance PRs to the MNE-Python repository as a whole which improved its overall organization and function and were part and parcel with the tutorial changes:

mne-tools/mne-python#9480 mne-tools/mne-python#9543 mne-tools/mne-python#9574 mne-tools/mne-python#9598 mne-tools/mne-python#9599 mne-tools/mne-python#9601 mne-tools/mne-python#9617 mne-tools/mne-python#9618 mne-tools/mne-python#9622 mne-tools/mne-python#9625 mne-tools/mne-python#9630

In brief, this allowed users who had collected intracranial electrophysiology data to take a computed tomography (CT) scan with electrode contacts appearing as hyperintensities, align it to a magnetic resonance (MR) image and then compute a morph mapping from the patient's brain to a template brain (a brain made of the average of many different MR scans so as to be somewhat representative of an average brain). The many helper PRs reorganized image processing scripts, fixed naming consistency, removed redundancy in documentation and refactored many of the 3D plotting aspects that were used in the tutorials.

Once the accompanying routines were completed, the GUI PR was the main focus:

mne-tools/mne-python#9586

The main GUI implements a novel automatic contact finding algorithm, specifically developed for identifying many stereo-electrodes in lines (previous algorithms have been developed for grid electrodes) and is a clean and well-tested interface for locating intracranial contacts that is up to professional development standards.

The GUI works and is fully functional and can be installed by following the previously mentioned tutorial (https://mne.tools/dev/auto_tutorials/clinical/10_ieeg_localize.html) after installing MNE (https://mne.tools/dev/install/mne_python.html). The next steps are to improve the algorithm to reduce the number of false-positives and missed contacts, improve the user interface to have better flow, integrate it into Juptyer Notebook, and continue support as MNE users process their data using this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment