Home > functions > plotfunc > check_model > vb_check_sensor.m

vb_check_sensor

PURPOSE ^

Check sensor

SYNOPSIS ^

function vb_check_sensor(brainfile, megfile)

DESCRIPTION ^

 Check sensor

 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_check_sensor(brainfile, megfile)
0002 % Check sensor
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 % Load sensor and sphere center position
0008 [pick,Qpick,Wsensor,Vcenter] = vb_load_sensor(megfile);
0009 Measurement = vb_megfile_get_measurement(megfile);
0010 
0011 % Load brain model
0012 [V,F] = vb_load_cortex(brainfile);
0013 
0014 F     = F.F3;
0015 if strcmp(Measurement, 'MEG')
0016     Npick = size(pick,1)/2;
0017     pick  = pick(1:Npick,:);
0018 end
0019 
0020 % plot color
0021 fclr = [0.9 0.7 0.6];
0022 eclr = 'none';
0023 
0024 light_mode = 1;
0025 max_mode   = 0;
0026 
0027 % plot brain
0028 vb_plot_surf(V, F, fclr,eclr,light_mode,max_mode)
0029 hold on; 
0030 plot3(pick(:,1),pick(:,2),pick(:,3),'ob');
0031 
0032 title([Measurement ' sensor and brain model'])
0033 
0034 view( [ -60  30] ); 
0035 xlabel('X')
0036 ylabel('Y')
0037 zlabel('Z')

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005