Home > vbmeg > functions > job > job_edit_act_dir > job_edit_act_plotbrain.m

job_edit_act_plotbrain

PURPOSE ^

SYNOPSIS ^

function job_edit_act_plotbrain(plot_parm,V,F,inf_C,J,Jmin,Jmax)

DESCRIPTION ^

 Plot brain model


 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function job_edit_act_plotbrain(plot_parm,V,F,inf_C,J,Jmin,Jmax)
0002 %
0003 % Plot brain model
0004 %
0005 %
0006 % Copyright (C) 2011, ATR All Rights Reserved.
0007 % License : New BSD License(see VBMEG_LICENSE.txt)
0008 
0009 vb_plot_cortex(plot_parm, V, F, inf_C);
0010 
0011 % Left/Right hemisphere
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 % Select visible patches
0022 index = plot_parm.index;
0023 % Display activity
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 % x\ヲ
0031 %
0032 
0033 if length(J) == 0
0034   return;
0035 end
0036 
0037 % Iif length(index) == 0
0038   tmp = ones(length(J),1);
0039 else  
0040   tmp = zeros(length(J),1);
0041   tmp(index) = 1;
0042 end
0043 
0044 % ]^E]
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 % x]fd\ヲ
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

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005