Home > functions > job > vb_job_inflate.m

vb_job_inflate

PURPOSE ^

Make inflated cortical surface model.

SYNOPSIS ^

function vb_job_inflate(proj_root,brain_parm)

DESCRIPTION ^

 Make inflated cortical surface model.
 (VBMEG public function)

 [syntax]
 vb_job_inflate(proj_root,brain_parm)

 [input]
 proj_root : <<string>> VBMEG project root directory. 
 brain_parm: <<struct>> Parameters for creating inflated model
 --- fields of brain_parm
  brain_file  : <<string>> Filename of .brain.mat file
  area_file   : <<string>> Filename of .area.mat file

  (parameters for BrainVoyager inflated model)
  BV_left_infl_file : <<string>> Brain-Voyager left  inflate file
  BV_right_infl_file: <<string>> Brain-Voyager right inflate file

  (parameters for FreeSurfer inflated model)
  FS_left_infl_file : <<string>> FreeSurfer left inflate file
  FS_right_infl_file: <<string>> FreeSurfer right inflate file
  FS_left_curv_file : <<string>> FreeSurfer left curvature file
  FS_right_curv_file: <<string>> FreeSurfer right curvature file
 ---

 [output]
 VBMEG cortical surface model file (.brain.mat) is updated with
 variables of inflated model. 

 The following variables are stored in .brain.mat file: 
 Vinflate: <<matrix>> Inflate model vertex
 inf_C   : <<vector>> Color corresponding to curvature

 [history]
 2010-05-28 Taku Yoshioka
  Minor change (verbose level support)

 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_inflate(proj_root,brain_parm)
0002 % Make inflated cortical surface model.
0003 % (VBMEG public function)
0004 %
0005 % [syntax]
0006 % vb_job_inflate(proj_root,brain_parm)
0007 %
0008 % [input]
0009 % proj_root : <<string>> VBMEG project root directory.
0010 % brain_parm: <<struct>> Parameters for creating inflated model
0011 % --- fields of brain_parm
0012 %  brain_file  : <<string>> Filename of .brain.mat file
0013 %  area_file   : <<string>> Filename of .area.mat file
0014 %
0015 %  (parameters for BrainVoyager inflated model)
0016 %  BV_left_infl_file : <<string>> Brain-Voyager left  inflate file
0017 %  BV_right_infl_file: <<string>> Brain-Voyager right inflate file
0018 %
0019 %  (parameters for FreeSurfer inflated model)
0020 %  FS_left_infl_file : <<string>> FreeSurfer left inflate file
0021 %  FS_right_infl_file: <<string>> FreeSurfer right inflate file
0022 %  FS_left_curv_file : <<string>> FreeSurfer left curvature file
0023 %  FS_right_curv_file: <<string>> FreeSurfer right curvature file
0024 % ---
0025 %
0026 % [output]
0027 % VBMEG cortical surface model file (.brain.mat) is updated with
0028 % variables of inflated model.
0029 %
0030 % The following variables are stored in .brain.mat file:
0031 % Vinflate: <<matrix>> Inflate model vertex
0032 % inf_C   : <<vector>> Color corresponding to curvature
0033 %
0034 % [history]
0035 % 2010-05-28 Taku Yoshioka
0036 %  Minor change (verbose level support)
0037 %
0038 % Copyright (C) 2011, ATR All Rights Reserved.
0039 % License : New BSD License(see VBMEG_LICENSE.txt)
0040 
0041 proj_root = vb_rm_trailing_slash(proj_root);
0042 
0043 % Do not modify following lines
0044 %
0045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0046 %
0047 % Make inflate and flat models
0048 %
0049 
0050 % Output file path
0051 brain_file = [brain_parm.brain_file];
0052 area_file  = [proj_root '/' brain_parm.area_file];
0053 
0054 %
0055 % Make inflate and flat models
0056 %
0057 [Vinflate,inf_C] = vb_make_inflate_data(proj_root, brain_parm);
0058 
0059 %
0060 % --- save the inflate model
0061 %
0062 
0063 vb_disp(['Save brain model ']);
0064 vb_disp(sprintf('     file = %s', [proj_root '/' brain_file]));
0065 
0066 vb_save([proj_root '/' brain_file], 'Vinflate','inf_C');
0067 
0068 % Plot Inflate model
0069 vb_check_inflate_model(proj_root,brain_parm);
0070 
0071 area_key = 'reduced_cortex';
0072 Area  = vb_get_area(area_file, area_key);
0073 
0074 if ~isempty(Area),
0075   Vindx = Area.Iextract;
0076     
0077   Vinflate = Vinflate(Vindx,:);
0078   inf_C    = inf_C(Vindx,:);
0079     
0080   brain_file = vb_change_file_basename(brain_file, '_reduce');
0081   vb_disp(['Save reduced brain inflate model ']);
0082   vb_disp(sprintf('     file = %s', [proj_root '/' brain_file]));
0083 
0084   vb_save([proj_root '/' brain_file], 'Vinflate','inf_C');
0085 
0086   % Plot Inflate model
0087   brain_parm.brain_file = brain_file;
0088   vb_check_inflate_model(proj_root,brain_parm);
0089 else
0090   vb_disp('There is no reduced brain model.');
0091 end

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