Home > vbmeg > functions > job > subdirectory > 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 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 % --- Make reduced cortex without corpus region
0028 %
0029 if ~exist([reduce_file],'file')
0030     vb_job_reduced_cortex(proj_root,brain_parm);
0031 end
0032 %
0033 % Make inflate data.
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     % Plot Inflate model
0053     brain_parm.brain_file = reduce_name;
0054     vb_check_inflate_model(proj_root,brain_parm);
0055 end
0056

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