0001 function vb_plot_slice_head(headfile,analyzefile,brainfile)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 Mtype = { 'y-' , 'r-' , 'c-' , 'g-' , 'w-', 'm.'};
0015 dmax = 5;
0016
0017
0018 [B, Vdim, Vsize] = vb_load_analyze_to_right(analyzefile);
0019
0020
0021 Nfigx = [2, 2] ;
0022 Nfigz = [2, 2] ;
0023
0024 xindx = fix(Vdim(1)* [0.2:0.2:0.8]);
0025 zindx = fix(Vdim(3)* [0.4:0.1:0.7]);
0026
0027
0028
0029
0030 h1 = vb_plot_slice_surf( B, [], [], xindx, 'x', Nfigx, Mtype{6}, dmax, 0);
0031 h2 = vb_plot_slice_surf( B, [], [], zindx, 'z', Nfigz, Mtype{6}, dmax, 1);
0032
0033
0034
0035
0036 if exist('brainfile','var') & ~isempty(brainfile)
0037 dz = 5;
0038 Msize = 2;
0039 V = vb_load_cortex(brainfile, 'subj');
0040
0041 V = vb_spm_right_to_analyze_right( V, Vdim, Vsize);
0042 figure(h1);
0043
0044 for k=1:length(xindx)
0045 subplot(Nfigx(1), Nfigx(2), k);
0046 vb_plot_vertex(V, 'x', xindx(k), dz, Msize, Mtype{6}, 0);
0047 end
0048 figure(h2);
0049 for k=1:length(zindx)
0050 subplot(Nfigz(1), Nfigz(2), k);
0051 vb_plot_vertex(V, 'z', zindx(k), dz, Msize, Mtype{6}, 1);
0052 end
0053
0054 end
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 if ~iscell(headfile), headfile = {headfile}; end;
0065
0066 dmax = 10;
0067 Nfile = length(headfile);
0068
0069 for n=1:Nfile
0070 if isempty(headfile{n}), continue; end;
0071 load(headfile{n},'Vhead','Fhead')
0072 Vhead = vb_spm_right_to_analyze_right( Vhead, Vdim, Vsize);
0073 figure(h1);
0074 vb_plot_slice_surf( [], Vhead, Fhead, xindx, 'x', Nfigx, Mtype{n},dmax,0);
0075 figure(h2);
0076 vb_plot_slice_surf( [], Vhead, Fhead, zindx, 'z', Nfigz, Mtype{n},dmax,1);
0077 end