Home > functions > plotfunc > vb_plot_surf_value.m

vb_plot_surf_value

PURPOSE ^

plot activity value on a surface

SYNOPSIS ^

function vb_plot_surf_value(V,F,J,wmin,wmax);

DESCRIPTION ^

 plot activity value on a surface
   vb_plot_surf_value(V,F,J);
   vb_plot_surf_value(V,F,J,wmin);
   vb_plot_surf_value(V,F,J,wmin,wmax);
   vb_plot_surf_value(V,F,J,wmin,[0 wmax]);

 V : Vertices of surface model [Nvertex x 3]
 F : Faces of surface model    [Npatch  x 3]
 J : activity on the surface   [Nvertex x 1]
 wmin : values larger than wmin is plotted [default = max(abs(J))*0.01]
 wmax : max value of color axis [default = max(abs(J))]
        if wmax = [0  abs_max], absolute value of J is plotted

 Masa-aki Sato

 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:

SOURCE CODE ^

0001 function vb_plot_surf_value(V,F,J,wmin,wmax);
0002 % plot activity value on a surface
0003 %   vb_plot_surf_value(V,F,J);
0004 %   vb_plot_surf_value(V,F,J,wmin);
0005 %   vb_plot_surf_value(V,F,J,wmin,wmax);
0006 %   vb_plot_surf_value(V,F,J,wmin,[0 wmax]);
0007 %
0008 % V : Vertices of surface model [Nvertex x 3]
0009 % F : Faces of surface model    [Npatch  x 3]
0010 % J : activity on the surface   [Nvertex x 1]
0011 % wmin : values larger than wmin is plotted [default = max(abs(J))*0.01]
0012 % wmax : max value of color axis [default = max(abs(J))]
0013 %        if wmax = [0  abs_max], absolute value of J is plotted
0014 %
0015 % Masa-aki Sato
0016 %
0017 % Copyright (C) 2011, ATR All Rights Reserved.
0018 % License : New BSD License(see VBMEG_LICENSE.txt)
0019 
0020 NV = size(V,1);
0021 
0022 if nargin < 4, wmin = max(abs(J))*0.01; end;
0023 if nargin < 5, wmax = max(abs(J)); end;
0024 
0025 if length(wmax)==2 && wmax(1)==0, J = abs(J); end;
0026 
0027 ix = find(abs(J) >= wmin);
0028 
0029 if ~isempty(ix)
0030     % Superimpose activity on cortical surface
0031     FF = vb_patch_select2(ix,F,NV);  
0032 
0033     patch('Faces',FF,'Vertices',V,'FaceColor','interp',...
0034         'FaceVertexCData',J,'EdgeColor','none',...
0035         'FaceLighting','none');
0036 end
0037 
0038 material dull;
0039 
0040 if length(wmax)==1,
0041     caxis([-wmax wmax]);
0042     colormap(jet);
0043 elseif length(wmax)==2,
0044     caxis([wmax]);
0045     if wmax(1)==0,
0046         colormap(hot);
0047     else
0048         colormap(jet);
0049     end
0050 end
0051 
0052 
0053 return

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005