0001 <div class="moz-text-flowed" style="font-family: -moz-fixed">function newverts = patch_swell(iverts,vconn); 0002 %PATCH_SWELL - enlarge a patch by appending the next set of adjacent vertices 0003 % function newverts = patch_swell(iverts,vconn); 0004 % iverts is an index list of vertex numbers, will be converted to a row vec. 0005 % vconn is the cell array of vertex connectivity 0006 % newverts is the row vec list of NEW vertex numbers adjacent the patch 0007 % Concatenate to swell the patch: patch = [patch(:)' patch_swell(patch,vconn)]; 0008 0009 %<autobegin> ---------------------- 26-May-2004 11:34:07 ----------------------- 0010 % --------- Automatically Generated Comments Block Using AUTO_COMMENTS --------- 0011 % 0012 % CATEGORY: Visualization 0013 % 0014 % At Check-in: $Author: Mosher $ $Revision: 12 $ $Date: 5/26/04 10:02a $ 0015 % 0016 % This software is part of BrainStorm Toolbox Version 2.0 (Alpha) 24-May-2004 0017 % 0018 % Principal Investigators and Developers: 0019 % ** Richard M. Leahy, PhD, Signal & Image Processing Institute, 0020 % University of Southern California, Los Angeles, CA 0021 % ** John C. Mosher, PhD, Biophysics Group, 0022 % Los Alamos National Laboratory, Los Alamos, NM 0023 % ** Sylvain Baillet, PhD, Cognitive Neuroscience & Brain Imaging Laboratory, 0024 % CNRS, Hopital de la Salpetriere, Paris, France 0025 % 0026 % See BrainStorm website at http://neuroimage.usc.edu for further information. 0027 % 0028 % Copyright (c) 2004 BrainStorm by the University of Southern California 0029 % This software distributed under the terms of the GNU General Public License 0030 % as published by the Free Software Foundation. Further details on the GPL 0031 % license can be found at http://www.gnu.org/copyleft/gpl.html . 0032 % 0033 % FOR RESEARCH PURPOSES ONLY. THE SOFTWARE IS PROVIDED "AS IS," AND THE 0034 % UNIVERSITY OF SOUTHERN CALIFORNIA AND ITS COLLABORATORS DO NOT MAKE ANY 0035 % WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF 0036 % MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, NOR DO THEY ASSUME ANY 0037 % LIABILITY OR RESPONSIBILITY FOR THE USE OF THIS SOFTWARE. 0038 %<autoend> ------------------------ 26-May-2004 11:34:07 ----------------------- 0039 0040 0041 % John C. Mosher, Ph.D. 0042 % See Copyright file for information 0043 % $Date: 5/26/04 10:02a $ $Revision: 12 $ 0044 0045 [m,n] = size(iverts); 0046 if(m~=1), 0047 iverts = iverts(:)'; % ensure row vector 0048 end 0049 0050 % concatenate all vertex connections for all verts 0051 newverts = [vconn{iverts}]; 0052 0053 % extract unique set of indices, remove existing vertices 0054 newverts = setdiff(newverts,iverts); 0055 0056 return 0057 </div>