preprocess for making leadfield [usage] [Basis_mode, pick, Qpick, Wsensor, V0, V, xx] = ... vb_lf_preprocess(proj_root, basis_parm) [input] proj_root : <required> project root directory basis_parm : <required> <<struct>> : data set in which the specification of calculation is defined basis_parm.brain_file : brain file (.brain.mat) basis_parm.area_file : area file (.area.mat) basis_parm.meg_file : MEG data file (.meg.mat) basis_parm.Basis_mode : number of independent curent direction = 1 : current vextor = xx(n,:) = 2 : current vextor = orthogonal vectors to V(n,:) = 3 : current vextor = xx(n,:) & orthogonal vectors to xx(n,:) basis_parm.normal_mode : = 0 : normal vector at the vertex (Defualt) = 1 : average normal vector in the neighbor of BV original brain basis_parm.area_key : Area key to specify possible current region <optional> [output] V(n,:) : dipole position (3-D coordinate) at n-th vertex xx(n,:) : dipole current direction (unit vector) at n-th vertex pick(k, 1:3) : sensor coil coordinate Qpick(k, 1:3) : sensor coil direction Wsensor(m,n) = n-th coil weight for m-th sensor channel basis(channel,dipole) = Wsensor * basis(coil,dipole) Basis_mode : V0 : center of sphere [note] <<prior-conditions>> 1) proj_root is valid 2) basis_parm is commonly valid [history] 2007-01-26 (Sako) initial version 2007-12-21 Masa-aki Sato parameter checks are changed 2008-03-10 (Sako) modified in order to share check program with GUI Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [Basis_mode, pick, Qpick, Wsensor, V0, V, xx] = ... 0002 vb_lf_preprocess(proj_root, basis_parm) 0003 % preprocess for making leadfield 0004 % [usage] 0005 % [Basis_mode, pick, Qpick, Wsensor, V0, V, xx] = ... 0006 % vb_lf_preprocess(proj_root, basis_parm) 0007 % [input] 0008 % proj_root : <required> project root directory 0009 % basis_parm : <required> <<struct>> 0010 % : data set in which the specification of calculation is defined 0011 % basis_parm.brain_file : brain file (.brain.mat) 0012 % basis_parm.area_file : area file (.area.mat) 0013 % basis_parm.meg_file : MEG data file (.meg.mat) 0014 % basis_parm.Basis_mode : number of independent curent direction 0015 % = 1 : current vextor = xx(n,:) 0016 % = 2 : current vextor = orthogonal vectors to V(n,:) 0017 % = 3 : current vextor = xx(n,:) & orthogonal vectors to xx(n,:) 0018 % basis_parm.normal_mode : 0019 % = 0 : normal vector at the vertex (Defualt) 0020 % = 1 : average normal vector in the neighbor of BV original brain 0021 % 0022 % basis_parm.area_key : Area key to specify possible current region <optional> 0023 % [output] 0024 % V(n,:) : dipole position (3-D coordinate) at n-th vertex 0025 % xx(n,:) : dipole current direction (unit vector) at n-th vertex 0026 % pick(k, 1:3) : sensor coil coordinate 0027 % Qpick(k, 1:3) : sensor coil direction 0028 % 0029 % Wsensor(m,n) = n-th coil weight for m-th sensor channel 0030 % basis(channel,dipole) = Wsensor * basis(coil,dipole) 0031 % Basis_mode : 0032 % V0 : center of sphere 0033 % [note] 0034 % <<prior-conditions>> 0035 % 1) proj_root is valid 0036 % 2) basis_parm is commonly valid 0037 % [history] 0038 % 2007-01-26 (Sako) initial version 0039 % 2007-12-21 Masa-aki Sato 0040 % parameter checks are changed 0041 % 2008-03-10 (Sako) modified in order to share check program with GUI 0042 % 0043 % Copyright (C) 2011, ATR All Rights Reserved. 0044 % License : New BSD License(see VBMEG_LICENSE.txt) 0045 0046 abort_swt = true; 0047 [err_code, Basis_mode, pick, Qpick, Wsensor, V0, V, xx] = ... 0048 vb_basisparm_check(basis_parm, proj_root, abort_swt); 0049 return; 0050 0051 %%% END OF FILE %%%