Module 1¶
Purpose: Label electrodes in CT scans using VoxTool, a graphical user interface application.
Description¶
In this module, electrode locations will be manually identified on a subject’s CT scan. Make sure your input patient data is organized according to the pseudo-BIDS structure outlined in Data Setup.
Inputs:
post-implant CT: ct/sub-XXXX_ses-YYYY_acq-3D_space-T01ct_ct.nii.gz
electrode labels
Output:
Electrode coordinates in CT space: ieeg/sub-XXXX_ses-YYYY_space-T01ct_ desc-vox_electrodes.txt
Setup & Run¶
If using the ieeg-recon App, select the VoxTool option at the bottom of the GUI. If running from the command line: In a terminal window, type the following to install voxtool
$ pip install voxtool
Run voxtool:
$ voxtool
Label Electrodes¶
Click on the image below for a voxTool video tutorial
VoxTool GUI
Click on
Load Scanin the bottom left corner to load a subject’s CT file (anat/…acq-3D_space-T01ct_ct.nii.gz). If necessary, change theCT Thresholdin the box at the top of the window, then press theUpdatebutton.Note
If continuing a previous localization: load the existing coordinates from a JSON coordinate file using the
Load Coordinatesbutton.Press
Define leadsto set the names, shapes, types (e.g. Depth, Grid, Strip), and microcontacts for each implanted lead. Shapes are rows x columns. Press confirm on the dialog when complete.To label electrode contacts: select a lead in the
Labeldropdown menu in the upper left corner. Ensure that the contact number and X,Y position are consistent (e.g. for an 8x8 grid array, contact 9 corresponds to X=2, Y=1) .Click on the contact location in the CT. When it is highlighted, press
Submitto mark its location. The electrode contact number and X, Y positions may automatically increment.Click on the next contact on the lead, then press
Submitto mark its locationAlternatively, press the
Seedingbutton to turn on seeding. VoxTool will attempt to extrapolate the locations of the remaing contacts as you select them, incrementing the contact number. Be sure to double-check that the results make sense, as occasionally two contacts will be given the same locationAlternatively, add the ends of a strip or depth or the corners of the grid with the
Submitbutton, then press theInterpolatebutton. VoxTool will attempt to fill in the lead. It may not be completely successful. PressingInterpolateagain may interpolate additional contacts.Note
The list of contact names is sorted by lead name, and within each lead by contact number. The
Interpolatebutton does not always assign contact numbers in the expected order, so be sure to double-check that the numbers it has assigned are the ones that you want after using it.
Press
Add Micro-Contactsto add micro-contacts to any macro/micro leads.Press the
Save asbutton to save the list of localized contacts. If the checkbox labelledInclude Bipolar Pairsis checked, locations will also be saved for the midpoint of each pair of neighboring contacts.Save the electrode labels as a text file in the following location:
BIDS/sub-<subjectID>/ses-<sessionName>/ieeg/ sub-<subjectID>_ses-<sessionName>_space-T01ct_desc-vox_electrodes.txt
Keyboard Shortcuts¶
Button |
Key Sequence |
|---|---|
Load Scan |
Ctrl-O |
Define Leads |
Ctrl-D |
Save As |
Ctrl-S |
Submit (contact panel) |
S |
Submit (lead definition window) |
S |
Delete (contact panel) |
Delete |
Delete (lead definition window) |
Delete |
Confirm (lead definition window) |
Enter |
Example¶
In this example, we label electrodes for subject RID0031 in the post-implant CT scan collected during their first clinical session.
Load CT scan from BIDS/sub-RID0031/ses-clinical01/ct/sub-RID0031_ses-clinical01_acq-3D_space-T01ct_ct.nii.gz
Define Leads:
Label each electrode:
Repeat above procedure until all electrodes are labeled.
Save to:
BIDS/sub-RID0031/ses-clinical01/ieeg/sub-RID0031_ses-clinical01_space-T01ct_desc-vox_electrodes.txt



