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 load(brainfile,'V','F')
0038
0039 V = vb_spm_right_to_analyze_right( V, Vdim, Vsize);
0040 figure(h1);
0041 vb_plot_slice_surf([], V, F.F3, xindx, 'x', Nfigx, Mtype{6}, dmax, 0);
0042 figure(h2);
0043 vb_plot_slice_surf([], V, F.F3, zindx, 'z', Nfigz, Mtype{6}, dmax, 1);
0044 end
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054 if ~iscell(headfile), headfile = {headfile}; end;
0055
0056 dmax = 10;
0057 Nfile = length(headfile);
0058
0059 for n=1:Nfile
0060 if isempty(headfile{n}), continue; end;
0061 load(headfile{n},'Vhead','Fhead')
0062 Vhead = vb_spm_right_to_analyze_right( Vhead, Vdim, Vsize);
0063 figure(h1);
0064 vb_plot_slice_surf( [], Vhead, Fhead, xindx, 'x', Nfigx, Mtype{n},dmax,0);
0065 figure(h2);
0066 vb_plot_slice_surf( [], Vhead, Fhead, zindx, 'z', Nfigz, Mtype{n},dmax,1);
0067 end