0001 function vb_job_normal_stat(proj_root,brain_parm)
0002
0003
0004
0005
0006
0007
0008 proj_root = vb_rm_trailing_slash(proj_root);
0009
0010 area_file = [proj_root '/' brain_parm.area_file];
0011
0012 brain_name = brain_parm.brain_file;
0013 reduce_name = vb_change_file_basename(brain_name, '_reduce');
0014 brain_file = [proj_root '/' brain_name];
0015 reduce_file = [proj_root '/' reduce_name];
0016
0017
0018
0019
0020 load(brain_file, 'BV_index');
0021 normal_stat = vb_original_normal_statics(proj_root,brain_parm,BV_index);
0022
0023 fprintf('Save neighbor statics in the original brain\n')
0024 vb_save(brain_file,'normal_stat')
0025
0026
0027
0028
0029 if ~exist([reduce_file],'file')
0030 vb_job_reduced_cortex(proj_root,brain_parm);
0031 end
0032
0033
0034
0035
0036 area_key = 'reduced_cortex';
0037 Area = vb_get_area(area_file, area_key);
0038
0039 if ~isempty(Area),
0040 Vindx = Area.Iextract;
0041
0042 load([brain_file],'Vinflate','inf_C');
0043
0044 Vinflate = Vinflate(Vindx,:);
0045 inf_C = inf_C(Vindx,:);
0046
0047 fprintf(['--- Save brain model \n']);
0048 fprintf(' file = %s\n', reduce_file );
0049
0050 vb_save(reduce_file,'Vinflate','inf_C');
0051
0052
0053 brain_parm.brain_file = reduce_name;
0054 vb_check_inflate_model(proj_root,brain_parm);
0055 end
0056