Mask that excludes the inter-hemisphere cut. Usage: mask = SurfStatMaskCut( surf ); surf.coord = 3 x v matrix of surface coordinates, v=#vertices. mask = 1 x v vector, 1=inside, 0=outside, v=#vertices. It looks in -50<y<50 and -20<z<40, and mask vertices where |x|>thresh, where thresh = 1.5 x arg max of a histogram of |x|.
0001 function mask = SurfStatMaskCut( surf ); 0002 0003 %Mask that excludes the inter-hemisphere cut. 0004 % 0005 % Usage: mask = SurfStatMaskCut( surf ); 0006 % 0007 % surf.coord = 3 x v matrix of surface coordinates, v=#vertices. 0008 % 0009 % mask = 1 x v vector, 1=inside, 0=outside, v=#vertices. 0010 % 0011 % It looks in -50<y<50 and -20<z<40, and mask vertices where |x|>thresh, 0012 % where thresh = 1.5 x arg max of a histogram of |x|. 0013 0014 f=(abs(surf.coord(2,:))<50 ... 0015 & abs(surf.coord(3,:)-10)<30 ... 0016 & abs(surf.coord(1,:))<3); 0017 b=(0:0.02:3); 0018 h=hist(abs(surf.coord(1,f)),b); 0019 t=b(find(h==max(h)))*1.5; 0020 mask=~(abs(surf.coord(1,:))<t & f); 0021 0022 return 0023 end