Home > functions > job > vb_job_normal_stat.m

vb_job_normal_stat

PURPOSE ^

Calculate normal statics of original BV brain and make reduced model

SYNOPSIS ^

function vb_job_normal_stat(proj_root,brain_parm)

DESCRIPTION ^

 Calculate normal statics of original BV brain and make reduced model
   vb_job_normal_stat(proj_root,brain_parm);

 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 vb_job_normal_stat(proj_root,brain_parm)
0002 % Calculate normal statics of original BV brain and make reduced model
0003 %   vb_job_normal_stat(proj_root,brain_parm);
0004 %
0005 % Copyright (C) 2011, ATR All Rights Reserved.
0006 % License : New BSD License(see VBMEG_LICENSE.txt)
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 % --- Find original vertex near the cortical vertex
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 % --- Make reduced cortex without corpus region
0027 %
0028 if ~exist([reduce_file],'file')
0029     vb_job_reduced_cortex(proj_root,brain_parm);
0030 end
0031 %
0032 % Make inflate data.
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     % Plot Inflate model
0052     brain_parm.brain_file = reduce_name;
0053     vb_check_inflate_model(proj_root,brain_parm);
0054 end
0055

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005