How can I monitor a subject's head position during a MEG session?

The CTF acquisition software (“Acq”) provides a shared memory in which the the data from the MEG channels and all auxiliary channels (including the head-localizer channels) are available in real-time. The acq2ft application transfers this data from the shared memory to a FieldTrip buffer on the acquisition computer. Matlab software running on another computer can then be used to analyze the real-time data. After starting and initializing the CTF MEG system, one starts the acq2ft application. Subsequently one starts Acq and the data simultaneously is transferred to the FieldTrip buffer which can be read from any computer. On the computer of choice, one can point to the location of the buffer by correctly specifying cfg.dataset. An example follows:

cfg = [];
cfg.dataset = 'buffer://hostcomputer:1972';     % get data from buffer
ft_realtime_headlocalizer(cfg)

If you would like to plot referential positions, you could press the 'U' key to get the current position or point to a template file before starting the headlocalizer:

cfg.template = '/data/ArjSto_1200hz_20100812_01.ds';     % template file 

The Donders' specific protocol is as follows:

1) Initialize the MEG system

2) You start acq2ft by clicking on 'Prepare realtime head-localization' on Odin's desktop or 'Start acq2ft for real-time head localization' in the CTF MEG control center.

3) 'Start Acq'. You should see activity in the terminal in which acq2ft is running.

4) Then you start Matlab on the computer that is dedicated for the real-time analysis in Matlab. Type on the linux command line

matlab79

5) Subsequently you use the ft_realtime_headlocalizer function for displaying the realtime position of the head. At the Donders, Odin is the default FieldTrip buffer location and therefore, cfg.dataset does not need specification.

cfg = [];
ft_realtime_headlocalizer(cfg)

You can mark the coil positions by pressing the 'U' key. Black unfilled markers should appear which indicate the positions of the coils at the moment of keypress, see Figure 1. A head and three filled markers are visualized in realtime. These markers turn green when within a prespecified distance from the marked positions. This distance, or radius, can be modified by specifying cfg.accuracy_green (default = 0.15 (cm)). If all three markers are within limits, the head turns lightblue.

Figure 1; Back (left plot) and top view (right plot) of the subject's head. Nasion is represented by a triangular marker and both aurical points by circular markers.

*6) When you would like to reposition the subject during the experiment, one can project the headlocalizer into the MSR by one buttonclick. Click the left button on the video matrix and the signal from the presentation computer is being overwritten by the headlocalizer computer. This way both experimenter and subject get to see the virtual representation of the subject's head.

*7) By these means, you could also reposition the subject according to a previous session. The headlocalizer dedicated computer has access to Odin's data directory, and thus, the headcoil coordinates. This is the .hc file, located in the .ds directory. Specify the template as follows and run the headlocalizer which should give you the markers from the start.

cfg.template = '/mnt/megdata/20100812/ArjSto_1200hz_20100812_01.ds';    % template file
ft_realtime_headlocalizer(cfg)

Keep in mind that Odin's data directory is automatically cleaned every now and then. If your template dataset has been removed, you could still read it from your own M disk in case you have backed it up there. Logout the meg user on the headlocalizer dedicated computer and login as yourself. Now run the headlocalizer with the following commands.

cfg = [];
cfg.template = '/home/action/arjsto/MEG/ArjSto_1200hz_20100812_01.ds';   % template file
ft_realtime_headlocalizer(cfg)

How can I replay the subject's head motions during a recorded MEG session?

In stead of reading data from the shared memory, one now reads data from a previously recorded MEG dataset. This can be done offline, on any computer running a recent version of Matlab.

cfg.bufferdata = 'first';                 % read data from first until last segment 
cfg.template   = 'previousdataset.ds';   
cfg.dataset    = 'previousdataset.ds';  
ft_realtime_headlocalizer(cfg)
faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session.txt · Last modified: 2011/12/06 09:36 by 131.174.44.188

You are here: startfaqhow_can_i_monitor_a_subject_s_head_position_during_a_meg_session
This DokuWiki features an Anymorphic Webdesign theme, customised by Eelke Spaak and Stephen Whitmarsh.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0