plot dipole data( estimated by MEGLaboratory ) to analyze file vb_plot_yokogawa_dipole_to_analyze(analyzefile,yokogawa_dipolefile) --- Input analyzefile : String analyze image file name (*.hdr) yokogawa_dipolefile : String yokogawa dipole position file name (*.txt) --- Output figure : plot dipole point on the analyze image written by M Osako 2006-06-14 Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_plot_yokogawa_dipole_to_analyze(analyzefile,yokogawa_dipolefile) 0002 % plot dipole data( estimated by MEGLaboratory ) to analyze file 0003 % 0004 % vb_plot_yokogawa_dipole_to_analyze(analyzefile,yokogawa_dipolefile) 0005 % 0006 % --- Input 0007 % analyzefile : String analyze image file name (*.hdr) 0008 % yokogawa_dipolefile : String yokogawa dipole position file name (*.txt) 0009 % --- Output 0010 % figure : plot dipole point on the analyze image 0011 % 0012 % written by M Osako 2006-06-14 0013 % 0014 % Copyright (C) 2011, ATR All Rights Reserved. 0015 % License : New BSD License(see VBMEG_LICENSE.txt) 0016 0017 %% transform analyze coord (left-handed) to right-handed coord 0018 [B, Vdim, Vsize] = vb_load_analyze_to_right(analyzefile); 0019 0020 %% read dipole position ( Ndipole x 3 ) 0021 dipole_position = textread(yokogawa_dipolefile); 0022 0023 %% transform yokogawa MRI coord to spm right-handed coord 0024 dipole_spmright = vb_yokogawa_mri_to_spm_right(dipole_position); 0025 0026 %% transform spm right-handed coord to analyze right-handed coord 0027 dipole_ana = vb_spm_right_to_analyze_right(dipole_spmright,Vdim,Vsize); 0028 0029 %%plot act point on the analyze image 0030 vb_plot_slice( B , dipole_ana , round(dipole_ana(:,3)) );