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 normal_stat = vb_original_normal_statics(proj_root,brain_parm);
0021
0022 fprintf('Save neighbor statics in the original brain\n')
0023 vb_save(brain_file,'normal_stat')
0024
0025
0026
0027
0028 if ~exist([reduce_file],'file')
0029 vb_job_reduced_cortex(proj_root,brain_parm);
0030 end
0031
0032
0033
0034
0035 area_key = 'reduced_cortex';
0036 Area = vb_get_area(area_file, area_key);
0037
0038 if ~isempty(Area),
0039 Vindx = Area.Iextract;
0040
0041 load([brain_file],'Vinflate','inf_C');
0042
0043 Vinflate = Vinflate(Vindx,:);
0044 inf_C = inf_C(Vindx,:);
0045
0046 fprintf(['--- Save brain model \n']);
0047 fprintf(' file = %s\n', reduce_file );
0048
0049 vb_save(reduce_file,'Vinflate','inf_C');
0050
0051
0052 brain_parm.brain_file = reduce_name;
0053 vb_check_inflate_model(proj_root,brain_parm);
0054 end
0055