Home > vbmeg > demo > sample_scripts > test_job_fmri.m

test_job_fmri

PURPOSE ^

Test job_fmri.m, a sample program of VBMEG

SYNOPSIS ^

function xxP = test_job_fmri(proj_root,test_parm)

DESCRIPTION ^

 Test job_fmri.m, a sample program of VBMEG

 [syntax]
 xxP = test_job_fmri(proj_root,test_parm)

 [input]
 proj_root: <<string>> VBMEG project root directory. 
 test_parm: <<struct>> Test condition variables. 
 --- fields of test_parm
  cortex: <<string>> 'bv' for BrainVoyager, 'fs' for FreeSurfer. 
 ---

 [output]
 xxP: <<vector>> Cortical activity map. 
 Area information is added with identifier 'sbj_test_UR'. Activity map
 information is added with identifier 'sbj_test_UR'. Accordingly, VBMEG
 area file (.area.mat) and activity map file (.act.mat) are updated. 

 [history]
 2010-06-30 Taku Yoshioka

 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 xxP = test_job_fmri(proj_root,test_parm)
0002 % Test job_fmri.m, a sample program of VBMEG
0003 %
0004 % [syntax]
0005 % xxP = test_job_fmri(proj_root,test_parm)
0006 %
0007 % [input]
0008 % proj_root: <<string>> VBMEG project root directory.
0009 % test_parm: <<struct>> Test condition variables.
0010 % --- fields of test_parm
0011 %  cortex: <<string>> 'bv' for BrainVoyager, 'fs' for FreeSurfer.
0012 % ---
0013 %
0014 % [output]
0015 % xxP: <<vector>> Cortical activity map.
0016 % Area information is added with identifier 'sbj_test_UR'. Activity map
0017 % information is added with identifier 'sbj_test_UR'. Accordingly, VBMEG
0018 % area file (.area.mat) and activity map file (.act.mat) are updated.
0019 %
0020 % [history]
0021 % 2010-06-30 Taku Yoshioka
0022 %
0023 % Copyright (C) 2011, ATR All Rights Reserved.
0024 % License : New BSD License(see VBMEG_LICENSE.txt)
0025 
0026 vb_disp('--- Start: test_job_fmri');
0027 resultdir = './vbmeg_result/';
0028 
0029 %
0030 % Standard parameters
0031 %
0032 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0033 brain_parm.reduce_ratio = 0.1;
0034 
0035 switch test_parm.cortex, 
0036  case 'bv', 
0037   fmri_parm.brain_file = [resultdir 'sbj_test_bv.brain.mat'];
0038   fmri_parm.area_file  = [resultdir 'sbj_test_bv.area.mat'];
0039   fmri_parm.act_file   = [resultdir 'sbj_test_bv.act.mat'];
0040   
0041  case 'fs', 
0042   fmri_parm.brain_file = [resultdir 'sbj_test_fs.brain.mat'];
0043   fmri_parm.area_file  = [resultdir 'sbj_test_fs.area.mat'];
0044   fmri_parm.act_file   = [resultdir 'sbj_test_fs.act.mat'];
0045 end
0046 
0047 %
0048 % SPM voxel files and identifiers
0049 %
0050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0051 spm_file = {'vbmeg_testdata/SPM8/sbj_test_UR_SPM8.spm.mat', ...
0052             'vbmeg_testdata/SPM8/sbj_test_LR_SPM8.spm.mat', ...
0053             'vbmeg_testdata/SPM8/sbj_test_LL_SPM8.spm.mat', ...
0054             'vbmeg_testdata/SPM8/sbj_test_UL_SPM8.spm.mat'};
0055 fmri_id = {'sbj_test_UR','sbj_test_LR','sbj_test_LL','sbj_test_UL'};
0056 area_id = fmri_id;
0057 
0058 %
0059 % Advanced parameter
0060 %
0061 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0062 fmri_parm.SPM_Radius   = sqrt(3);
0063 fmri_parm.SPM_zstep    = 1;
0064 fmri_parm.Gauss_radius = 3;
0065 fmri_parm.Gauss_max    = 6;
0066 
0067 %
0068 % Execute vb_job_fmri
0069 %
0070 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0071 for i=1:length(spm_file)
0072   fmri_parm.spm_file = spm_file{i};
0073   fmri_parm.fmri_id  = fmri_id{i};
0074   fmri_parm.area_id  = area_id{i};
0075   fmri_parm.comment  = '';
0076   vb_job_fmri(proj_root,fmri_parm);
0077 end;
0078 act = vb_get_act(fmri_parm.act_file,'sbj_test_UR');
0079 xxP = act.xxP; 
0080 vb_disp('--- End  : test_job_fmri');

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