Home > functions > plotfunc > vb_plot_vivid.m

vb_plot_vivid

PURPOSE ^

Plot vivid 2D image and 3D image to get marker position

SYNOPSIS ^

function figH = vb_plot_vivid(Coord,xy_mode)

DESCRIPTION ^

 Plot vivid 2D image and 3D image to get marker position
   Coord    : Vivid coordinate
   xy_mode  = 0; 2D-coordinate Y : 上(1) -> 下(400)
   xy_mode  = 1; 2D-coordinate Y : 下(1) -> 上(400)

 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    figH = vb_plot_vivid(Coord,xy_mode)
0002 % Plot vivid 2D image and 3D image to get marker position
0003 %   Coord    : Vivid coordinate
0004 %   xy_mode  = 0; 2D-coordinate Y : 上(1) -> 下(400)
0005 %   xy_mode  = 1; 2D-coordinate Y : 下(1) -> 上(400)
0006 %
0007 % Copyright (C) 2011, ATR All Rights Reserved.
0008 % License : New BSD License(see VBMEG_LICENSE.txt)
0009 
0010 if nargin <2, xy_mode = 0; end;
0011 
0012 if isfield(Coord, 'Fimg')
0013     NX  = 3;
0014     NY  = 2;
0015     Flg = 1;
0016 else
0017     NX  = 2;
0018     NY  = 2;
0019     Flg = 0;
0020 end
0021 
0022 % Plot parameter
0023 fwgcolor   = 'w';
0024 edgecolor  = 'k';
0025 
0026 % SPM-R
0027 %   X: 左->右   Left(-191/2)   -> Right(191/2)
0028 %   Y: 後->前   Back(-256/2)   -> Front(256/2)
0029 %   Z: 下->上   Bottom(-256/2) -> Top(256/2)
0030 %
0031 %view([180, 0]);    % Front view (from +Y axis)
0032 %view([ 90, 0]);    % Right view (from +X axis)
0033 %view([-90, 0]);    % Left view  (from -X axis)
0034 %view([  0, 90]);   % Top view   (from +Z axis)
0035 
0036 angleL = [-100 10];
0037 angleF = [ 30 -10];
0038 angleR = [ 100 10];
0039 
0040 figH = figure;
0041 
0042 %
0043 % ----- Plot 2D Image
0044 %
0045 
0046 % Plot Left 2D Image
0047 nfig = 1;
0048 subplot(NY,NX,nfig)
0049 vb_plot_2d_image(Coord.Limg ,xy_mode); hold on
0050 
0051 if Flg==1
0052     % Plot Front 2D Image
0053     nfig = nfig + 1;
0054     subplot(NY,NX,nfig)
0055     vb_plot_2d_image(Coord.Fimg ,xy_mode); hold on
0056 end
0057 
0058 % Plot Right 2D Image
0059 nfig = nfig + 1;
0060 subplot(NY,NX,nfig)
0061 vb_plot_2d_image(Coord.Rimg ,xy_mode); hold on
0062 
0063 %
0064 % ----- Plot 3D Image
0065 %
0066 
0067 % Plot 3D Coordinate Left View
0068 nfig = nfig + 1;
0069 subplot(NY,NX,nfig)
0070 vb_plot_surf(Coord.LV, Coord.LF, fwgcolor,edgecolor);
0071 view(angleL); axis tight; hold on
0072 
0073 if Flg==1
0074     % Plot 3D Coordinate Front View
0075     nfig = nfig + 1;
0076     subplot(NY,NX,nfig)
0077     vb_plot_surf(Coord.FV, Coord.FF, fwgcolor,edgecolor);
0078     view(angleF); axis tight; hold on
0079 end
0080 
0081 % Plot 3D Coordinate Right View
0082 nfig = nfig + 1;
0083 subplot(NY,NX,nfig)
0084 vb_plot_surf(Coord.RV, Coord.RF, fwgcolor,edgecolor);
0085 view(angleR); axis tight; hold on

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005