Home > bioelectromagnetism > freesurfer_plot_scalar.m

freesurfer_plot_scalar

PURPOSE ^

freesurfer_plot_scalar

SYNOPSIS ^

function [Hp] = freesurfer_plot_scalar(surf,scalar)

DESCRIPTION ^

 freesurfer_plot_scalar

 [Hp] = freesurfer_plot_scalar(surf,scalar)

 returns a handle to the patch object in Hp.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Hp] = freesurfer_plot_scalar(surf,scalar)
0002 
0003 % freesurfer_plot_scalar
0004 %
0005 % [Hp] = freesurfer_plot_scalar(surf,scalar)
0006 %
0007 % returns a handle to the patch object in Hp.
0008 %
0009 
0010 
0011 % $Revision: 1.1 $ $Date: 2005/08/14 21:24:19 $
0012 
0013 % Copyright (C) 2005  Darren L. Weber
0014 %
0015 % This program is free software; you can redistribute it and/or
0016 % modify it under the terms of the GNU General Public License
0017 % as published by the Free Software Foundation; either version 2
0018 % of the License, or (at your option) any later version.
0019 %
0020 % This program is distributed in the hope that it will be useful,
0021 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0022 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0023 % GNU General Public License for more details.
0024 %
0025 % You should have received a copy of the GNU General Public License
0026 % along with this program; if not, write to the Free Software
0027 % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
0028 % USA.
0029 
0030 % History:  09/2005, Darren.Weber_at_radiology.ucsf.edu
0031 %
0032 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0033 
0034 ver = '$Revision: 1.1 $ $Date: 2005/08/14 21:24:19 $';
0035 fprintf('FREESURFER_PLOT_SCALAR [v %s]\n',ver(11:15));
0036 
0037 
0038 figure; hold on
0039 Hp = patch('vertices',surf.vertices,'faces',surf.faces,...
0040     'facecolor','interp','edgecolor','none',...
0041     'FaceVertexCData',scalar);
0042 
0043 colormap(jet); colorbar
0044 
0045 daspect([1,1,1])
0046 material dull
0047 lighting phong
0048 axis off
0049 
0050 rotate3d
0051 
0052 return

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003