Set parameters to make cortical surface model 'fsaverage'. 'fsaverage' data is used to performe inter-subject analysis of cortical current estimated on cortical surface models of individual subjects. This function is used with vb_job_brain and vb_job_brain_add_sph_coord (see example). The following files are required for making cortical surface model: surf/[lh/rh].smoothwm.asc surf/[lh/rh].inflated.asc surf/[lh/rh].curv.asc surf/[lh/rh].sphere.reg.asc mri/T1.[hdr/img/nii] (ANALYZE or NIfTI) These files are not included in FreeSurfer package. You need to convert original files by using FreeSurfer's commands as follows: cd $SUBJECTS_DIR/fsaverage/surf mris_convert [lh/rh].smoothwm [lh/rh].smoothwm.asc mris_convert [lh/rh].inflated [lh/rh].inflated.asc mris_convert -c curv [lh/rh].smoothwm [lh/rh].curv.asc mris_convert [lh/rh].sphere.reg [lh/rh].sphere.reg.asc cd $SUBJECTS_DIR/fsaverage/mri mri_convert --out_type [analyze/nifti1] T1.mgz T1 Where $SUBJECTS_DIR is FreeSurfer's subject directory. [syntax] brain_parm = vb_set_brain_parm_fsaverage(fsaverage_dir,sbj_dir) [input] fsaverage_dir: <<string>> Directory of subject 'fsaverage'. sbj_dir : <<string>> VBMEG subject directory for 'fsaverage'. New files (.brain.mat etc.) are put on this directory. This must be a relative path from 'proj_root' directory, which is given to vb_job_brain and vb_job_brain_add_sphcoord. [output] brain_parm: <<struct>> Parameter set for vb_job_brain and vb_job_brain_add_sphcoord. [example] >> fsavr_dir = '/home/cbi-data5/taku-y/analysis/freesurfer/fsaverage'; >> sbj_dir = 'brain/fsaverage'; >> brain_parm = vb_set_brain_parm_fsaverage(fsavr_dir,sbj_dir); >> vb_job_brain(proj_root,brain_parm); >> vb_job_inflate(proj_root,brain_parm); >> vb_job_brain_add_sphcoord(proj_dir,brain_parm); [history] 2010-11-30 Taku Yoshioka Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function brain_parm = vb_set_brain_parm_fsaverage(fsaverage_dir,sbj_dir) 0002 % Set parameters to make cortical surface model 'fsaverage'. 0003 % 0004 % 'fsaverage' data is used to performe inter-subject analysis of cortical 0005 % current estimated on cortical surface models of individual 0006 % subjects. This function is used with vb_job_brain and 0007 % vb_job_brain_add_sph_coord (see example). The following files are 0008 % required for making cortical surface model: 0009 % 0010 % surf/[lh/rh].smoothwm.asc 0011 % surf/[lh/rh].inflated.asc 0012 % surf/[lh/rh].curv.asc 0013 % surf/[lh/rh].sphere.reg.asc 0014 % mri/T1.[hdr/img/nii] (ANALYZE or NIfTI) 0015 % 0016 % These files are not included in FreeSurfer package. You need to convert 0017 % original files by using FreeSurfer's commands as follows: 0018 % 0019 % cd $SUBJECTS_DIR/fsaverage/surf 0020 % mris_convert [lh/rh].smoothwm [lh/rh].smoothwm.asc 0021 % mris_convert [lh/rh].inflated [lh/rh].inflated.asc 0022 % mris_convert -c curv [lh/rh].smoothwm [lh/rh].curv.asc 0023 % mris_convert [lh/rh].sphere.reg [lh/rh].sphere.reg.asc 0024 % cd $SUBJECTS_DIR/fsaverage/mri 0025 % mri_convert --out_type [analyze/nifti1] T1.mgz T1 0026 % 0027 % Where $SUBJECTS_DIR is FreeSurfer's subject directory. 0028 % 0029 % [syntax] 0030 % brain_parm = vb_set_brain_parm_fsaverage(fsaverage_dir,sbj_dir) 0031 % 0032 % [input] 0033 % fsaverage_dir: <<string>> Directory of subject 'fsaverage'. 0034 % sbj_dir : <<string>> VBMEG subject directory for 'fsaverage'. New 0035 % files (.brain.mat etc.) are put on this directory. This 0036 % must be a relative path from 'proj_root' directory, 0037 % which is given to vb_job_brain and 0038 % vb_job_brain_add_sphcoord. 0039 % 0040 % [output] 0041 % brain_parm: <<struct>> Parameter set for vb_job_brain and 0042 % vb_job_brain_add_sphcoord. 0043 % 0044 % [example] 0045 % >> fsavr_dir = '/home/cbi-data5/taku-y/analysis/freesurfer/fsaverage'; 0046 % >> sbj_dir = 'brain/fsaverage'; 0047 % >> brain_parm = vb_set_brain_parm_fsaverage(fsavr_dir,sbj_dir); 0048 % >> vb_job_brain(proj_root,brain_parm); 0049 % >> vb_job_inflate(proj_root,brain_parm); 0050 % >> vb_job_brain_add_sphcoord(proj_dir,brain_parm); 0051 % 0052 % [history] 0053 % 2010-11-30 Taku Yoshioka 0054 % 0055 % Copyright (C) 2011, ATR All Rights Reserved. 0056 % License : New BSD License(see VBMEG_LICENSE.txt) 0057 0058 % Input files 0059 brain_parm.FS_left_file = [fsaverage_dir '/surf/lh.smoothwm.asc']; 0060 brain_parm.FS_right_file = [fsaverage_dir '/surf/rh.smoothwm.asc']; 0061 brain_parm.FS_left_infl_file = [fsaverage_dir '/surf/lh.inflated.asc']; 0062 brain_parm.FS_right_infl_file = [fsaverage_dir '/surf/rh.inflated.asc']; 0063 brain_parm.FS_left_curv_file = [fsaverage_dir '/surf/lh.curv.asc']; 0064 brain_parm.FS_right_curv_file = [fsaverage_dir '/surf/rh.curv.asc']; 0065 brain_parm.brain_sphL = [fsaverage_dir '/surf/lh.sphere.reg.asc']; 0066 brain_parm.brain_sphR = [fsaverage_dir '/surf/rh.sphere.reg.asc']; 0067 0068 brain_parm.analyze_file = [fsaverage_dir '/mri/T1.hdr']; 0069 brain_parm.spm_normalization_file = []; 0070 0071 % Output files (relative path from proj_root) 0072 brain_parm.brain_file = [sbj_dir filesep 'fsaverage.brain.mat']; 0073 brain_parm.area_file = [sbj_dir filesep 'fsaverage.area.mat']; 0074 brain_parm.act_file = [sbj_dir filesep 'fsaverage.act.mat']; 0075 0076 % ID of sphere coordinate 0077 brain_parm.key = 'sphere.reg'; 0078 0079 % 0080 % --- Advanced parameters 0081 % Do not change, unless you understand the meaning of the parameters!! 0082 % 0083 0084 % Maximum radius for neighbor search 0085 brain_parm.R_max = 18e-3; % 18mm 0086 0087 % Total Vertex number after reduction(Priority:Nvertex>reduce_ratio) 0088 brain_parm.Nvertex = 20000; 0089 0090 % Reduce ratio for BV surface data 0091 brain_parm.reduce_ratio = 0.1; 0092 0093 % Division number of z axis in matching between BV and MRI points 0094 brain_parm.N_step = 50; 0095 0096 % Display progress for this steps 0097 brain_parm.display = 200; 0098 0099 return;