Home > functions > plotfunc > check_model > vb_check_inflate_model.m

vb_check_inflate_model

PURPOSE ^

Plot brain model in 3D & on MRI slice for checking

SYNOPSIS ^

function vb_check_inflate_model(proj_root,brain_parm)

DESCRIPTION ^

 Plot brain model in 3D & on MRI slice for checking

 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_check_inflate_model(proj_root,brain_parm)
0002 % Plot brain model in 3D & on MRI slice for checking
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 %
0008 % Brain file
0009 %
0010 brainfile   = [proj_root '/' brain_parm.brain_file];
0011 
0012 %
0013 %---- Cortex inflate image
0014 %
0015 
0016 %---- Load vertex coordinate from brain file
0017 [V, F, xx, inf_C] = vb_load_cortex(brainfile,'Inflate');
0018 
0019 % View angle
0020 angle = [45 30; -45 30; -60 30; 60 30];
0021 
0022 Nfig  = 4;
0023 NY    = 2;
0024 NX    = 2;
0025 
0026 % Sulcus color
0027 cscale = -0.4;
0028 cmax   = 0.8;
0029 color = repmat( (1 + inf_C*cscale) * cmax, [1 3]);
0030 
0031 h = figure;
0032 set(h, 'renderer', 'zbuffer');
0033 
0034 subplot(NY,NX,1)
0035 patch('Faces',F.F3L,'Vertices',V,'FaceColor','interp',...
0036     'EdgeColor','none','FaceVertexCData',color);
0037 material dull;
0038 axis equal
0039 axis tight
0040 
0041 view(angle(1,:));
0042 title('Left brain')
0043 
0044 subplot(NY,NX,2)
0045 patch('Faces',F.F3R,'Vertices',V,'FaceColor','interp',...
0046     'EdgeColor','none','FaceVertexCData',color);
0047 material dull;
0048 axis equal
0049 axis tight
0050 
0051 view(angle(2,:));
0052 title('Right brain')
0053 
0054 subplot(NY,NX,3)
0055 patch('Faces',F.F3,'Vertices',V,'FaceColor','interp',...
0056     'EdgeColor','none','FaceVertexCData',color);
0057 material dull;
0058 axis equal
0059 axis tight
0060 
0061 view(angle(3,:));
0062 title('Both brain [Left angle]')
0063 
0064 subplot(NY,NX,4)
0065 patch('Faces',F.F3,'Vertices',V,'FaceColor','interp',...
0066     'EdgeColor','none','FaceVertexCData',color);
0067 material dull;
0068 axis equal
0069 axis tight
0070 
0071 view(angle(4,:));
0072 title('Both brain [Right angle]')

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