freesurfer_surf_combine - combine lh and rh surfaces [FV] = freesurfer_surf_combine(FV_lh, FV_rh) It is assumed that each FV input is a struct: FV.vertices = Nx3 FV.faces = Nx3 After combining surfaces, try: patch('vertices',FV.vertices,'faces',FV.faces,.. 'facecolor',[1 0 0],'edgecolor','none'); light See also freesurfer_read_surf, freesurfer_surf_separate
0001 function [FV3] = freesurfer_surf_combine(FV1, FV2) 0002 0003 % freesurfer_surf_combine - combine lh and rh surfaces 0004 % 0005 % [FV] = freesurfer_surf_combine(FV_lh, FV_rh) 0006 % 0007 % It is assumed that each FV input is a struct: 0008 % FV.vertices = Nx3 0009 % FV.faces = Nx3 0010 % 0011 % After combining surfaces, try: 0012 % patch('vertices',FV.vertices,'faces',FV.faces,.. 0013 % 'facecolor',[1 0 0],'edgecolor','none'); light 0014 % 0015 % See also freesurfer_read_surf, freesurfer_surf_separate 0016 % 0017 0018 0019 % $Revision: 1.3 $ $Date: 2005/08/14 21:23:08 $ 0020 0021 % Copyright (C) 2005 Darren L. Weber 0022 % 0023 % This program is free software; you can redistribute it and/or 0024 % modify it under the terms of the GNU General Public License 0025 % as published by the Free Software Foundation; either version 2 0026 % of the License, or (at your option) any later version. 0027 % 0028 % This program is distributed in the hope that it will be useful, 0029 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0030 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0031 % GNU General Public License for more details. 0032 % 0033 % You should have received a copy of the GNU General Public License 0034 % along with this program; if not, write to the Free Software 0035 % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 0036 % USA. 0037 0038 % History: 05/2005, Darren.Weber_at_radiology.ucsf.edu 0039 % 0040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0041 0042 ver = '$Revision: 1.3 $ $Date: 2005/08/14 21:23:08 $'; 0043 fprintf('FREESURFER_SURF_COMBINE [v %s]\n\n',ver(11:15)); 0044 0045 FV3.vertices = [FV1.vertices; FV2.vertices]; 0046 FV3.faces = [FV1.faces; (FV2.faces + length(FV1.vertices))]; 0047 0048 return