Size: 102
Comment:
|
Size: 20564
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
''Authors: Chinmay Chinara, Takfarinas Medani.'' | ''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. This tutorial can be considered as a precursor to the [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity|Epileptogenicity]] tutorial. 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 [[http://neuroimage.usc.edu/brainstorm/Tutorials#Get_started|introduction tutorials]]. __'''NOT FOR CLINICAL USE'''__:<<BR>>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. <<TableOfContents(3,2)>> == Download and installation == * '''Requirements''': You have already followed all the introduction tutorials and you have a working copy of Brainstorm installed on your computer. * '''BrainSuite''': Make sure you have the latest version of BrainSuite installed. Follow steps as per [[https://neuroimage.usc.edu/brainstorm/Tutorials/SegBrainSuite#Installation|Installation]] here. This is required to perform [[https://brainsuite.org/processing/surfaceextraction/bse/|skull stripping]] when importing CT below in order to mask out regions outside the skull. * '''SPM''': If you are running Brainstorm from the MATLAB environment, you need to have the SPM12 toolbox installed on your computer, as a [[https://neuroimage.usc.edu/brainstorm/Tutorials/Plugins|Brainstorm plugin]] or a custom installation. <<BR>>With the stand-alone compiled version of Brainstorm: all the needed SPM scripts have been compiled and included in the executable. * '''ct2mrireg''': If you are running Brainstorm from the MATLAB environment, for the coregistration between pre-implantation MRI and post-implantation CT volumes, you need to have the '''ct2mrireg''' plugin installed on your computer, as a [[https://neuroimage.usc.edu/brainstorm/Tutorials/Plugins|Brainstorm plugin]]. It can be found under the menu '''Plugins > Anatomy > ct2mrireg'''. * '''Download the dataset''': * Go to the [[http://neuroimage.usc.edu/bst/download.php|Download]] page of this website, and download the file: '''tutorial_seeg_implantation.zip'''. * Unzip it in a folder that is not in any of the Brainstorm folders (program folder or database folder). * '''Brainstorm''': * Start Brainstorm (MATLAB scripts or stand-alone version). * Select the menu '''File > Create new protocol'''. Name it "'''TutorialSeegImplantation'''" and select the options: <<BR>>"'''No, use individual anatomy'''",<<BR>>"'''No, use one channel file per acquisition run'''". == Import the anatomy == === Pre-implantation MRI === * Right-click on the TutorialSeegImplantation folder > '''New subject''' > '''Subject01'''.<<BR>>Keep the default options you defined for the protocol. * Switch to the '''Anatomy''' view of the protocol. * Right-click on the subject node > '''Import MRI''':<<BR>>Set the file format: "All MRI file (subject space)"<<BR>>Select: '''tutorial_seeg_implantation/preMRI.nii''' * Do you want to apply the transformation to the MRI file? '''YES''' * The MRI viewer opens automatically. * Click on "[[http://neuroimage.usc.edu/brainstorm/Tutorials/ImportAnatomy#MNI_normalization|Click here to compute MNI normalization]]", option "'''maff8'''". This method is embedded in Brainstorm and does not require the installation of SPM12. However, it requires the automatic download of the file SPM12 Tissue Probability Maps. If you do not have access to internet, see the instructions on the [[https://neuroimage.usc.edu/brainstorm/Installation#No_internet_access|Installation]] page. It is based on an affine co-registration with the MNI ICBM152 template from the SPM software, described in the following article: Ashburner J, Friston KJ, [[http://www.ncbi.nlm.nih.gov/pubmed/15955494|Unified segmentation]], NeuroImage 2005.. <<BR>><<BR>> {{attachment:1-2.gif}} * Click on '''Save''' to close the MRI viewer. * Rename the new file: '''preMRI'''. <<BR>><<BR>> {{attachment:3.gif}} === Post-implantation CT === * The pre-implantation MRI will be used as the anatomical reference for this subject. We will now import a second scan done after the SEEG implantation, on which we can see the SEEG contacts. In this dataset, the post-implantation volume is a CT scan (contacts hypersignal appear in white). * Right-click on the subject node > '''Import CT''':<<BR>>Select: '''tutorial_seeg_implantation/postCT.nii''' * Follow steps [[https://neuroimage.usc.edu/brainstorm/Tutorials/ImportAnatomy#Import_CT|here]] to complete the process on importing a CT. * The MRI viewer opens automatically, showing the post-implantation CT volume as a colored layer on top of the previous volume. Adjust the transparency and amplitude threshold of this layer in the section '''Data options''' of the '''Surface '''tab, adjust its [[Tutorials/Colormaps|colormap]] with the popup menu of the figure. Use this display to validate that the coregistration of the two volume is correct, all the parts of the head must align well. <<BR>><<BR>> {{attachment:4.gif}} * Rename the new file: '''postCT'''.<<BR>><<BR>> {{attachment:5.png}} === 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'''.<<BR>><<BR>> {{attachment:6.png}} * 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 [[https://en.wikipedia.org/wiki/Hounsfield_scale|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'''.<<BR>><<BR>> {{attachment:7.png}} * 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.<<BR>><<BR>> {{attachment:8.png}} == 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. [[https://neuroimage.usc.edu/brainstorm/Tutorials/ExploreAnatomy#MRI_in_3D|This section]] explains the controls. <<BR>><<BR>> {{attachment:9.png}} === Panel iEEG === * When opening SEEG/ECOG recordings, the panel iEEG is added to the Brainstorm window. You can use it to edit the display properties of the depth electrodes. In this interface, "'''electrode'''" refers to entire depth electrode implanted in the head of the patient while "'''contact'''" refers to recording sites on the electrode. There are multiple contacts on an electrode, and one contact corresponds to one channel of data in the channel file and the recordings. <<BR>><<BR>> {{attachment:10.png}} * SEEG depth electrodes are graphical objects, they are defined independently from the SEEG contacts available in the channel file and recordings. A contact/channel is associated to a depth electrode using the '''Group''' property of the channel, accessible with a right-click on the channel file > '''Edit channel file'''. * In this example, the depth electrodes available in the Panel iEEG have been manually set by using this Panel features. In the convention used here, the contact names must start with one or more letters (the name of the electrode) followed by a number representing the index of the contact on the electrode. '''Contact #1''' is at the tip of the electrode, and is therefore the deeper contact of the electrode. If the convention used in your recordings is different, you may have to edit the electrodes properties in order to get them displayed correctly. * Buttons in the toolbar: * ''' {{attachment:iconPlus.gif}} (Add new electrode)''': Adds an entry for a new depth electrode. The new electrode will not be displayed until you set its properties and position. This will not add or remove SEEG contacts or channels of data. * ''' {{attachment:iconMinus.gif}} (Remove selected electrodes)''': Deletes a depth electrode from the list, but does not modify the list of SEEG contacts or channels of data. * ''' {{attachment:iconColorSelection.gif}} (Set color for selected electrodes)''': Self explanatory. * ''' {{attachment:iconDisplay.gif}} (Show/hide selected electrodes)''': To hide an electrode in the 3D figures and MRI viewer, select it in the list then click on this button. Select all the electrodes with the standard shortcut Ctrl+A. * '''Display contacts as''': {{attachment:iconSeegDepth.gif}} (Depth electrodes) / {{attachment:iconSeegSphere.gif}} (Spheres). * '''Contacts > Set default positions''': For each of the selected electrodes, the current positions of the SEEG contacts are discarded and replaced with the default positions of the contacts on the electrode. 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. * '''Contacts > Project on electrode''': For each of the selected electrodes, the contacts are projected orthogonally on the electrode. This menu can be useful for aligning contacts that were marked one by one. * '''Contacts > Line fit through contacts''': Performs line fitting through the contacts in 3D Viz. * '''Contacts > Save modifications''': Save the current modifications to the channel file. Otherwise, the modifications are saved only when you close the figure (dialog box "Save modifications to channel file?") * '''Contacts > Export contacts positions''': Save the 3D positions of the SEEG contacts in a text file, using one of the file formats supported by Brainstorm. * Electrode properties: ''Properties that have an impact on the position of the contacts''.<<BR>> * If you edit the properties, the modifications will apply to all the selected electrodes in the current channel file. Check what is selected before making changes. * '''Type''': SEEG/ECOG * '''Model''': List of electrode models. If you select an entry in this menu, it will copy the default properties for this model to the selected electrodes. If you are using electrodes that are not in this list, please post on the specification of your devices on the user forum and we will add them to this list. * '''Number of contacts''': Number of recording sites on the electrode. By default, this is set for SEEG to the maximum index found in a group of contacts. Example: electrode s' is associated to channels s'1, s'2, s'3, s'10, s'11, s'12 => detected number of contacts is 12. * '''Contact spacing''': Distance between the centers of two consecutive contacts in the electrode. In this example dataset, the default value corresponds to the average distance observed between pairs of adjacent contacts. * '''Set tip''': Select one electrode in the list, then move the cursor of the MRI viewer to the tip of the selected electrode (center of the first contact) or choose the contact from the isoSurface in the 3D Viz and finally click on [Set tip]. * '''Set skull entry''': Select one electrode in the list, then move the cursor of the MRI viewer to the point where the depth electrode enters the skull or choose the point from the isoSurface in the 3D Viz, and finally click on [Set skull entry]. This position does not actually correspond to any contact, it is used only to estimate the direction of the depth electrode. [[http://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Edit_the_contacts_positions|More details]]. * Display options: Properties that only affect the way the electrodes are renderer graphically. * '''Contact length''': Defines the length of the yellow cylinder that represents the contacts along the electrode axis, or the diameter of the sphere when the electrodes are not rendered. * '''Contact diameter''': Diameter of the yellow cylinders representing the contacts. By default, this value is slightly larger than the electrode diameter so that it is rendered correctly. If you use the same value as the electrode diameter, the contacts might not be visible. * '''Electrode diameter''': Diameter of the cylinder representing the SEEG depth electrode. * '''Electrode length''': Length of the cylinder representing the SEEG depth electrode. === Create electrodes and plot contacts manually === * After performing steps as per [[https://neuroimage.usc.edu/brainstorm/Tutorials/IeegContactLocalization#Get_started|Get Started]], we will have the Panel iEEG along with the MRI Viewer and 3D Viz open. * Click the '''+''' icon from the list of panel tab and choose '''Add: Coordinates'''. This adds the '''Panel Coordinates''' which will be used to select points from the 3D Viz.<<BR>><<BR>> {{attachment:11.png}} * 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'''.<<BR>><<BR>> {{attachment:12.png}} * 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 [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#On_the_hard_drive|here]].<<BR>><<BR>> {{attachment:13.png}} * '''Set tip''': Switch to '''Panel Coordinates''', click '''Select''' 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 [[https://neuroimage.usc.edu/brainstorm/Tutorials/IeegContactLocalization#Generate_isoSurface|here]] to get better visibility of the contacts as required'''<<BR>><<BR>> {{attachment:14.png}} {{attachment:15.png}} * '''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. [[https://neuroimage.usc.edu/brainstorm/Tutorials/IeegContactLocalization#Edit_contact_positions|This section]] explains it in details. '''Note: You can play around with the "Thresh" slider as mentioned [[https://neuroimage.usc.edu/brainstorm/Tutorials/IeegContactLocalization#Generate_isoSurface|here]] to get better visibility of the contacts as required'''<<BR>><<BR>> {{attachment:16.png}} * Click on '''Contacts > Save Modifications''' to update the channel information. And then double click the '''SEEG/ECOG()''' channel under Implantation node to update the 3D Viz.<<BR>><<BR>> {{attachment:17.png}} {{attachment:18.png}} * 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. === 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. <<BR>><<BR>> {{attachment:19.png}} * Click on the individual contacts (in green) in the 3D Viz and it highlights the corresponding location in MRI Viewer and also the panel.<<BR>><<BR>> {{attachment:20.png}} * 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'''.<<BR>><<BR>> {{attachment:21.png}} * 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'''.<<BR>><<BR>> {{attachment:22.png}} * 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.<<BR>><<BR>> {{attachment:23.png}} * 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.<<BR>><<BR>> {{attachment:24.png}} * 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).<<BR>><<BR>> {{attachment:25.png}} <<TAG(Advanced)>> == Additional documentation == ==== Related tutorials ==== * [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity|Epileptogenicity]] * [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy|EEG/Epilepsy tutorial]] * [[https://neuroimage.usc.edu/brainstorm/Tutorials/ECoG|ECoG/sEEG tutorial]] |
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. This tutorial can be considered as a precursor to the Epileptogenicity tutorial.
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.
Contents
Download and installation
Requirements: You have already followed all the introduction tutorials and you have a working copy of Brainstorm installed on your computer.
BrainSuite: Make sure you have the latest version of BrainSuite installed. Follow steps as per Installation here. This is required to perform skull stripping when importing CT below in order to mask out regions outside the skull.
SPM: If you are running Brainstorm from the MATLAB environment, you need to have the SPM12 toolbox installed on your computer, as a Brainstorm plugin or a custom installation.
With the stand-alone compiled version of Brainstorm: all the needed SPM scripts have been compiled and included in the executable.ct2mrireg: If you are running Brainstorm from the MATLAB environment, for the coregistration between pre-implantation MRI and post-implantation CT volumes, you need to have the ct2mrireg plugin installed on your computer, as a Brainstorm plugin. It can be found under the menu Plugins > Anatomy > ct2mrireg.
Download the dataset:
Go to the Download page of this website, and download the file: tutorial_seeg_implantation.zip.
- Unzip it in a folder that is not in any of the Brainstorm folders (program folder or database folder).
Brainstorm:
- Start Brainstorm (MATLAB scripts or stand-alone version).
Select the menu File > Create new protocol. Name it "TutorialSeegImplantation" and select the options:
"No, use individual anatomy",
"No, use one channel file per acquisition run".
Import the anatomy
Pre-implantation MRI
Right-click on the TutorialSeegImplantation folder > New subject > Subject01.
Keep the default options you defined for the protocol.Switch to the Anatomy view of the protocol.
Right-click on the subject node > Import MRI:
Set the file format: "All MRI file (subject space)"
Select: tutorial_seeg_implantation/preMRI.niiDo you want to apply the transformation to the MRI file? YES
The MRI viewer opens automatically. * Click on "Click here to compute MNI normalization", option "maff8". This method is embedded in Brainstorm and does not require the installation of SPM12. However, it requires the automatic download of the file SPM12 Tissue Probability Maps. If you do not have access to internet, see the instructions on the Installation page. It is based on an affine co-registration with the MNI ICBM152 template from the SPM software, described in the following article: Ashburner J, Friston KJ, Unified segmentation, NeuroImage 2005..
Click on Save to close the MRI viewer.
Post-implantation CT
- The pre-implantation MRI will be used as the anatomical reference for this subject. We will now import a second scan done after the SEEG implantation, on which we can see the SEEG contacts. In this dataset, the post-implantation volume is a CT scan (contacts hypersignal appear in white).
Right-click on the subject node > Import CT:
Select: tutorial_seeg_implantation/postCT.niiFollow steps here to complete the process on importing a CT.
The MRI viewer opens automatically, showing the post-implantation CT volume as a colored layer on top of the previous volume. Adjust the transparency and amplitude threshold of this layer in the section Data options of the Surface tab, adjust its colormap with the popup menu of the figure. Use this display to validate that the coregistration of the two volume is correct, all the parts of the head must align well.
Rename the new file: postCT.
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.
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.
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.
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.
Panel iEEG
When opening SEEG/ECOG recordings, the panel iEEG is added to the Brainstorm window. You can use it to edit the display properties of the depth electrodes. In this interface, "electrode" refers to entire depth electrode implanted in the head of the patient while "contact" refers to recording sites on the electrode. There are multiple contacts on an electrode, and one contact corresponds to one channel of data in the channel file and the recordings.
SEEG depth electrodes are graphical objects, they are defined independently from the SEEG contacts available in the channel file and recordings. A contact/channel is associated to a depth electrode using the Group property of the channel, accessible with a right-click on the channel file > Edit channel file.
In this example, the depth electrodes available in the Panel iEEG have been manually set by using this Panel features. In the convention used here, the contact names must start with one or more letters (the name of the electrode) followed by a number representing the index of the contact on the electrode. Contact #1 is at the tip of the electrode, and is therefore the deeper contact of the electrode. If the convention used in your recordings is different, you may have to edit the electrodes properties in order to get them displayed correctly.
- Buttons in the toolbar:
(Add new electrode): Adds an entry for a new depth electrode. The new electrode will not be displayed until you set its properties and position. This will not add or remove SEEG contacts or channels of data.
(Remove selected electrodes): Deletes a depth electrode from the list, but does not modify the list of SEEG contacts or channels of data.
(Set color for selected electrodes): Self explanatory.
(Show/hide selected electrodes): To hide an electrode in the 3D figures and MRI viewer, select it in the list then click on this button. Select all the electrodes with the standard shortcut Ctrl+A.
Display contacts as:
(Depth electrodes) /
(Spheres).
Contacts > Set default positions: For each of the selected electrodes, the current positions of the SEEG contacts are discarded and replaced with the default positions of the contacts on the electrode. 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.
Contacts > Project on electrode: For each of the selected electrodes, the contacts are projected orthogonally on the electrode. This menu can be useful for aligning contacts that were marked one by one.
Contacts > Line fit through contacts: Performs line fitting through the contacts in 3D Viz.
Contacts > Save modifications: Save the current modifications to the channel file. Otherwise, the modifications are saved only when you close the figure (dialog box "Save modifications to channel file?")
Contacts > Export contacts positions: Save the 3D positions of the SEEG contacts in a text file, using one of the file formats supported by Brainstorm.
Electrode properties: Properties that have an impact on the position of the contacts.
- If you edit the properties, the modifications will apply to all the selected electrodes in the current channel file. Check what is selected before making changes.
Type: SEEG/ECOG
Model: List of electrode models. If you select an entry in this menu, it will copy the default properties for this model to the selected electrodes. If you are using electrodes that are not in this list, please post on the specification of your devices on the user forum and we will add them to this list.
Number of contacts: Number of recording sites on the electrode. By default, this is set for SEEG to the maximum index found in a group of contacts. Example: electrode s' is associated to channels s'1, s'2, s'3, s'10, s'11, s'12 => detected number of contacts is 12.
Contact spacing: Distance between the centers of two consecutive contacts in the electrode. In this example dataset, the default value corresponds to the average distance observed between pairs of adjacent contacts.
Set tip: Select one electrode in the list, then move the cursor of the MRI viewer to the tip of the selected electrode (center of the first contact) or choose the contact from the isoSurface in the 3D Viz and finally click on [Set tip].
Set skull entry: Select one electrode in the list, then move the cursor of the MRI viewer to the point where the depth electrode enters the skull or choose the point from the isoSurface in the 3D Viz, and finally click on [Set skull entry]. This position does not actually correspond to any contact, it is used only to estimate the direction of the depth electrode. More details.
- Display options: Properties that only affect the way the electrodes are renderer graphically.
Contact length: Defines the length of the yellow cylinder that represents the contacts along the electrode axis, or the diameter of the sphere when the electrodes are not rendered.
Contact diameter: Diameter of the yellow cylinders representing the contacts. By default, this value is slightly larger than the electrode diameter so that it is rendered correctly. If you use the same value as the electrode diameter, the contacts might not be visible.
Electrode diameter: Diameter of the cylinder representing the SEEG depth electrode.
Electrode length: Length of the cylinder representing the SEEG depth electrode.
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.
Click the + icon from the list of panel tab and choose Add: Coordinates. This adds the Panel Coordinates which will be used to select points from the 3D Viz.
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.
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.
Set tip: Switch to Panel Coordinates, click Select 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
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
Click on Contacts > Save Modifications to update the channel information. And then double click the SEEG/ECOG() channel under Implantation node to update the 3D Viz.
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.
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.
Click on the individual contacts (in green) in the 3D Viz and it highlights the corresponding location in MRI Viewer and also the panel.
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.
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.
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.
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.
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).
Additional documentation