= Real-time head-tracking for adjusting head position = ''Authors: Elizabeth Bock, Soheila Samie'' This program is designed to capture head position information from the CTF MEG system and display a scalp surface relative to the sensor helmet. The acquisition workstation runs the FieldTrip program acq2ftx and a second computer runs Brainstorm and the FieldTrip buffer program. The acquisition workstation and the second computer need to be connected to each other either across the same network or a direct computer-to-computer network connection. <> == System Setup == On the second computer, Brainstorm and Fieldtrip should be installed in the same location. On the MEG acquisition workstation, acq2ftx should be installed. Please see http://fieldtrip.fcdonders.nl/development/realtime for more information about the real-time FieldTrip buffer. == How to use == '''On the second computer, start Brainstorm''' '''Start Brainstorm Headtracking Program''' * In the Matlab command window type bst_headtracking(0, ,) where is the IP address of the acquisition workstation and is the TCP/IP port (typically 1972). The first argument is for the realtime alignment feedback, see below. * If desired, the default anatomy can be warped to the subjects headshape. This will provide a more accurate headposition. When prompted, select the POS file (headshape points file) corresponding to the current subject * The headpoints will be added, click OK * Wait for the prompt: BST> Waiting for acquisition to start... {{attachment:headtracking_start.png||width="382",height="208"}} '''Start ACQ Headtracking''' * On the acquisition workstation, select a protocol that includes Continuous Head Localization or enable the functionality in the current protocol (Settings > Channel Settings > Localization > continuous) * Start the ACQ Headtracking program from a terminal (see the FieldTrip documentation for more information about running this application). example: ''acq2ftx '10.0.0.2’:1972:RE:1:HLC0011,HLC0012,HLC0013,HLC0021,HLC0022,HLC0023,HLC0031,HLC0032,HLC0033'' where ''10.0.0.2'' should be the IP address of the second computer. * Wait for the program to start. The following is displayed in the terminal window when ready: {{attachment:acq2ftx_start.jpg||width="328",height="206"}} * Start the acquisition. '''Do not localize the head or begin recording during the head tracking.''' * A Brainstorm figure will appear on the second computer. Adjust subject as needed. '''To Stop the ACQ Headtracking Program:''' * Close the Brainstorm Figure (second computer) * Abort data acquisition (ACQ workstation) * Close the ACQ Headtracking terminal (ACQ workstation) == Realtime Alignment == This allows for the re-alignment of a subject's current head position to an original position between recordings. This can be useful when one is interested in analyzing data in the sensor space. The goal would be to properly adjust the subject at the beginning of a session, then ask the subject to return to that position for each subsequent recording by providing feedback about head location. Here is how to use this feature: * Start Brainstorm * Open the protocol ''Headtracking'' * Open the subject ''HeadMaster'' * Delete the study ''RealtimeAlign'' (if it exists from a previous session) * Place the subject under the helmet * In the Matlab command window, run the function bst_headtracking('RealtimeAlign'). The input 'RealtimeAlign' is used to start this feature. * Start ACQ Headtracking on the acquisition workstation (1st recording only), then click Aquire data. * If a POS file is available, the subject's head can be warped, but it is not necessary. Again, this is only necessary for the first recording. * When the subject is in the desired position, click ''Save''. This will save the current position in the RealtimeAlign study. (This window can now be kept open for the duration of the session or closed if the workstation is being used for stim presentation. If closed, execute bst_headtracking('RealtimeAlign') again at the start of each run). * On subsequent runs, the first position will be presented in a green color and the current position will be in red. Show the screen to the subject and ask them to adjust their position until the current position helmet changes from red to green. Do not click ''Save'' again unless you want to change the starting position. {{attachment:headtracking_different_positions.jpg||width="300",height="200"}} {{attachment:headtracking_similar_positions.jpg||width="300",height="200"}} <>