Home > vbmeg > demo > tutorial_for_vbmeg2 > advanced > check_imported_fmri.m

check_imported_fmri

PURPOSE ^

Check imported fMRI result

SYNOPSIS ^

function check_imported_fmri(p)

DESCRIPTION ^

 Check imported fMRI result

 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 check_imported_fmri(p)
0002 % Check imported fMRI result
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 % Set angle to view brain
0008 angle=[-50 0;50 0];
0009 
0010 % Make directory to save figures
0011 save_dir = fullfile(p.fig_root, mfilename);
0012 if exist(save_dir, 'dir') ~= 7
0013     vb_mkdir(save_dir);
0014 end
0015 
0016 % Load Act file to which fMRI result was imported
0017 act_file   = fullfile(p.proj_root, p.brain_dirname, [p.struct_name, '.act.mat']);
0018 load(act_file)
0019 
0020 % Show Act data
0021 brain_file = fullfile(p.proj_root, p.brain_dirname, [p.struct_name, '.brain.mat']);
0022 for a=1:length(Act)
0023     h=gcf;clf
0024     [V,F,xx,inf_C]=vb_load_cortex(brain_file,'Inflate');
0025     plot_parm=vb_set_plot_parm;
0026     J=Act{a}.xxP;
0027     for an=1:2
0028         subplot(1,2,an)
0029         vb_plot_cortex(plot_parm,V,F,inf_C,J,max(J(:))*0.1,max(J(:)));
0030         view(angle(an,:));
0031         axis equal off
0032     end
0033     vb_savefig_as_shown(h, fullfile(save_dir, Act{a}.key))
0034 end

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