Home > vbmeg > functions > gui > preAnalysis > meeg_processor > signal_processor > vb_signal_processor_input_megfile.m

vb_signal_processor_input_megfile

PURPOSE ^

Show input dialog

SYNOPSIS ^

function [data] = vb_signal_processor_input_megfile(data)

DESCRIPTION ^

 Show input dialog
 [USAGE]
    data = vb_signal_processor_input_megfile(data);
 [IN]
    data : application data.
 [OUT]
    data : Updated application data.

 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 [data] = vb_signal_processor_input_megfile(data)
0002 % Show input dialog
0003 % [USAGE]
0004 %    data = vb_signal_processor_input_megfile(data);
0005 % [IN]
0006 %    data : application data.
0007 % [OUT]
0008 %    data : Updated application data.
0009 %
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
0012 
0013 %
0014 % --- Previous check
0015 %
0016 if ~exist('data', 'var')
0017     error('data is a required parameter.');
0018 end
0019 
0020 %
0021 % --- Main Procedure
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 % Select file
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 % --- After check
0053 %
0054 if nargout ~= 1
0055     error('function caller should receive application data object.');
0056 end

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