0001 function vb_plot_fit_vivid(V,F,Coord,trans_mat,imagefile)
0002
0003
0004
0005
0006
0007
0008 fwgcolor = 'none';
0009 edgecolor = 'r';
0010
0011 LV = []; LF = [];
0012 RV = []; RF = [];
0013 FV = []; FF = [];
0014
0015 if isfield(Coord,'LV')
0016 LV = vb_affine_trans(Coord.LV, trans_mat);
0017 LF = Coord.LF;
0018 end
0019 if isfield(Coord,'RV')
0020 RV = vb_affine_trans(Coord.RV, trans_mat);
0021 RF = Coord.RF;
0022 end
0023 if isfield(Coord,'FV')
0024 FV = vb_affine_trans(Coord.FV, trans_mat);
0025 FF = Coord.FF;
0026 end
0027
0028
0029
0030
0031
0032
0033 figure;
0034
0035
0036 subplot(2,2,1)
0037 vb_plot_surf(V,F,[0.8 0.7 0.6],'none',1);
0038 alpha(0.7)
0039 hold on
0040 vb_plot_surf(LV, LF, fwgcolor,edgecolor);
0041 vb_plot_surf(RV, RF, fwgcolor,edgecolor);
0042 vb_plot_surf(FV, FF, fwgcolor,edgecolor);
0043 view([90 0]); axis tight;
0044
0045
0046 subplot(2,2,2)
0047 vb_plot_surf(V,F,[0.8 0.7 0.6],'none',1);
0048 alpha(0.7)
0049 hold on
0050 vb_plot_surf(LV, LF, fwgcolor,edgecolor);
0051 vb_plot_surf(RV, RF, fwgcolor,edgecolor);
0052 vb_plot_surf(FV, FF, fwgcolor,edgecolor);
0053 view([180 0]); axis tight;
0054
0055
0056 subplot(2,2,3)
0057 vb_plot_surf(V,F,[0.8 0.7 0.6],'none',1);
0058 alpha(0.7)
0059 hold on
0060 vb_plot_surf(LV, LF, fwgcolor,edgecolor);
0061 vb_plot_surf(RV, RF, fwgcolor,edgecolor);
0062 vb_plot_surf(FV, FF, fwgcolor,edgecolor);
0063 view([0 90]); axis tight;
0064
0065
0066 subplot(2,2,4)
0067 vb_plot_surf(V,F,[0.8 0.7 0.6],'none',1);
0068 alpha(0.7)
0069 hold on
0070 vb_plot_surf(LV, LF, fwgcolor,edgecolor);
0071 vb_plot_surf(RV, RF, fwgcolor,edgecolor);
0072 vb_plot_surf(FV, FF, fwgcolor,edgecolor);
0073 view([120 30]); axis tight;
0074
0075
0076
0077
0078 zindx = [40:20:200];
0079
0080 Nfig = [3, 3];
0081
0082 Mtype = 'y-';
0083
0084 dmax = 10;
0085
0086 xymode = 1;
0087
0088 if exist('imagefile','var')&&~isempty(imagefile)
0089
0090 [B, Vdim, Vsize] = vb_load_analyze_to_right(imagefile);
0091
0092
0093 if ~isempty(LV)
0094 LV = vb_spm_right_to_analyze_right( [LV], Vdim, Vsize);
0095 vb_plot_slice_surf(B, LV, LF, zindx,'z', Nfig, Mtype, dmax, xymode);
0096 end
0097 if ~isempty(RV)
0098 RV = vb_spm_right_to_analyze_right( [RV], Vdim, Vsize);
0099 vb_plot_slice_surf(B, RV, RF, zindx,'z', Nfig, Mtype, dmax, xymode);
0100 end
0101 if ~isempty(FV)
0102 FV = vb_spm_right_to_analyze_right( [FV], Vdim, Vsize);
0103 vb_plot_slice_surf(B, FV, FF, zindx,'z', Nfig, Mtype, dmax, xymode);
0104 end
0105 end