Home > vbmeg > functions > device > vb_info_get_channel_label.m

vb_info_get_channel_label

PURPOSE ^

return channel label from MEGinfo or EEGinfo

SYNOPSIS ^

function [ch_label] = vb_info_get_channel_label(info, active_swt)

DESCRIPTION ^

 return channel label from MEGinfo or EEGinfo
 [usage]
   [ch_label] = vb_info_get_channel_label(info, active_swt)
 [input]
   info : <required> <<struct>> MEGinfo or EEGinfo
   active_swt : <optional> <<boolean>> [false]
              :    true) return only active channels
              :   false) return all the channels
 [output]
   ch_label : channel label
            :  (MEG) --> only meg channel not extra nor reference
            :  (EEG) --> only eeg channel not extra
 [note]
   @see vb_meginfo_get_channel_label_meg
   @see vb_eeginfo_get_channel_label
 [history]
   2008-04-14 (Sako) initial version

 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:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [ch_label] = vb_info_get_channel_label(info, active_swt)
0002 % return channel label from MEGinfo or EEGinfo
0003 % [usage]
0004 %   [ch_label] = vb_info_get_channel_label(info, active_swt)
0005 % [input]
0006 %   info : <required> <<struct>> MEGinfo or EEGinfo
0007 %   active_swt : <optional> <<boolean>> [false]
0008 %              :    true) return only active channels
0009 %              :   false) return all the channels
0010 % [output]
0011 %   ch_label : channel label
0012 %            :  (MEG) --> only meg channel not extra nor reference
0013 %            :  (EEG) --> only eeg channel not extra
0014 % [note]
0015 %   @see vb_meginfo_get_channel_label_meg
0016 %   @see vb_eeginfo_get_channel_label
0017 % [history]
0018 %   2008-04-14 (Sako) initial version
0019 %
0020 % Copyright (C) 2011, ATR All Rights Reserved.
0021 % License : New BSD License(see VBMEG_LICENSE.txt)
0022 
0023 % --- CHECK ARGUMENTS --- %
0024 if ~exist('info', 'var'), info = []; end
0025 if ~exist('active_swt', 'var'), active_swt = []; end
0026 [info, active_swt, Measurement] = inner_check_arguments(info, active_swt);
0027 
0028 % --- MAIN PROCEDURE --------------------------------------------------------- %
0029 %
0030 switch Measurement
0031   case 'MEG'
0032     ch_label = vb_meginfo_get_channel_label_meg(info, active_swt);
0033   case 'EEG'
0034     ch_label = vb_eeginfo_get_channel_label(info, active_swt);
0035   otherwise
0036     fprintf('(%s)unexpected Measurement : %s\n', mfilename, Measurement);
0037     ch_label = [];
0038 end
0039 return;
0040 %
0041 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0042 
0043 
0044 % --- INNER FUNCTIONS -------------------------------------------------------- %
0045 %
0046 % --- inner_check_arguments()
0047 %
0048 function [info, active_swt, Measurement] = ...
0049   inner_check_arguments(info, active_swt)
0050 func_ = mfilename;
0051 if isempty(info)
0052   error('(%s)info is a required parameter', func_);
0053 end
0054 
0055 Measurement = vb_info_get_measurement(info);
0056 
0057 if isempty(active_swt)
0058   active_swt = false;
0059 end
0060 return;
0061 %
0062 % --- end of inner_check_arguments()
0063 %
0064 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0065 
0066 
0067 %%% END OF FILE %%%

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