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

vb_plot_slice_multi

PURPOSE ^

plot transverse slice image

SYNOPSIS ^

function vb_plot_slice_multi(B,V,zindx,mode,Nsubfig,Msize,Mtype,dz,vdim)

DESCRIPTION ^

 plot transverse slice image 

 B : 3D-image
 V : vertex coordinate
     if empty, no vertex plot
 zindx : slice z-coordinate
 mode : 2D plot mode for X-Y 
      = 0   : plot without transpose
      = 1   : plot by transposing 2D-image matrix
 Nsubfig = [NX NY] : # of Subplot 
 Msize : Marker size
 Mtype : Marker type
 dz   : slice width
 vdim : slice cut direction
      = 'x' : Sagittal cut : Y-Z plane
      = 'y' : Coronal cut : X-Z plane
      = 'z' : Transverse (Axial) cut : X-Y plane

 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_slice_multi(B,V,zindx,mode,Nsubfig,Msize,Mtype,dz,vdim)
0002 % plot transverse slice image
0003 %
0004 % B : 3D-image
0005 % V : vertex coordinate
0006 %     if empty, no vertex plot
0007 % zindx : slice z-coordinate
0008 % mode : 2D plot mode for X-Y
0009 %      = 0   : plot without transpose
0010 %      = 1   : plot by transposing 2D-image matrix
0011 % Nsubfig = [NX NY] : # of Subplot
0012 % Msize : Marker size
0013 % Mtype : Marker type
0014 % dz   : slice width
0015 % vdim : slice cut direction
0016 %      = 'x' : Sagittal cut : Y-Z plane
0017 %      = 'y' : Coronal cut : X-Z plane
0018 %      = 'z' : Transverse (Axial) cut : X-Y plane
0019 %
0020 % Copyright (C) 2011, ATR All Rights Reserved.
0021 % License : New BSD License(see VBMEG_LICENSE.txt)
0022 
0023 % written by M. Sato  2005-8-1
0024 
0025 % zindx : slice z-coordinate
0026 if nargin < 3, zindx = [2:2:60]; end;
0027 
0028 % Mode switch for Vertex plot
0029 if nargin < 4, mode=0; end;
0030 
0031 % # of Subplot
0032 if nargin < 5, Nsubfig = [ 3, 3 ]; end;
0033 
0034 % Marker size
0035 if nargin < 6, Msize=2; end;
0036 
0037 % Marker type
0038 if nargin < 7, Mtype='y.'; end;
0039 
0040 % Slice width
0041 if nargin < 8, dz=1.5; end;
0042 
0043 % Slice direction
0044 if nargin < 9, vdim='z'; end;
0045 
0046 NX=Nsubfig(1); 
0047 NY=Nsubfig(2); 
0048 
0049 % z-width for vartex selection
0050 dz = 1;
0051 
0052 Nfig = length(zindx);
0053 nfig = NX*NY;
0054 
0055 for n=1:Nfig
0056     if nfig==NX*NY, 
0057         figure; nfig=1;
0058     else
0059         nfig=nfig+1;
0060     end;
0061     
0062     subplot(NY,NX,nfig);
0063     z = zindx(n);
0064     
0065     [strX,strY,strZ] = vb_plot_3d_image(B, z, vdim, mode);
0066     
0067     title(sprintf('%s-slice (%3d)',strZ,zindx(n)))
0068     xlabel(strX);
0069     ylabel(strY);
0070 
0071     hold on
0072     
0073     if ~exist('V','var') | isempty(V), continue; end;
0074     
0075     % vertex plot
0076     vb_plot_vertex(V, vdim, z, dz, Msize, Mtype, mode)
0077 end;
0078 
0079 %colormap(gray);
0080 %colormap(jet);
0081 
0082

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