0001 function job_edit_act_plotbrain(plot_parm,V,F,inf_C,J,Jmin,Jmax)
0002
0003
0004
0005
0006
0007
0008
0009 vb_plot_cortex(plot_parm, V, F, inf_C);
0010
0011
0012 switch plot_parm.LRflag
0013 case 'L'
0014 F0 = F.F3L;
0015 case 'R'
0016 F0 = F.F3R;
0017 case 'LR'
0018 F0 = F.F3;
0019 end
0020
0021
0022 index = plot_parm.index;
0023
0024 if plot_parm.isact
0025 plot_value(plot_parm,V,F0,J,index,Jmin,Jmax);
0026 end
0027
0028 function plot_value(plot_parm,V,F0,J,index,wmin,wmax);
0029
0030
0031
0032
0033 if length(J) == 0
0034 return;
0035 end
0036
0037
0038 tmp = ones(length(J),1);
0039 else
0040 tmp = zeros(length(J),1);
0041 tmp(index) = 1;
0042 end
0043
0044
0045 tmp2 = zeros(length(J),1);
0046 tmp2(unique(F0(:))) = 1;
0047
0048 tmp = J.*tmp.*tmp2;
0049 ix = find(abs(tmp) >= wmin);
0050 if plot_parm.wmode==1
0051 J = abs(J);
0052 end
0053
0054
0055 if plot_parm.paint==1
0056 h = scatter3(V(ix,1),V(ix,2),V(ix,3),1,J(ix),'.','filled');
0057 set(h,'MarkerSize',plot_parm.ms);
0058 else
0059 FF = vb_patch_select2(ix,F0,size(V,1));
0060 patch('Faces',FF,'Vertices',V,'FaceColor','interp',...
0061 'FaceVertexCData',J,'EdgeColor','none',...
0062 'FaceLighting','none');
0063 material dull;
0064 end
0065
0066 if plot_parm.wmode==1
0067 caxis([0 wmax]);
0068 else
0069 caxis([-wmax wmax]);
0070 end
0071
0072 if plot_parm.cmap==1
0073 colormap(hot);
0074 else
0075 colormap(jet);
0076 end
0077