Home > vbmeg > demo > sample_scripts > test_job_brain.m

test_job_brain

PURPOSE ^

Test job_brain.m, a sample program of VBMEG

SYNOPSIS ^

function V = test_job_brain(proj_root,test_parm)

DESCRIPTION ^

 Test job_brain.m, a sample program of VBMEG

 [syntax]
 V = test_job_brain(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]
 V: <<matrix>> Vertex coordinates of cortical surface model.
 The following files are created: 
  VBMEG cortical surface model file (.brain.mat)
  VBMEG area file (.area.mat)
  VBMEG activity map file (.act.mat)

 [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 V = test_job_brain(proj_root,test_parm)
0002 % Test job_brain.m, a sample program of VBMEG
0003 %
0004 % [syntax]
0005 % V = test_job_brain(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 % V: <<matrix>> Vertex coordinates of cortical surface model.
0016 % The following files are created:
0017 %  VBMEG cortical surface model file (.brain.mat)
0018 %  VBMEG area file (.area.mat)
0019 %  VBMEG activity map file (.act.mat)
0020 %
0021 % [history]
0022 % 2010-06-30 Taku Yoshioka
0023 %
0024 % Copyright (C) 2011, ATR All Rights Reserved.
0025 % License : New BSD License(see VBMEG_LICENSE.txt)
0026 
0027 
0028 vb_disp('--- Start: test_job_brain');
0029 resultdir = './vbmeg_result/';
0030 
0031 %
0032 % Standard parameters
0033 %
0034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0035 brain_parm.reduce_ratio = 0.1;
0036 
0037 switch test_parm.cortex, 
0038  case 'bv', 
0039   dirname = 'vbmeg_testdata/BV2000/';
0040   brain_parm.BV_left_file  = [dirname 'lh_recosm.srf'];
0041   brain_parm.BV_right_file = [dirname 'rh_recosm.srf'];
0042   brain_parm.brain_file    = [resultdir 'sbj_test_bv.brain.mat'];
0043   brain_parm.area_file     = [resultdir 'sbj_test_bv.area.mat'];
0044   brain_parm.act_file      = [resultdir 'sbj_test_bv.act.mat'];
0045   
0046  case 'fs', 
0047   dirname = 'vbmeg_testdata/FS4.5/';
0048   brain_parm.FS_left_file       = [dirname 'lh.smoothwm.asc'];
0049   brain_parm.FS_right_file      = [dirname 'rh.smoothwm.asc'];
0050   brain_parm.FS_left_infl_file  = [dirname 'lh.inflated.asc'];
0051   brain_parm.FS_right_infl_file = [dirname 'rh.inflated.asc'];
0052   brain_parm.FS_left_curv_file  = [dirname 'lh.curv.asc'];
0053   brain_parm.FS_right_curv_file = [dirname 'rh.curv.asc'];
0054   brain_parm.FS_left_label_file = [dirname 'lh.cortex.label'];
0055   brain_parm.FS_right_label_file= [dirname 'rh.cortex.label'];
0056 
0057   brain_parm.brain_file    = [resultdir 'sbj_test_fs.brain.mat'];
0058   brain_parm.area_file     = [resultdir 'sbj_test_fs.area.mat'];
0059   brain_parm.act_file      = [resultdir 'sbj_test_fs.act.mat'];
0060 end
0061 
0062 %
0063 % Optional parameters
0064 %
0065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0066 brain_parm.analyze_file = 'vbmeg_testdata/sbj_test.hdr'; 
0067 brain_parm.spm_normalization_file = 'vbmeg_testdata/sbj_test_seg_sn.mat';
0068 brain_parm.make_reduce = 0; 
0069 
0070 %
0071 % Advanced parameters
0072 %
0073 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0074 brain_parm.R_max   = 18e-3; % 18mm
0075 brain_parm.N_step  = 50;
0076 brain_parm.display = 200;
0077 brain_parm.Nvertex = 10000;
0078 
0079 %
0080 % Execute vb_job_brain
0081 %
0082 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0083 vb_job_brain(proj_root,brain_parm);
0084 V = vb_load_cortex(brain_parm.brain_file);
0085 vb_disp('--- End  : test_job_brain');

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