Home > vbmeg > functions > job > subdirectory > 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 if isempty(proj_root)
0052     brain_file = [brain_parm.brain_file];
0053     area_file  = [brain_parm.area_file ];
0054 else
0055     brain_file = [proj_root filesep brain_parm.brain_file];
0056     area_file  = [proj_root filesep brain_parm.area_file ];
0057 end
0058 
0059 %
0060 % Make inflate and flat models
0061 %
0062 [Vinflate,inf_C] = vb_make_inflate_data(proj_root, brain_parm);
0063 
0064 %
0065 % --- save the inflate model
0066 %
0067 
0068 vb_disp(['Save brain model ']);
0069 vb_disp(sprintf('     file = %s', [brain_file]));
0070 
0071 vb_save([brain_file], 'Vinflate','inf_C');
0072 
0073 % Plot Inflate model
0074 vb_check_inflate_model(proj_root,brain_parm);
0075 
0076 area_key = 'reduced_cortex';
0077 Area  = vb_get_area(area_file, area_key);
0078 
0079 if ~isempty(Area),
0080   Vindx = Area.Iextract;
0081     
0082   Vinflate = Vinflate(Vindx,:);
0083   inf_C    = inf_C(Vindx,:);
0084     
0085   brain_file = vb_change_file_basename(brain_file, '_reduce');
0086   vb_disp(['Save reduced brain inflate model ']);
0087   vb_disp(sprintf('     file = %s', [brain_file]));
0088 
0089   vb_save([brain_file], 'Vinflate','inf_C');
0090 
0091   % Plot Inflate model
0092   %brain_parm.brain_file = brain_file;
0093   vb_check_inflate_model(proj_root,brain_parm);
0094 else
0095 %  vb_disp('There is no reduced brain model.');
0096 end

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