Home > vbmeg > functions > device > vivid > vb_meg_sensor_to_mri.m

vb_meg_sensor_to_mri

PURPOSE ^

Transform MEG sensor position to MRI space

SYNOPSIS ^

function vb_meg_sensor_to_mri(megfile)

DESCRIPTION ^

 Transform MEG sensor position to MRI space

 ---- Input file name
 megfile    : MEG position file      (*.megpos.mat)

 ---- Input variable in MEG position file
 meg_sensor
     .pos       : sensor position (on MEG hardware coord)
 trans_mat
     .meg_to_mri

 ---- Output variable for file save
 meg_sensor
     .mri       : sensor position (on MRI coord)

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    vb_meg_sensor_to_mri(megfile)
0002 % Transform MEG sensor position to MRI space
0003 %
0004 % ---- Input file name
0005 % megfile    : MEG position file      (*.megpos.mat)
0006 %
0007 % ---- Input variable in MEG position file
0008 % meg_sensor
0009 %     .pos       : sensor position (on MEG hardware coord)
0010 % trans_mat
0011 %     .meg_to_mri
0012 %
0013 % ---- Output variable for file save
0014 % meg_sensor
0015 %     .mri       : sensor position (on MRI coord)
0016 %
0017 % Copyright (C) 2011, ATR All Rights Reserved.
0018 % License : New BSD License(see VBMEG_LICENSE.txt)
0019 
0020 %
0021 % --- Load MEG sensor & marker position
0022 %
0023 load(megfile)
0024 
0025 % Transform MEG sensor position to MRI coordinate
0026 meg_sensor.mri = vb_affine_trans(meg_sensor.pos , trans_mat.meg_to_mri);
0027 
0028 % Save Sensor position in MRI-space
0029 vb_save(megfile ,'meg_sensor');

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005