iEEG Contact Localization (UNDER CONSTRUCTION)

Authors: Chinmay Chinara, Raymundo Cassani, Takfarinas Medani, Anand Joshi.

THIS TUTORIAL CURRENTLY COVERS SEEG STUDY ONLY. ECOG STUDY IS UNDER WORKS AND WILL BE MERGED HERE VERY SOON.

Detection, localization and labeling of SEEG depth electrodes is a vital step in studying brain activity.

Note that the operations used here are not detailed, the goal of this tutorial is not to introduce Brainstorm to new users. For in-depth explanations of the interface and theoretical foundations, please refer to the introduction tutorials.

NOT FOR CLINICAL USE:
The performance characteristics of the methods and software implementation presented in this tutorial have not been certified as medical devices and should be used for research purposes only.

Dataset description

SEEG recordings

[ATTACH]

The depth electrodes used in this example dataset are PMT SEEG Depth Electrodes, with the following specifications:

Files

tutorial_seeg_implantation/

Download and installation

Import the anatomy

Pre-implantation MRI

Post-implantation CT

Generate isoSurface

This creates a thresholded mesh from the CT to separate the contacts out from rest of the CT. This aids the user towards localization of the electrodes and its contacts more accurately.

  • Right click on postCT > CT segmentation > Generate threshold mesh from CT.

    [ATTACH]

  • This will bring the Generate isosurface window. This window shows 4 things in Hounsfield Unit (HU) i.e. the Background level, the White level, the Max Intensity and the Set isoValue field. The first 3 values are calculated automatically from the histogram of the CT and is displayed for reference. This is to help the user to decide on what to set the isoValue for getting a good thresholded mesh. Another way is to refer to the Wiki. The editable isoValue field shows an estimated best guess based on mean of White Level and Max Intensity. Just let that value be and press OK.

    [ATTACH]

  • An isosurface is generated showing the contact as blobs overlayed on the 3D MRI slices. The Thresh slider under Surface options can be used to fine tune and regenerate mesh with different isoValues.

    [ATTACH]

Electrode labelling and contact localization

Get started

  • Right click on postCT, and choose SEEG/ECOG implantation. This takes you to the functional tab and Subject01 > Implantation > SEEG/ECOG (0) channel gets created. Also the MRI Viewer with the CT loaded and 3D Viz with the isoSurface+3D MRI Slices loaded opens up along with the Panel iEEG. Move around the 3D slices to get a clear view of the contacts so that they can be clicked on. This section explains the controls.

    [ATTACH]

Panel iEEG

Create electrodes and plot contacts manually

  • After performing steps as per Get Started, we will have the Panel iEEG along with the MRI Viewer and 3D Viz open.

  • On Panel iEEG Click on the + (Add new electrode). This opens up the Add electrode window. Enter anything under Electrode label based on your convention. For this e.g., enter A and press OK.

    [ATTACH]

  • This creates an electrode A in selected state, and at the bottom the Electrode configuration section of the panel becomes active. Select the following:

    • Type: SEEG

    • Model: Choose PMT 2102-16-091/2102-16-101 from the drop down list. This will automatically set the other parameters in the section. More details for these parameters can be found in the advanced section here.

      [ATTACH]

  • Set tip: Click the [ATTACH] button (shortcut: Ctrl+P) and choose the contact (deepest contact) for the electrode in the isosurface in 3D Viz which is going to be set as the tip. This should plot a yellow crosshair marker point on the blob and also update the MRI Viewer's crosshair. At the bottom in Panel iEEG click Set tip and the button turns green indicating that the tip has been set. This point in 3D is at the centroid of the blob which gives a more accurate location of the contact compared to the same if chosen from the MRI.

Note: You can play around with the "Thresh" slider as mentioned here to get better visibility of the contacts as required

[ATTACH] [ATTACH]

  • Set skull entry: Choose the point in the isosurface in 3D Viz which is going to be set as the skull entry. This point can be any of the contacts other than the tip preferably closer to the skull so that we get an orientation of the electrode. This should plot a yellow crosshair marker point on the blob and also update the MRI Viewer's crosshair. At the bottom in Panel iEEG click Set skull entry and the button turns green indicating that the entry point has been set. The properties used for setting the position of the contacts are the contact spacing, the tip of the electrode and the entry point in the skull. Contact #i is placed along the electrode at (i-1)*contact_spacing millimeters from the tip of the electrode. The MRI Viewer gets updated with the an electrode based on the above configuration. Some more fine tuning may be required and user might need to edit the individual contacts. This section explains it in details.

Note: You can play around with the "Thresh" slider as mentioned here to get better visibility of the contacts as required

[ATTACH]

  • Click on Contacts > Save Modifications to update the channel information.

    [ATTACH] [ATTACH]

  • When you are done with everything, click on Save in the MRI Viewer. It saves the new channel file and updates the number of channels in the database explorer. Also, while closing the windows a prompt appears asking to save the changes. Just click Yes for everything.

Edit contact positions

Until now, the electrode is always assumed to follow a straight path but practically that is not the case as there could be bending introduced when the neurosurgeon inserts the electrode. In such cases we need to move most of the intermediate contacts to more appropriate positions.

Let's take the case of a curved electrode. You can toggle between the electrode and sphere views to get the figures as under using buttons in Panel iEEG. Keep it in the sphere mode for better visibility. The contacts definitely need to be corrected and moved to their right positions.

[ATTACH]

  • Click on the individual contacts (in green) in the 3D Viz and it highlights the corresponding location in MRI Viewer and also the panel. You can display the contact labels in 3D Viz by right clicking Channels > Display labels.

    [ATTACH]

  • From the above it is clear that contacts beyond A1 are not correct. But the isosurface blobs are the correct ones. Like we did for setting the tip and entry above, we go to Panel Coordinates and click on Select and then choose the correct blob. That places a cross hair and updates the MRI Viewer as well. Here we are correcting contact A2.

    [ATTACH]

  • In the MRI Viewer, right click and go to Electrodes > Set electrode position (or press Ctrl+S). From the Set electrode position window choose A2 and press OK.

    [ATTACH]

  • This updates the position of contact A2 in the MRI viewer. Click on Save and it closes all the windows and updates the channel file and number of channels in the database explorer.

    [ATTACH]

  • Double click on the SEEG/ECOG() channel file under Implantaion node to open the updated 3D Viz as under. You can also right click on the SEEG/ECOG() channel file and under Display Sensors you can choose what all you want to display.

    [ATTACH]

  • Follow the above steps to update all the remaining contacts as required. Unfortunately, Brainstorm currently does not have a way to handle curved electrodes display yet: if you move the contacts, the electrode remains represented as a straight line (left figure). This is a display issue only, which has no impact on any computation, but we hope to improve it at some point. However, we have a functionality called line fitting under Contacts > Line fit through contacts that can help better approximate and view the trajectory in the 3D Viz with sphere display mode (right figure).

    [ATTACH]

Walkthrough Video

Advanced

Additional documentation

Tutorials/IeegContactLocalization (last edited 2024-04-29 07:22:52 by ChinmayChinara)