0001 function [data] = vb_signal_processor_input_megfile(data)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 if ~exist('data', 'var')
0017 error('data is a required parameter.');
0018 end
0019
0020
0021
0022
0023 H = data.H;
0024
0025 def = vb_define_extension;
0026
0027 switch(data.file_type)
0028 case 'MEG'
0029 extension = def.MEG2_EXTENSION;
0030 case 'EEG'
0031 extension = def.EEG_EXTENSION;
0032 end
0033
0034
0035 [d, f] = vb_file_select({extension}, ['Select ' data.file_type ' file']);
0036
0037 if ~isempty(d)
0038 files = get(H.input_file_listbox, 'String');
0039 file = fullfile(d, f{1});
0040 if isempty(files)
0041 files{1} = file;
0042 else
0043 files{length(files)+1} = file;
0044 end
0045 data.input_files = files;
0046 end
0047 data = vb_signal_processor_create_output_filename(data);
0048
0049 data = vb_signal_processor_update_screen(data);
0050
0051
0052
0053
0054 if nargout ~= 1
0055 error('function caller should receive application data object.');
0056 end