0001 function vb_plot_head_surf(headfile,brainfile,plot_parm)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 if ~iscell(headfile), headfile = {headfile}; end;
0018
0019 if ~exist('plot_parm','var'), plot_parm = []; end;
0020
0021 if ~isfield(plot_parm,'mode'), plot_parm.mode = 0; end;
0022 if ~isfield(plot_parm,'vangle'), plot_parm.vangle = [40 25 ]; end
0023
0024
0025 N = length(headfile);
0026
0027
0028 if exist('brainfile','var') & ~isempty(brainfile)
0029 Nfig = N + 1;
0030 else
0031 Nfig = N;
0032 end
0033
0034 light_mode = 0;
0035 max_mode = 1;
0036
0037 figure
0038 nfig = 0;
0039
0040 if plot_parm.mode==1,
0041 if isfield(plot_parm,'NX'),
0042 NX = plot_parm.NX;
0043 else
0044 NX = 2;
0045 end
0046 NY = ceil(Nfig/NX);
0047 nfig = nfig + 1;
0048 subplot(NY,NX,nfig)
0049 end
0050
0051
0052
0053
0054 if exist('brainfile','var') & ~isempty(brainfile)
0055 load(brainfile,'V','F')
0056 F = F.F3;
0057
0058
0059 vb_plot_surf(V,F,'none','k')
0060 hold on
0061 view(plot_parm.vangle)
0062 end
0063
0064
0065
0066
0067
0068 for n=1:N
0069 load(headfile{n},'Vhead','Fhead')
0070
0071 if plot_parm.mode==1,
0072 nfig = nfig + 1;
0073 subplot(NY,NX,nfig)
0074 end
0075
0076 vb_plot_surf(Vhead,Fhead,[],[],light_mode,max_mode)
0077 hold on
0078 view(plot_parm.vangle)
0079 end
0080
0081
0082
0083 clear Vhead Fhead V F
0084