plot vertex on Analyze slice image V ;: Vertex 3D-coordinate [ Nvertex, 3 ] indx : slice index in vdim-axis dz : slice width V(:,az) >= (indx-dz) & V(:,az) <= (indx+dz) vdim : slice cut direction = 'x' : Sagittal cut : Y-Z plane = 'y' : Coronal cut : X-Z plane = 'z' : Transverse (Axial) cut : X-Y plane mode : 2D plot mode for X-Y = 0 : plot without transpose = 1 : plot by transposing 2D-image matrix Msize : Marker size Mtype : Marker type written by M. Sato 2005-8-1 Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_plot_vertex(V, vdim, indx, dz, Msize, Mtype, mode) 0002 % plot vertex on Analyze slice image 0003 % 0004 % V ;: Vertex 3D-coordinate [ Nvertex, 3 ] 0005 % indx : slice index in vdim-axis 0006 % dz : slice width 0007 % V(:,az) >= (indx-dz) & V(:,az) <= (indx+dz) 0008 % vdim : slice cut direction 0009 % = 'x' : Sagittal cut : Y-Z plane 0010 % = 'y' : Coronal cut : X-Z plane 0011 % = 'z' : Transverse (Axial) cut : X-Y plane 0012 % mode : 2D plot mode for X-Y 0013 % = 0 : plot without transpose 0014 % = 1 : plot by transposing 2D-image matrix 0015 % Msize : Marker size 0016 % Mtype : Marker type 0017 % 0018 % written by M. Sato 2005-8-1 0019 % 0020 % Copyright (C) 2011, ATR All Rights Reserved. 0021 % License : New BSD License(see VBMEG_LICENSE.txt) 0022 0023 0024 if nargin<4, dz=1.5; end; 0025 if nargin<5, Msize=1; end; 0026 if nargin<6, Mtype = 'y.'; end; 0027 if nargin<7, mode=0; end; 0028 0029 switch vdim 0030 case 'x', 0031 % 'SAG' : Sagittal cut : Y-Z plane 0032 ax = 2; 0033 ay = 3; 0034 az = 1; 0035 case 'y', 0036 % 'COR' : Coronal cut : X-Z plane 0037 ax = 1; 0038 ay = 3; 0039 az = 2; 0040 case 'z', 0041 % 'TRN' : Transverse (Axial) cut : X-Y plane 0042 ax = 1; 0043 ay = 2; 0044 az = 3; 0045 end 0046 0047 % vertex plot 0048 ix = find( V(:,az) >= (indx-dz) & V(:,az) < (indx+dz)); 0049 Nv = length(ix); 0050 0051 switch mode 0052 case 0, 0053 X = V(ix,ax); 0054 Y = V(ix,ay); 0055 case 1, 0056 X = V(ix,ay); 0057 Y = V(ix,ax); 0058 end 0059 0060 plot(X,Y,Mtype,'MarkerSize',Msize); 0061