= Digitize EEG Sensor Locations and Head Shape = == Getting Started == The Brainstorm Digitize application allows for a connection to a Polhemus device and collection of digitized head points and/or EEG sensor locations. The connection to the device is made via a serial port connection. This can be accomplished using a direct serial connection or with a USB-to-Serial cable connection to the host computer. {{attachment:polhemus.png||width="200"}} Figure 1. Polhemus system with two receivers and one transmitter {{attachment:typical_polhemus_setup.png||width="300"}} Figure 2. Typical Polhemus setup The application is designed for two receivers (i.e. the stylus and reference) one transmitter. The '''stylus''' is used by the operator to point to the desired position for collection The '''reference''' is fixed to the subject’s head, typically with glasses or headband. While the subject’s head can move during the collection, the reference sensor should not move from the starting position relative to the head. The '''transmitter''' is fixed behind the subject, typically to a non-metal chair or table. The orientation is shown here, with X+ pointing up and Y+ point to the right. {{attachment:transmitter.png}} Figure 3. Transmitter orientation ****Care should be taken when setting up this system to ensure accurate collection. Thorough testing should be performed using known head coordinates (phantom) to determine accuracy. The head coordinate system used in the Digitize application is based on the CTF head coordinate system, see /CoordinateSystems. To start the Digitize application, start Brainstorm. Then select ‘Digitize’ from the File Menu. {{attachment:bst_menu_digitize.png||width="320"}} Figure 4. Starting Digitize The Brainstorm GUI will be hidden during the use of the Digitize application and will reappear after exiting Digitize. == The Digitize GUI == {{attachment:gui_noeeg_digitize.png||width="400"}} Figure 5. Digitize GUI This application allows you collect: * Three anatomical landmarks for computing the head coordinate system * EEG sensor locations * Scalp points for head shape The collection can performed by: * One operator who will press the button on the stylus to collect a point * Two operators, which one will point the stylus at the desired location and one will click the ‘Collect Point’ button on the lower panel of the GUI. * Points are collected in order from Nasion, Left , Right, EEG (if desired), then head shape. If an error is made during collection: * The last point can be removed by clicking “Delete Last Point” on the lower panel of the GUI * The entire session can be restarted by selecting ‘Start Over’ from the File menu When complete the coordinates can be save in a variety of formats including CTF (*.pos), megDraw (*.eeg) or tab-delimited ASCII text. == Edit Settings == Settings for the serial connection and point collection can be adjusted using the ‘Edit settings’ menu option from the Digitize File Menu and may vary for each user. {{attachment:gui_editsettings_digitize.png||width="400"}} Figure 6. Edit Settings {{attachment:edit_settings_digitize.png||width="250"}} Figure 7. Edit settings dialog '''Serial port name''' – this is the name of the serial port that is connected to the Polhemus, for example COM1 (Windows), ttyS1 (Linux). '''Baud rate''' – this the baud rate of the connection. The default is 9600. '''Byte count''' – this is the number of bytes that will be collected for each point and sent to the host computer. '''Number of times to collect the three fiducials''' – these collections will occur at the beginning of the session and will be averaged together to compute the transformation to the head coordinate system. '''Beep''' – this will generate a beep sound with each point collection (this is often helpful to realize a button press on the stylus when there is one operator). == EEG Montages == {{attachment:eeg_settings_digitize.png||width="400"}} Figure 8. Edit EEG settings There are three options for EEG sensors: * No EGG: No collection and therefore no labels * Default: This is entered as a number and the default labels are used: EEG01, EEG02, EEG03, etc. * Custom Montage: A custom number of points is collected and the specified labels are used. This should be defined in a tab delimited plain text file as shown. {{attachment:eegmontage_example_digitize.png||width="150"}} . Figure 9. Example EEG montage EEG settings should be adjusted for each session. Custom montages that are imported are stored in the brainstorm preferences and are available on subsequent sessions. The Coordinates list on the left panel of the GUI displays the labels of the points which have been selected for collection. This is vary depending on the number of times the fiducials are collected and the number of EEG sensors to be defined. The head shape points are not listed since this will vary depending on the individual need. {{attachment:example_eeg_digitize.png||width="640"}} Figure 10. Example EEG setups == Collection == === Collect the required number of Anatomical Fiducials === * When collecting more than one set of fiducials, an error message is displayed if the difference between the sets is > 2mm * Once collected, the head coordinate system is computed and the points are plotted on the 3D point display * The coordinates are displayed in the coordinate list in cm * The points are saved in the brainstorm channel file as CARDINAL Head Points * The collection automatically moves to EEG (if desired) or head shape {{attachment:error_fiducials_digitize.png||width="540"}} Figure 11. Collect fiducials, error message === Collect the required number of EEG points === * Each point is displayed on the 3D points display * The counter is incremented each time a point is collected and therefore indicates which point needs to be collected next * The coordinates are displayed in the coordinate list in cm The points are saved in the brainstorm channel file as both EEG Channel Locations and EEG Head Points * Once complete, the collection automatically moves to the head shape collection {{attachment:eeg_collection_digitize.png||width="540"}} Figure 12. Collect EEG === Collect the desired number of head shape points === * Each point is displayed on the 3D points display * The counter is incremented each time a point is collected and therefore indicates which point will to be collected next * The coordinates are displayed in the coordinate list in cm * The points are saved in the brainstorm channel file as EXTRA Head Points * Once complete, the operator can save the points to the CTF *.pos file with the ‘Save as POS’ button or select ‘Save and exit’ from the File menu {{attachment:headshape_collection_digitize.png||width="540"}} Figure 13. Collect head shape == Export points to text file == All points are automatically saved in the brainstorm channel file * After exiting from the Digitize application, the points can be written to a text file in a variety of formats. * Right click on the channel file just created, select File > Export to file, select the type of file to save. {{attachment:bst_saveas_digitize.PNG||width="300"}} Figure 14. Export points to text file