- Introduction
-      Getting Started
- Working with Electrode Grids
-      Adding Grids
-      Placing Electrodes in Viewer
- Electrode Control Function Catalog
-       Patient Info Tab
-       Electrode Info Tab
-       File Menu
-       Edit Menu
-       Display Menu
-       Grid Menu
-       Labels Menu
-       Volume Trace Menu
Introduction
BioImage Suite provides a tool for placing and labeling electrodes based on an image that contains visible electrodes, such as a CT image. This is the Electrode Editor, which consists of two windows: An Image Viewer (Fig. 1a) and an Electrode Control Window (Fig. 1b). With these tools, you can create a custom array of electrodes and place them into an image in any configuration you like. Later, you can visualize these electrodes in other images, and load attributes for the electodes with the Data Tree Tool. The generation of electrode location data results in the creation of a *.mgrid file, which holds the electrode properties and locations.![]() |
![]() |
| Figure 1a. The Electrode Editor Image Viewer This is a normal viewer in most respects, and operates just like the 3D viewer described in Viewers. The only difference is that it has it has electrodes displayed in it, which are linked to the electrode control window (1b). | Figure 1b. The Electrode Editor Image Viewer This window is where electrodes are added and their properties are set. For a description of all the functions in this window, see the Electrode Editor Function Catalog, below. |
Starting the Electrode Editor
The Electrode Editor is available either through the main BioImage Suite menu, or by typing pxitclelectrodeeditor on the command line.
Note: Much of the effort involved in placing electrodes is based on the manipulating the view, and working with the image upon which you are basing the electrode localizations. Look at The Viewers, and Image Processing for a more in-depth discussion of these functions.
Getting Started
You are ready to go! Now what...?1.) Load the base image
Once the electrode editor tool program has started, you need to load an image into the viewer. Just as with all viewers in BioImage Suite, choose the ( File | Load ) menu option and open your image (or import a non-analyze format file with ( File | Import ). This image must contain recognizable (signficantly bright) locations of electrodes, since these will help the software position electrodes exactly as you click in their vicinity.2.) Set Editing Options
A few options must be set for you to start editing and place electrodes.In Image Viewer Window:
Select the ( Features | Enable Volume Trace ) option - it should be on.In Electrode Control Window:
Choose the ( Edit | Full Edit Mode ) radio option, in order to allow you to edit all aspects of your electrodes.On the right side of the "Electrode Info tab" in the Electrode Control Window, check the "Button Pick" option.
Working with Electrode Grids
In the electrode control, all electrodes are ( X x Y ) grids. In practice, many electrode sets are actually arranged as strips of electrodes in a row. This is no crisis, however, for the astute investigator who realizes that a strip is simply a grid with dimensions ( 1 x Y ).Adding Grids and Setting Their Properties
Add/Delete Grids
Electrode grids are added and their properties manipulated in the Electrode Control Window. To add a new grid, or remove an unneeded grid, look in the "Patient Info" Tab. On the right side of the window are the Add New Grid and Delete Grid buttons. When added, a new electrode grid is placed in the "Grid Information" list.To set an electrode grid's properties (length, width, name, spacing, etc.), select it in the "Grid Information" list, and click on the "Electrode Info" tab. This tab now contains options for this indiviual grid. By default, newly added grids are given an X dimension of 1, making them strips.
Grid Properties
In this section of the "Electrode Info" tab, you can set the grid's/strip's name (often they are named with some anatomically identifying title). Note that names should not contain spaces. Dimensions are set here as well. Nominal spacing sets the assumed spacing between neighboring electrodes on the grid in both dimensions. You can choose what type of icon you would like to be used to display the electrode location (either sphere or disc), as well as the radius and thickness thereof. Once you have set these options correctly for the electrode grid/strip in question, click the Update Electrode Grid button. After querying you to be sure you want to make the changes, the electrodes in the Viewer, as well as in the "Electrode Arangement" box will update to show the appropriate dimensions.Electrode Arrangement
In this box, you are able to select individual electrodes within a grid or strip. Note that electrodes are numbered from the end furthest away from the leads to the end closest to the leads.Placing Electrodes
Note: If you are using a volume visualization in the viewer (see the page on Viewers), before placing electrodes you should go the the Features menu in the viewer window and make sure that the "Enable Volume Trace" checkbox is checked. This allows the viewer to interpret mouse clicks as being localized on the volume as you see it.
Once all the electrodes have been added in the "Patient Info" tab, and their names, dimensions, and spacings specified, you can start placing them in their proper locations in the Viewer Window. The base image should already be loaded in the viewer (see Getting Started). The next step is to make the electrode locations in the image readily visibale by thresholding it. We have had success thresholding CT images of platinum electrodes from 3000 to maximum, and steel electrodes from 1500 to maximum, if they are present. See Image Processing for how to do the thresholding operation. Leaving the viewer in the Results view is fine in this case.

Figure 2. An exmaple thresholded CT image. This image was thresholded at 3000, and shows very clearly the locations of all the surface and depth electrodes that have been implanted. At the top of the image, you can see the electrode grid at its default location, ready to be localized based on the image.
Find and identify a specific electrode in the image. Then go back to the Electrode Control window (See Fig. 1), choose the "Patient Info" tab, and select the electrode grid that contains the electrode you have picked. Click on the "Electrode Info" tab, and in the "Electrode Arrangement" tab, click on the button in the grid that corresponds with this electrode. In the "Editing" Box, click the Pick Current button. Now go back to the viewer, and Hold down Shift while left-clicking on the bright area in the image that represents the electrode. The marker for that electrode in the grid will move to this location. Go back to the Electrode Control window, select another electrode, click Pick Current and repeat.
Volume Trace
The electrode is placed in the center of the bright region that is close to the location that you Shift-click on. The volume of the space searched is under your control. To set it, simply go to the Volume Trace menu, and select one of the "VOI Size" options. The default is a radius of 10. If two electrodes are close together in the image, it may be useful to decrease the VOI size, so that they will not be localized together by a single click.Undo
In the Edit menu there is an "Undo Move Electrodes" option. This can undo the last electrode placement operation performed. This operation is not cumulative, however.Grid Color
Once all electrodes in a grid have been placed or while you are working on them, you may wish to color the grid, so that it can be easily spotted and differentiated from the others. To do this, use the ( Grid | Grid Color ) menu option. A Color selection dialog box will appear, in which you can choose a unique color for the grid.
Electrodes are numbered from the end furthest away from the leads to the end with the leads. Thus, in a strip of electrode, electrode 1 is at the bottom of the Electrode Arrangement display, and the highest numbered electrode (whose number depends on the length of the strip) is at the top. If the electrode has been cut, so that the end distal from the leads is missing, you should still input the original length of the electrode strip in the "Dimensions" field, and then select the electrodes that are missing in the arrangement view, and uncheck the "Electrode Enabled" box on the right side of the tab window. The electrode will become grey in the dialog box and disappear in the viewer. This is important because it allows you to create shorter electrode strips that are numbered starting with numbers other than 1. (If you just create a shorter electrode, it will be numbered 1-6, for example, not 3-8). Thus, you can maintain consistency with the electrodes' real numbering scheme.
Saving the whole scheme
The ( File | Save ) operation saves an *.mgrid file that contains all the information you have entered: electrode grid dimensions and locations, names, numbers, color schemes, etc. This file can then be edited later or loaded into the electrode control modules of other viewer sets. These *.mgrid files are also able to be loaded into the Data Tree tool, so that you can apply transformations to them and display the electrodes in the spaces of other images (on the pre-operative MRI, for example).Electrode Editor Function Catalog
The functions in the viewer of the Electrode Editor program are common to all viewers, and are detailed here. This section explains the tools that are available in the Electrode Control Window (Figure 1b.)Patient Info Tab
The Patient Info Tab contains a summary of which electrode grids are present in the current scheme, and what their numbers and names are. As described above, in Adding Electrodes, this is where you add new electrode grids and delete unneeded ones. Using the Add New Grid button will add a new grid at the bottom of the list, with a default name, which you can change in the Electrode Info Tab (See below). Clicking the Delete Grid button deletes the currently selected grid.The Patient info tab also contains a couple fields for some info about the patient: a simple description, and a comment, in case you need them.
Electrode Info Tab
Grid Properties
The options in this section set the properties of each grid as a whole.Grid Name
The name of the grid or electrode stripGrid Dimensions
The length and width (in number of electrodes) of the grid. If you need to represent an electrode strip, simply use a 1 in the first field.Nominal Spacing
The initial spacing between electrodes in the grid. This is flexible, as spacing will change for each electrode as you place it, but it should be close to the actual spacing on the electrode strips before implanting (Usually 10mm or 5mm).Electrode Type
This menu contains two options for how the electrodes should be drawn: either as spheres or as discs.Radius/Thick (mm)
This pair of options specifies the size of the rendered electrode representations. Just the radius is needed for spheres, while discs are drawn according to the radius size and a thickness as well.When you have made the changes you want, click the Update Electrode Grid button. This will remove any placements you have made on the old electrode grid, and replace it with a new grid that has the properties you have specified.
Electrode Arrangement
This section of the Electrode Info Tab is just a grid of radio buttons that correspond with the electrodes that are available for you to edit and place. This is where you select an individual electrode to place, or enable/disable. See Placing Electrodes.Electrode Properties
The values in this section update as you select electrodes in the Electrode Arrangement section. The top field, "Grid/Electrode" specifies which electrode number in which grid you are working with. The "Position" field gives the X,Y, and Z coordinates of the electrodes location in the image. The four "Distances" fields show the distance from the electrode in question to each of its neighbors (If the electrode is a strip, the top and left fields will have the same value, as will the bottom and right pair of fields). The "Electrode Enabled" checkbox lets you disable an electrode that is not in use (see A Note About Electrode Numbers).Locate Viewers
The buttons in this section let you quickly send the crosshairs or the view window in the viewer to the electrode selected in the Electrode Arrangement section.Attributes
The Functional Attrubutes and Electrical Attrubutes sections are simply groups of pre-set checkboxes that you can use to mark individual electrodes as having certain attributes. If you need to apply a more complex set of attributes, use the electrode attributes function in the Data Tree Tool.File Menu
Load
The electrode editor loads *.mgrid files, which contain all information about an array of electrodes, including locations (based on the base image, which should be loaded into the viewer as well for visualization purposes).Save
Save an *.mgrid file.Export
You can export a delimted text file that specifies all the values for the electrode array, or you can export the electrode array as a surface file (see the page on Surface Editing), or you can generate a new binary image file out of the electrodes, with a single pixel with non-zero value for each electrode. Finally, the "Export Picked Function" menu choiceClose
Exit the electrode editor.Edit Menu
Edit Modes
You can choose which sets of parameters you want to be able to change during editing by selecting the appropriate editing mode in the Edit menu.Display Only Mode
Disables all editing of electrode locations and attributes. Only for visualization and export.Only Edit Attributes
Disallows placment of electrodes, but allows you to set attributes and properties of individual electrodes.Full Edit Mode
All electrode locations and properties may be set and manipulated.Auto-Save
Automatically saves your work periodically.Undo Move Electrode
Moves the most recently placed electrode back to its previous location. This only works once - it is not cumulative, so you cannot undo multiple placements.Display Menu
Choosing Electrodes to Display
You may not wish to display all electrodes at once, even though they all exist in the file. Thus, there are a few options in the Display menu that allow you to choose which electrodes should be shown.Show Current
- Only show the electrode grid selected in the "Grid Information" section.Show All
- Show all electrode gridsShow None
- Make all grids invisible.Show Some
- Bring up "Select Grids to Display" boxThis simple dialog appears whenever you select the ( Display | Show Some ) menu option. It contains a list of all electrode grids in the file (from the "Grid Information" section of the Patient Info tab). As you select or deselect grids in the list, they will be displayed or made invisible. You can also choose all or none from here.


