Home > vbmeg > functions > plotfunc > check_model > vb_check_sensor.m

vb_check_sensor

PURPOSE ^

Plot cortex and sensor location.

SYNOPSIS ^

function vb_check_sensor(brainfile, megfile)

DESCRIPTION ^

 Plot cortex and sensor location.
 [Usage]
    vb_check_sensor(brainfile, megfile);
 [Input]
    brainfile : VBMEG brain file(.brain.mat)
    megfile   : VBMEG MEG file(.meg.mat) or EEG file(.eeg.mat)
 [Output]
    none
 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 % Plot cortex and sensor location.
0003 % [Usage]
0004 %    vb_check_sensor(brainfile, megfile);
0005 % [Input]
0006 %    brainfile : VBMEG brain file(.brain.mat)
0007 %    megfile   : VBMEG MEG file(.meg.mat) or EEG file(.eeg.mat)
0008 % [Output]
0009 %    none
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
0012 
0013 % Load sensor and sphere center position
0014 %[pick,Qpick,Wsensor,Vcenter] = vb_load_sensor(megfile);
0015 Measurement = vb_megfile_get_measurement(megfile);
0016 
0017 % Load brain model
0018 [V,F] = vb_load_cortex(brainfile, 'subj');
0019 
0020 if ~isempty(F) 
0021     F     = F.F3;
0022 end
0023 [pick] = vb_load_channel(megfile);
0024 
0025 % plot color
0026 fclr = [0.72 0.59 0.45];
0027 
0028 % plot brain
0029 plot3(V(:,1), V(:,2), V(:,3), '.', 'color', fclr);
0030 hold on; 
0031 
0032 % plot sensor
0033 plot3(pick(:,1),pick(:,2),pick(:,3),'bo');
0034 
0035 title([Measurement ' sensor and brain model'])
0036 
0037 view( [ -60  30] ); 
0038 xlabel('X')
0039 ylabel('Y')
0040 zlabel('Z')
0041 axis equal;
0042 axis tight;
0043 rotate3d;

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