return trans information from MEGinfo or EEGinfo [usage] [trans_info] = vb_info_get_transinfo(info) [input] info : <required> <<struct>> MEGinfo or EEGinfo [output] trans_info : <<struct>> transform information [note] if this is not set, return empty [hostory] 2011-05-27 (Sako) initial version Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [trans_info] = vb_info_get_transinfo(info) 0002 % return trans information from MEGinfo or EEGinfo 0003 % [usage] 0004 % [trans_info] = vb_info_get_transinfo(info) 0005 % [input] 0006 % info : <required> <<struct>> MEGinfo or EEGinfo 0007 % [output] 0008 % trans_info : <<struct>> transform information 0009 % [note] 0010 % if this is not set, return empty 0011 % [hostory] 0012 % 2011-05-27 (Sako) initial version 0013 % 0014 % Copyright (C) 2011, ATR All Rights Reserved. 0015 % License : New BSD License(see VBMEG_LICENSE.txt) 0016 0017 % --- CHECK ARGUMENTS --- % 0018 if ~exist('info', 'var'), info = []; end 0019 [info] = inner_check_arguments(info); 0020 0021 % --- MAIN PROCEDURE --------------------------------------------------------- % 0022 % 0023 trans_info = []; 0024 0025 if isfield(info, 'device_info') 0026 if isfield(info.device_info, 'TransInfo') 0027 trans_info = info.device_info.TransInfo; 0028 else 0029 % warning('device_info does not have ''TransInfo'' field\n'); 0030 end 0031 else 0032 % --- compatible with old style 0033 if isfield(info, 'TransInfo') 0034 trans_info = info.TransInfo; 0035 else 0036 % warning('info does not have ''TransInfo'' field\n'); 0037 end 0038 end 0039 return; 0040 % 0041 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0042 0043 % --- INNER FUNCTIONS -------------------------------------------------------- % 0044 % 0045 % --- inner_check_arguments() 0046 % 0047 function [info] = inner_check_arguments(info) 0048 func_ = mfilename; 0049 if isempty(info) 0050 error('(%s) info is a required parameter', func_); 0051 end 0052 return; 0053 % 0054 % --- end of inner_check_arguments() 0055 % 0056 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0057 0058 % --- END OF FILE --- %