0001 function vb_job_plot_fmri_flat_sample
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 sbj_id = 'TY';
0013 cond = 'Neon-Fix';
0014 data_dir = [sbj_id '/data/'];
0015 brain_file = [data_dir sbj_id '.brain.mat'];
0016 flat_file = [data_dir sbj_id '_occip.flat.mat'];
0017 act_file = [data_dir sbj_id '.act.mat'];
0018
0019
0020 plot_parm.LRflag = 'L';
0021 plot_parm.mtype = 'o';
0022
0023
0024 act = vb_get_act(act_file,[sbj_id '_' cond]);
0025 plot_parm.J = act.xxP;
0026
0027
0028 [Ndipole,NdipoleL,BV_index] = vb_load_cortex_info(brain_file);
0029 plot_parm.ix_J = [BV_index.Left; BV_index.Right];
0030 clear Ndipole NdipoleL BV_index
0031
0032
0033 load(flat_file,'Vflat','Cflat','Fflat','BV_index','Vinfo');
0034 plot_parm.V = Vflat;
0035 plot_parm.C = Cflat;
0036 BV_index = [BV_index.Left; BV_index.Right];
0037
0038
0039 ix_trans = zeros(max([BV_index; plot_parm.ix_J]),1);
0040 ix_trans(BV_index) = 1:length(BV_index);
0041 ix_J = ix_trans(plot_parm.ix_J);
0042
0043
0044 switch plot_parm.LRflag,
0045 case 'L',
0046 plot_parm.F = Fflat.F3L;
0047 ix = find(ix_J<=Vinfo.NdipoleL & ix_J~=0);
0048 case 'R',
0049 plot_parm.F = Fflat.F3R;
0050 ix = find(ix_J>Vinfo.NdipoleL & ix_J~=0);
0051 case 'LR',
0052 plot_parm.F = [Fflat.F3L; Fflat.F3R];
0053 ix = find(ix_J~=0);
0054 ix_L = 1:Vinfo.NdipoleL;
0055 ix_R = Vinfo.NdipoleL+1:size(Vflat,1);
0056 mapsize = max(Vflat(:,2))-min(Vflat(:,2));
0057 plot_parm.V(ix_L,2) = plot_parm.V(ix_L,2)-mapsize/2;
0058 plot_parm.V(ix_R,2) = plot_parm.V(ix_R,2)+mapsize/2;
0059 end
0060 clear Vflat Fflat Cflat;
0061
0062
0063 plot_parm.J = plot_parm.J(ix);
0064 plot_parm.ix_J = ix_J(ix);
0065
0066
0067 vb_plot_brain_flat(plot_parm);
0068 view([90 90]);
0069 axis equal;
0070 axis off;