Size: 253
Comment:
|
Size: 18702
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
''Author: ***'' | ''Authors: Yash Shashank Vakilna, Chinmay Chinara, Johnson Hampson, Takfarinas Medani, Raymundo Cassani, John Mosher, Sylvain Baillet, Richard Leahy'' '''TODO: Add flowchart''' Brainstorm allows to creation and annotation of intracranial electrodes and contacts. Users can also then export these as a text file with all the positions that can be used in Brainstorm or any other program. |
Line 7: | Line 11: |
This creates a thresholded mesh from the CT by separating the contacts out from rest of the CT. This aids the user towards localization of the electrodes and its contacts more accurately. * The first thing required is to define a good threshold (which we call '''isoValue''') that will separate out the contacts from the rest of the CT. Just open the CT file (by double clicking on it), click on the '''MIP: Functional''' in the MRI Viewer, use the '''Data Options > Amplitude''' slider in the '''Surface''' tab to browse through the threshold, and once you are satisfied with getting a good separation of the contacts, hover on the slider to get the desired value and keep a note of it (to the nearest integer). In this case the value is '''2276'''. <<BR>><<BR>> {{attachment:8_choose_isovalue.png||width="500"}} * Right click on '''post_CT_spm_reslice_masked_spm> CT segmentation > Generate SEEG/ECoG isosurface'''.<<BR>><<BR>> {{attachment:9_isosurface_menu.png||width="350"}} * This will bring the '''Generate isosurface''' window. This window shows 4 values: the '''Background level''', '''White level''', '''Max Intensity''' and the suggested '''Set isoValue''', all of them given in the [[https://en.wikipedia.org/wiki/Hounsfield_scale|Hounsfield Unit (HU) scale]]. The first 3 values are calculated automatically from the histogram of the CT and are displayed for reference. The editable '''isoValue''' field shows an estimated best guess based on mean of White Level and Max Intensity. Since we got a better value in step-1 above, set the value to '''2276''' and press '''OK'''.<<BR>><<BR>> {{attachment:10_isosurface_popup.png||width="350"}} * An isosurface is generated showing the contact as blobs overlayed on the 3D MRI slices. The '''Thresh''' slider under '''Surface options''' can be further used to fine tune and regenerate mesh with different isoValues.<<BR>><<BR>> {{attachment:11_isosurface_display.png||width="650"}} == Start implantation == * Right click on '''Subject01''', and choose '''SEEG/ECOG implantation'''. * The '''SEEG/ECOG implantation''' menu pops to choose which modalities you want to use for doing your implantation with. <<BR>><<BR>> {{attachment:12_implant_menu.png||width="500"}} {{{#!wiki note '''`MRI`''': MRI viewer loads up with MRI volume only.<<BR>> '''`CT`''': MRI viewer loads up with CT volume only.<<BR>> '''`MRI+CT`''': MRI viewer loads up with the CT overlayed on the MRI.<<BR>> '''`MRI+CT+IsoSurf`''': MRI viewer loads up with the CT overlayed on the MRI. 3D figure loads up with the isosurface and 3D MRI slices. }}} * Choose '''MRI+CT+IsoSurf'''. This takes you to the functional tab. '''Subject01 > Implantation > SEEG/ECOG (0)''' channel gets created. All expected figures open up. '''Panel iEEG''' loads up in the panel viewer. Move around the 3D slices to get a clear view of the contacts so that they can be clicked on.<<BR>><<BR>> {{attachment:13_implant_setup.png||width="650"}} * To know more about the iEEG panel and its features go to [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Panel_iEEG|Epileptogenicity]] tutorial. === Panel iEEG === Move the section https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Panel_iEEG here. |
|
Line 9: | Line 35: |
{{{#!wiki important Before we start the implantation a prior knowledge of the implantation scheme is required in order to have the correct labels of the various electrodes used. One way here is to have a look at the recordings file and get a knowledge of that. Brainstorm matches the channel names to that of the recordings while [[https://neuroimage.usc.edu/brainstorm/Tutorials/SeizureFingerprinting#Import_the_contacts_positions|importing the positions]] to them. }}} * After performing steps above, we will have the Panel iEEG along with the MRI Viewer and 3D figure open. We will be working on the electrode marked below.<<BR>><<BR>> {{attachment:30_electrode_POP_labelled.png||width="500"}} * On Panel iEEG Click on the '''+ (Add new electrode)'''. This opens up the '''Add electrode''' window. For this e.g. enter '''POP''' (it is one of the electrodes in the recordings available in this tutorial data) and press '''OK'''. <<BR>><<BR>> {{attachment:31_add_electrode_ask.png||width="250"}} * This creates an electrode '''POP''' 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-093/2102-16-103''' 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:32_elec_pop_model.png||width="250"}} * '''Set tip''': Choose the location of the electrode's contact that is deepest in the brain. While we can use the MRI Viewer to set this location (as mentioned [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Edit_the_contacts_positions|here]]), but to get a more accurate location we will leverage the 3D isosurface as described below. * As seen in the first figure in this section, the tip contact blob is not well separated form its adjacent contact. As mentioned in the '''Generate isosurface''' section, switch to '''Surface''' tab, use the '''Thresh''' slider to adjust the isovalue to approximately '''3100''' and a readjusted isosurface will be generated that separates out the tip area contacts. <<BR>><<BR>> {{attachment:33_elec_pop_tip_separate.png||width="50"}} * Switch back to the '''iEEG''' tab, click the {{attachment:iconScoutNew.gif}} button (shortcut: Ctrl+P) to activate surface point selection mode. * Click on the {{attachment:iconGood.gif}} button to activate selecting centroid of the candidate contact blob in the isosurface. * Choose the tip contact in the readjusted 3D isosurface and this should plot a yellow crosshair marker point on the center of the blob and also update the MRI Viewer's crosshair. At the bottom in 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'''.<<BR>><<BR>> {{attachment:34_elec_pop_tip.png||width="650"}} * '''Set skull entry''': Choose the point in the 3D isosurface 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.<<BR>><<BR>> {{attachment:35_elec_pop_entry1.png||width="650"}} * At the bottom of iEEG tab, click '''Set skull entry''' and the button turns green indicating that the entry point has been set. All the figures get updated with the an electrode based on the above configuration. 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'''.<<BR>><<BR>> {{attachment:35_elec_pop_entry2.png||width="650"}} * Click on '''Contacts > Save Modifications''' to update the channel information in the database.<<BR>><<BR>> {{attachment:36_elec_pop_save.png||width="200"}} * Repeat the steps for creating implantations for all the other electrodes one by one and save the modifications. Each time you can see the channel file '''SEEG/ECOG''' being updated. * When you are done with everything, close all the figures and a prompt appears asking to save the changes. Just click '''Yes''' for everything. If all localized properly, the '''Implantation''' folder should now have channel file that defines the locations of all the '''230''' contacts. * To make this tutorial easier to reproduce and follow, we also distribute the positions of the contacts (that were localized using the steps above) [[https://neuroimage.usc.edu/brainstorm/Tutorials/SeizureFingerprinting#Export_the_contacts_position|exported as a .tsv file]]: '''tutorial_seizure_fingerprinting/recordings/Subject01_electrodes_mm.tsv'''. You can directly import them into the Implantation folder: * Right click on '''Implantation > Import channel file''', choose type as '''EEG: BIDS electrodes.tsv, subject space mm (*.tsv)''', browse and select the .tsv file, click '''Open''' * Set the scaling factor as '''1''' (the positions in this .tsv file are in millimeters, the expected unit for this file format is also millimeters, there is no adjustment to make here) * Set the import reference MRI as '''post_CT_spm_reslice_masked_spm''' (as the implantation was done on it) and press '''OK'''. * Select '''Yes''' to replace the existing channel file and all the 230 contacts are updated in the channel. We will use this to link to the recordings in the section below.<<BR>><<BR>> {{attachment:36_elec_pop_save1.png||width="200"}} |
|
Line 10: | Line 60: |
{{{#!wiki note In some cases, additional correction of the contacts may be required. To edit the individual contacts refer to the [[https://neuroimage.usc.edu/brainstorm/Tutorials/SeizureFingerprinting#Edit_the_contacts_positions|Edit the contacts positions]] advanced section. }}} |
|
Line 11: | Line 64: |
Link to all tutorials in Brainstorm that do automatic contact localization. For now only [[https://neuroimage.usc.edu/brainstorm/Tutorials/AutoContactLocalization|GARDEL]]> | |
Line 12: | Line 66: |
== Automatic labeling of contacts == | == Automatic anatomical labeling of contacts == Move the section https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Anatomical_labelling here. <<TAG(Advanced)>> == Edit the contacts positions == The trajectory of electrode while implantation may not always follow a straight line as there could be bending introduced when the neurosurgeon inserts the electrode. In such cases we need to move these contacts to more appropriate positions. * For this section we will consider one such electrode from our dataset above which is marked below. Switch to anatomy tab, open the isosurface file under '''Subject01''' and using the '''Thresh''' slider in the '''Surface''' tab set the isoValue to approximately '''2280'''.<<BR>><<BR>> {{attachment:37_edit_cont_SPM.png||width="650"}} * This is a complex case where: * The tip is not well separated from its adjacent contact. * One of the contacts in the middle can be seen joined to another electrode's contact. * Play with the '''Thresh''' slider under '''Surface''' tab to get a good threshold that separates them out. * As per the sections [[https://neuroimage.usc.edu/brainstorm/Tutorials/SeizureFingerprinting#Start_implantation|Start implantation]] and [[https://neuroimage.usc.edu/brainstorm/Tutorials/SeizureFingerprinting#Create_electrodes_and_plot_contacts_manually|Create electrodes and plot contacts manually]] above, create an '''SEEG''' electrode named '''SPM''' with model '''PMT 2102-16-091/2102-16-101'''. Switch to '''Surface''' tab first and change the isosurface threshold to approximately '''2680''' to get a clean tip for marking and then switch back to '''iEEG''' tab to do the implantation. * Set the isosurface threshold back to approximately '''2280''' for clear view of the 3D blobs. Select the 3D figure and toggle between the electrode ( {{attachment:iconSeegDepth.gif}} ) and sphere ( {{attachment:iconSeegSphere.gif}} ) modes to get the figures as under using buttons in [[https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Panel_iEEG|iEEG panel]]. 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:38_edit_cont_SPM.png||width="650"}} * Display the contact labels in 3D figure by right clicking '''Channels > Display labels'''. It can be seen that the contacts '''SPM2-SPM16''' are incorrect. Let us first correct contact '''SPM2'''.<<BR>><<BR>> {{attachment:39_edit_cont_SPM.png||width="650"}} * Switch to '''Surface''' tab, set the isosurface threshold back to approximately '''2680''' for separating out the tip and its adjacent contact blob (SPM2). Since the isosurface blobs are the correct ones, we can use them as ground truth guide to correct the contacts. Switch to '''iEEG''' tab, click the {{attachment:iconScoutNew.gif}} button (shortcut: Ctrl+P; to turn on surface point selection), click the {{attachment:iconGood.gif}} button (to turn on centroid selection in surface) and click the correct 3D blob. That places a yellow crosshair on the blob and updates the MRI Viewer crosshair as well.<<BR>><<BR>> {{attachment:40_edit_cont_SPM.png||width="650"}} * Without clicking anywhere else, move your cursor to the MRI Viewer, right click and go to '''Electrodes > Set electrode position (or press Ctrl+S)'''. From the Set electrode position window choose '''SPM2''' and press '''OK'''. This will update the position of '''SPM2''' only in the MRI Viewer.<<BR>><<BR>> {{attachment:41_edit_cont_SPM.png||width="650"}} * Click on '''Save''' and it closes all the windows and updates the channel file and number of channels in the database explorer. * Right click on '''Subject01 > SEEG/ECOG implantation'''. Click '''Continue''' for working on the existing implantation. Choose '''MRI+CT+IsoSurf''' to show all the figures. Switch to '''Surface''' tab, set the isosurface threshold back to approximately '''2280''' for clear view of the 3D blobs. Select the 3D figure and in the Panel iEEG, choose the '''sphere''' ( {{attachment:iconSeegSphere.gif}} ) mode for display. You will now see the updated contact in the 3D figure as well.<<BR>><<BR>> {{attachment:42_edit_cont_SPM.png||width="500"}} * 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. This is a display issue only, which has no impact on any computation, but we hope to improve it at some point'''.<<BR>><<BR>> {{attachment:43_edit_cont_SPM.png||width="500"}} * We have a functionality called line fitting that can help better view the trajectory in the 3D figure with '''sphere''' ( {{attachment:iconSeegSphere.gif}} ) display mode. Choose the electrode and click '''Contacts > Show/Hide line fit through contacts'''.<<BR>><<BR>> {{attachment:44_edit_cont_SPM.png||width="500"}} * You can also edit the position of a contact directly in the MRI Viewer by clicking on its dot in one of the slice and moving it around. To do it you need to open the MRI Viewer in edit mode by right clicking on the channel file > '''MRI registration > Edit ... (MRI Viewer:...)'''. Modifications are not saved immediately to the database and can be cancelled when you close the window. * You can also use the '''Add contact''' and '''Remove contacts''' feature in Brainstorm to edit the contacts. * '''Add contact''' can be done in the following ways: * Right click SEEG channel > Display sensors (SEEG: 3D MRI Viewer) > '''Surface''' tab (add isosurface) > Select electrode in panel iEEG > Turn on '''Select Surface Point''' > Select a location on the isosurface > click '''Contacts (menu) > Add SEEG contact''' in iEEG panel or press shortcut key '''S''' * Right click SEEG channel > Display sensors (SEEG: 3D MRI Viewer) > '''Surface''' tab (add isosurface) > Select electrode in panel iEEG > Turn on '''Select Surface Point''' > Select a location on the isosurface > Right click '''Channels > Add SEEG contact''' or press shortcut key '''S''' * Right click SEEG channel > Display sensors (SEEG: MRI Viewer) > Select electrode in panel iEEG > Set crosshair at a location in MRI Viewer > click '''Contacts (menu) > Add SEEG contact''' in iEEG panel or press shortcut key '''S''' * Right click SEEG channel > Display sensors (SEEG: MRI Viewer) > Select electrode in panel iEEG > Set crosshair at a location in MRI Viewer > Right click '''Electrodes> Add SEEG contact''' or press shortcut key '''S''' * '''Remove contacts''' can be done in the following ways: * Select contacts in panel iEEG > press '''Delete''' or '''Backspace''' * Select contacts in panel iEEG > click '''Contacts (menu) > Remove SEEG contacts''' * Select the contact in 3D figure > press '''Delete''' or '''Backspace''' * Select the contact in 3D figure > right click '''Channels > Remove contact'''<<BR>><<BR>> {{attachment:82_add_remove_contacts.png||width="600"}} * The numbering of the contacts is automatically maintained in ascending order from tip to skull entry. * If user deletes all the contacts then then the number of contacts in this case goes down to '''0''' since all the contacts were deleted. It comes to a state like starting an [[https://neuroimage.usc.edu/brainstorm/seeg/SeegContactLocalization#Create_electrodes_and_plot_contacts_manually|SEEG electrode implantation]] from scratch but in this case the number of contacts need to be updated to the desired. <<TAG(Advanced)>> == Export the contacts position == You can export the contacts created in Brainstorm as a text file to be used later in Brainstorm or in an external software. * Right click on the '''Implantation > SEEG/ECOG''' channel file, click '''File > Export to file''', choose type as '''EEG: BIDS electrodes.tsv, subject space mm (*.tsv)''', set file name as '''Subject_electrodes_mm.tsv''' click '''Save''', set the export reference MRI as '''post_CT_spm_reslice_masked_spm''' (as the implantation was done on it) and press '''OK'''. <<BR>><<BR>> {{attachment:45_export_contacts.png||width="650"}} * This exports the positions in the file in [[https://neuroimage.usc.edu/brainstorm/CoordinateSystems#World_coordinates|world coordinates]]. <<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=seeg/Introduction&next=seeg/SeizureFingerprinting")>> |
SEEG contact localization and labeling
Authors: Yash Shashank Vakilna, Chinmay Chinara, Johnson Hampson, Takfarinas Medani, Raymundo Cassani, John Mosher, Sylvain Baillet, Richard Leahy
TODO: Add flowchart
Brainstorm allows to creation and annotation of intracranial electrodes and contacts. Users can also then export these as a text file with all the positions that can be used in Brainstorm or any other program.
Contents
Generate isosurface
This creates a thresholded mesh from the CT by separating the contacts out from rest of the CT. This aids the user towards localization of the electrodes and its contacts more accurately.
The first thing required is to define a good threshold (which we call isoValue) that will separate out the contacts from the rest of the CT. Just open the CT file (by double clicking on it), click on the MIP: Functional in the MRI Viewer, use the Data Options > Amplitude slider in the Surface tab to browse through the threshold, and once you are satisfied with getting a good separation of the contacts, hover on the slider to get the desired value and keep a note of it (to the nearest integer). In this case the value is 2276.
Right click on post_CT_spm_reslice_masked_spm> CT segmentation > Generate SEEG/ECoG isosurface.
This will bring the Generate isosurface window. This window shows 4 values: the Background level, White level, Max Intensity and the suggested Set isoValue, all of them given in the Hounsfield Unit (HU) scale. The first 3 values are calculated automatically from the histogram of the CT and are displayed for reference. The editable isoValue field shows an estimated best guess based on mean of White Level and Max Intensity. Since we got a better value in step-1 above, set the value to 2276 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 further used to fine tune and regenerate mesh with different isoValues.
Start implantation
Right click on Subject01, and choose SEEG/ECOG implantation.
The SEEG/ECOG implantation menu pops to choose which modalities you want to use for doing your implantation with.
MRI: MRI viewer loads up with MRI volume only.
CT: MRI viewer loads up with CT volume only.
MRI+CT: MRI viewer loads up with the CT overlayed on the MRI.
MRI+CT+IsoSurf: MRI viewer loads up with the CT overlayed on the MRI. 3D figure loads up with the isosurface and 3D MRI slices.
Choose MRI+CT+IsoSurf. This takes you to the functional tab. Subject01 > Implantation > SEEG/ECOG (0) channel gets created. All expected figures open up. Panel iEEG loads up in the panel viewer. Move around the 3D slices to get a clear view of the contacts so that they can be clicked on.
To know more about the iEEG panel and its features go to Epileptogenicity tutorial.
Panel iEEG
Move the section https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Panel_iEEG here.
Create electrodes and plot contacts manually
Before we start the implantation a prior knowledge of the implantation scheme is required in order to have the correct labels of the various electrodes used. One way here is to have a look at the recordings file and get a knowledge of that. Brainstorm matches the channel names to that of the recordings while importing the positions to them.
After performing steps above, we will have the Panel iEEG along with the MRI Viewer and 3D figure open. We will be working on the electrode marked below.
On Panel iEEG Click on the + (Add new electrode). This opens up the Add electrode window. For this e.g. enter POP (it is one of the electrodes in the recordings available in this tutorial data) and press OK.
This creates an electrode POP 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-093/2102-16-103 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: Choose the location of the electrode's contact that is deepest in the brain. While we can use the MRI Viewer to set this location (as mentioned here), but to get a more accurate location we will leverage the 3D isosurface as described below.
As seen in the first figure in this section, the tip contact blob is not well separated form its adjacent contact. As mentioned in the Generate isosurface section, switch to Surface tab, use the Thresh slider to adjust the isovalue to approximately 3100 and a readjusted isosurface will be generated that separates out the tip area contacts.
Switch back to the iEEG tab, click the
button (shortcut: Ctrl+P) to activate surface point selection mode.
Click on the
button to activate selecting centroid of the candidate contact blob in the isosurface.
Choose the tip contact in the readjusted 3D isosurface and this should plot a yellow crosshair marker point on the center of the blob and also update the MRI Viewer's crosshair. At the bottom in 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.
Set skull entry: Choose the point in the 3D isosurface 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 of iEEG tab, click Set skull entry and the button turns green indicating that the entry point has been set. All the figures get updated with the an electrode based on the above configuration. 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.
Click on Contacts > Save Modifications to update the channel information in the database.
Repeat the steps for creating implantations for all the other electrodes one by one and save the modifications. Each time you can see the channel file SEEG/ECOG being updated.
When you are done with everything, close all the figures and a prompt appears asking to save the changes. Just click Yes for everything. If all localized properly, the Implantation folder should now have channel file that defines the locations of all the 230 contacts.
To make this tutorial easier to reproduce and follow, we also distribute the positions of the contacts (that were localized using the steps above) exported as a .tsv file: tutorial_seizure_fingerprinting/recordings/Subject01_electrodes_mm.tsv. You can directly import them into the Implantation folder:
Right click on Implantation > Import channel file, choose type as EEG: BIDS electrodes.tsv, subject space mm (*.tsv), browse and select the .tsv file, click Open
Set the scaling factor as 1 (the positions in this .tsv file are in millimeters, the expected unit for this file format is also millimeters, there is no adjustment to make here)
Set the import reference MRI as post_CT_spm_reslice_masked_spm (as the implantation was done on it) and press OK.
Select Yes to replace the existing channel file and all the 230 contacts are updated in the channel. We will use this to link to the recordings in the section below.
In some cases, additional correction of the contacts may be required. To edit the individual contacts refer to the Edit the contacts positions advanced section.
Automatic detection of contacts
Link to all tutorials in Brainstorm that do automatic contact localization. For now only GARDEL>
Automatic anatomical labeling of contacts
Move the section https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Anatomical_labelling here.
Edit the contacts positions
The trajectory of electrode while implantation may not always follow a straight line as there could be bending introduced when the neurosurgeon inserts the electrode. In such cases we need to move these contacts to more appropriate positions.
For this section we will consider one such electrode from our dataset above which is marked below. Switch to anatomy tab, open the isosurface file under Subject01 and using the Thresh slider in the Surface tab set the isoValue to approximately 2280.
- This is a complex case where:
- The tip is not well separated from its adjacent contact.
- One of the contacts in the middle can be seen joined to another electrode's contact.
Play with the Thresh slider under Surface tab to get a good threshold that separates them out.
As per the sections Start implantation and Create electrodes and plot contacts manually above, create an SEEG electrode named SPM with model PMT 2102-16-091/2102-16-101. Switch to Surface tab first and change the isosurface threshold to approximately 2680 to get a clean tip for marking and then switch back to iEEG tab to do the implantation.
Set the isosurface threshold back to approximately 2280 for clear view of the 3D blobs. Select the 3D figure and toggle between the electrode (
) and sphere (
) modes to get the figures as under using buttons in iEEG panel. Keep it in the sphere mode for better visibility. The contacts definitely need to be corrected and moved to their right positions.
Display the contact labels in 3D figure by right clicking Channels > Display labels. It can be seen that the contacts SPM2-SPM16 are incorrect. Let us first correct contact SPM2.
Switch to Surface tab, set the isosurface threshold back to approximately 2680 for separating out the tip and its adjacent contact blob (SPM2). Since the isosurface blobs are the correct ones, we can use them as ground truth guide to correct the contacts. Switch to iEEG tab, click the
button (shortcut: Ctrl+P; to turn on surface point selection), click the
button (to turn on centroid selection in surface) and click the correct 3D blob. That places a yellow crosshair on the blob and updates the MRI Viewer crosshair as well.
Without clicking anywhere else, move your cursor to the MRI Viewer, right click and go to Electrodes > Set electrode position (or press Ctrl+S). From the Set electrode position window choose SPM2 and press OK. This will update the position of SPM2 only 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.
Right click on Subject01 > SEEG/ECOG implantation. Click Continue for working on the existing implantation. Choose MRI+CT+IsoSurf to show all the figures. Switch to Surface tab, set the isosurface threshold back to approximately 2280 for clear view of the 3D blobs. Select the 3D figure and in the Panel iEEG, choose the sphere (
) mode for display. You will now see the updated contact in the 3D figure as well.
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. This is a display issue only, which has no impact on any computation, but we hope to improve it at some point.
We have a functionality called line fitting that can help better view the trajectory in the 3D figure with sphere (
) display mode. Choose the electrode and click Contacts > Show/Hide line fit through contacts.
You can also edit the position of a contact directly in the MRI Viewer by clicking on its dot in one of the slice and moving it around. To do it you need to open the MRI Viewer in edit mode by right clicking on the channel file > MRI registration > Edit ... (MRI Viewer:...). Modifications are not saved immediately to the database and can be cancelled when you close the window.
You can also use the Add contact and Remove contacts feature in Brainstorm to edit the contacts.
Add contact can be done in the following ways:
Right click SEEG channel > Display sensors (SEEG: 3D MRI Viewer) > Surface tab (add isosurface) > Select electrode in panel iEEG > Turn on Select Surface Point > Select a location on the isosurface > click Contacts (menu) > Add SEEG contact in iEEG panel or press shortcut key S
Right click SEEG channel > Display sensors (SEEG: 3D MRI Viewer) > Surface tab (add isosurface) > Select electrode in panel iEEG > Turn on Select Surface Point > Select a location on the isosurface > Right click Channels > Add SEEG contact or press shortcut key S
Right click SEEG channel > Display sensors (SEEG: MRI Viewer) > Select electrode in panel iEEG > Set crosshair at a location in MRI Viewer > click Contacts (menu) > Add SEEG contact in iEEG panel or press shortcut key S
Right click SEEG channel > Display sensors (SEEG: MRI Viewer) > Select electrode in panel iEEG > Set crosshair at a location in MRI Viewer > Right click Electrodes> Add SEEG contact or press shortcut key S
Remove contacts can be done in the following ways:
Select contacts in panel iEEG > press Delete or Backspace
Select contacts in panel iEEG > click Contacts (menu) > Remove SEEG contacts
Select the contact in 3D figure > press Delete or Backspace
Select the contact in 3D figure > right click Channels > Remove contact
- The numbering of the contacts is automatically maintained in ascending order from tip to skull entry.
If user deletes all the contacts then then the number of contacts in this case goes down to 0 since all the contacts were deleted. It comes to a state like starting an SEEG electrode implantation from scratch but in this case the number of contacts need to be updated to the desired.
Export the contacts position
You can export the contacts created in Brainstorm as a text file to be used later in Brainstorm or in an external software.
Right click on the Implantation > SEEG/ECOG channel file, click File > Export to file, choose type as EEG: BIDS electrodes.tsv, subject space mm (*.tsv), set file name as Subject_electrodes_mm.tsv click Save, set the export reference MRI as post_CT_spm_reslice_masked_spm (as the implantation was done on it) and press OK.
This exports the positions in the file in world coordinates.