0001 function job_edit_area_plotbrain(plot_parm,V,F,inf_C,Iextract)
0002
0003
0004
0005
0006
0007
0008
0009 if isfield(plot_parm,'color') & ~isempty(plot_parm.color)
0010 fclr = plot_parm.color;
0011 else
0012 fclr = [0.8 0.8 0.8];
0013 end
0014
0015
0016 switch plot_parm.LRflag
0017 case 'L'
0018 F0 = F.F3L;
0019 case 'R'
0020 F0 = F.F3R;
0021 case 'LR'
0022 F0 = F.F3;
0023 end
0024
0025
0026 index = plot_parm.index;
0027 if length(index) == 0, FF = F0;
0028 else FF = vb_patch_select2(index,F0,size(V,1)); end;
0029
0030 if isempty(inf_C)
0031
0032 patch('Faces',FF,'Vertices',V,'FaceColor',fclr,...
0033 'FaceLighting','phong','EdgeColor','none');
0034
0035
0036 camlight headlight
0037 else
0038 c = repmat(fclr,[length(inf_C) 1]) ...
0039 -0.4*[fclr(1)*inf_C fclr(2)*inf_C fclr(3)*inf_C];
0040 patch('Faces',FF,'Vertices',V,'FaceColor','interp',...
0041 'EdgeColor','none','FaceVertexCData',c);
0042 end
0043 material dull;
0044 hold on;
0045
0046
0047 plot_area(plot_parm,V,F0,Iextract);
0048
0049 function plot_area(plot_parm,V,F0,Iextract);
0050
0051
0052
0053 alpha = 0.7;
0054 ix = Iextract;
0055 ix2 = intersect(ix,unique(F0(:)));
0056 FF = vb_patch_select2(ix,F0,size(V,1));
0057 patch('Faces',FF,'Vertices',V,'FaceAlpha',alpha,...
0058 'FaceColor','b','EdgeColor','none','FaceLighting','none');