Home > vbmeg > 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 if isempty(proj_root)
0011     brainfile   = [brain_parm.brain_file];
0012 else
0013     brainfile   = [proj_root '/' brain_parm.brain_file];
0014 end
0015 
0016 %
0017 %---- Cortex inflate image
0018 %
0019 
0020 %---- Load vertex coordinate from brain file
0021 [V, F, xx, inf_C] = vb_load_cortex(brainfile,'Inflate');
0022 
0023 % View angle
0024 angle = [45 30; -45 30; -60 30; 60 30];
0025 
0026 Nfig  = 4;
0027 NY    = 2;
0028 NX    = 2;
0029 
0030 % Sulcus color
0031 cscale = -0.4;
0032 cmax   = 0.8;
0033 color = repmat( (1 + inf_C*cscale) * cmax, [1 3]);
0034 
0035 h = figure;
0036 set(h, 'renderer', 'zbuffer');
0037 
0038 subplot(NY,NX,1)
0039 patch('Faces',F.F3L,'Vertices',V,'FaceColor','interp',...
0040     'EdgeColor','none','FaceVertexCData',color);
0041 material dull;
0042 axis equal
0043 axis tight
0044 
0045 view(angle(1,:));
0046 title('Left brain')
0047 
0048 subplot(NY,NX,2)
0049 patch('Faces',F.F3R,'Vertices',V,'FaceColor','interp',...
0050     'EdgeColor','none','FaceVertexCData',color);
0051 material dull;
0052 axis equal
0053 axis tight
0054 
0055 view(angle(2,:));
0056 title('Right brain')
0057 
0058 subplot(NY,NX,3)
0059 patch('Faces',F.F3,'Vertices',V,'FaceColor','interp',...
0060     'EdgeColor','none','FaceVertexCData',color);
0061 material dull;
0062 axis equal
0063 axis tight
0064 
0065 view(angle(3,:));
0066 title('Both brain [Left angle]')
0067 
0068 subplot(NY,NX,4)
0069 patch('Faces',F.F3,'Vertices',V,'FaceColor','interp',...
0070     'EdgeColor','none','FaceVertexCData',color);
0071 material dull;
0072 axis equal
0073 axis tight
0074 
0075 view(angle(4,:));
0076 title('Both brain [Right angle]')

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