Home > vbmeg > functions > plotfunc > subdirectory > vb_plot_head_mask.m

vb_plot_head_mask

PURPOSE ^

SYNOPSIS ^

function vb_plot_head_mask(B,indx,vdim,V1,F1,V2,F2)

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    vb_plot_head_mask(B,indx,vdim,V1,F1,V2,F2)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 % plot analyze data
0007 xymode = 0; %  2D plot mode for X-Y  ( = 0 or 1)
0008 Mtype =  {'r-'; 'b-'} ;
0009 
0010 Vmax = max(V1,[],1);
0011 Vmin = min(V1,[],1);
0012 
0013 if isempty(indx) 
0014     if    isempty(vdim)
0015         vdim  = ['z','z','z','x','x','x']; 
0016         Nslice = 3;
0017         Vstp = (Vmax - Vmin)/(Nslice+1);
0018         xinx = fix((1:Nslice)*Vstp(1) + Vmin(1));
0019         zinx = fix((1:Nslice)*Vstp(3) + Vmin(3));
0020         indx = [zinx xinx];
0021     elseif    length(vdim)==1
0022         Nslice = 6;
0023         Vstp = (Vmax - Vmin)/(Nslice+1);
0024         switch    vdim
0025         case    'x'
0026             indx = fix((1:Nslice)*Vstp(1) + Vmin(1));
0027         case    'y'
0028             indx = fix((1:Nslice)*Vstp(2) + Vmin(2));
0029         case    'z'
0030             indx = fix((1:Nslice)*Vstp(3) + Vmin(3));
0031         end
0032         vdim = repmat(vdim, [1 Nslice]);
0033     end
0034 end
0035 
0036 dmax  = 10; 
0037 Nfig  = length(indx);
0038 Msize = 1;
0039 
0040 NY = 2;
0041 NX = ceil(Nfig/NY);
0042 
0043 for n=1:Nfig
0044     subplot(NY,NX,n)
0045     
0046     if ~isempty(B)
0047         vb_plot_3d_image(B, indx(n), vdim(n), xymode);
0048         axis('equal'); 
0049         axis('tight');
0050         colormap(gray);
0051         title(sprintf('%s = %d',vdim(n),indx(n)))
0052         hold on
0053     end
0054     if exist('V1','var')
0055         vb_plot_cross_section(V1,F1,indx(n),vdim(n),...
0056                           dmax,Msize,Mtype{1},xymode);    
0057     end
0058     if exist('V2','var')
0059         vb_plot_cross_section(V2,F2,indx(n),vdim(n),...
0060                           dmax,Msize,Mtype{2},xymode);    
0061     end
0062 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005