Add parcellation area to the specified area file. [Usage] vb_area_file_add_dmri_area(area_file, dmri_file, area_key); [Input] area_file : area filename(.area.mat) [string] dmri_file : diffusion mri filename(.dmri.mat) [string] area_key : registration key for parcellation area. [string] any name is ok. [default : 'parcellation_area'] [Output] none [History] 2015-02-10 rhayashi Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_area_file_add_dmri_area(area_file, dmri_file, area_key) 0002 % Add parcellation area to the specified area file. 0003 % [Usage] 0004 % vb_area_file_add_dmri_area(area_file, dmri_file, area_key); 0005 % 0006 % [Input] 0007 % area_file : area filename(.area.mat) [string] 0008 % dmri_file : diffusion mri filename(.dmri.mat) [string] 0009 % area_key : registration key for parcellation area. [string] 0010 % any name is ok. [default : 'parcellation_area'] 0011 % 0012 % [Output] 0013 % none 0014 % 0015 % [History] 0016 % 2015-02-10 rhayashi 0017 % 0018 % Copyright (C) 2011, ATR All Rights Reserved. 0019 % License : New BSD License(see VBMEG_LICENSE.txt) 0020 0021 0022 % 0023 % --- Previous check 0024 % 0025 if nargin <= 1 0026 error('Please check function usage.'); 0027 end 0028 0029 if ~exist('area_key', 'var') 0030 area_key = 'parcellation_area'; 0031 end 0032 0033 if exist(area_file, 'file') ~= 2 0034 error('Specified area file not found.'); 0035 end 0036 0037 if exist(dmri_file, 'file') ~= 2 0038 error('Specified diffusion mri file not found.'); 0039 end 0040 0041 % 0042 % --- Main Procedure 0043 % 0044 0045 % bayes_parm_abs.areafile 0046 load(dmri_file, 'vbmeg_area_ix'); 0047 0048 % add parcellation area to the area file. 0049 area_new.Iextract = vbmeg_area_ix; 0050 area_new.key = area_key; 0051 vb_add_area(area_file, area_new); 0052 vb_disp('parcellation area was added to areafile.');