0001 function [obj] = brain_file_maker_set_selected_filename(obj)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0020
0021
0022
0023
0024 H = obj.H;
0025 brain_files = get(H.brain_file_listbox, 'String');
0026 area_files = get(H.area_file_listbox, 'String');
0027 act_files = get(H.act_file_listbox, 'String');
0028
0029 brain_ix = get(H.brain_file_listbox, 'Value');
0030 area_ix = get(H.area_file_listbox, 'Value');
0031 act_ix = get(H.act_file_listbox, 'Value');
0032
0033 if isempty(brain_files)
0034 brain_file = '';
0035 else
0036 brain_file = ...
0037 [obj.brain_dir, filesep, brain_files{brain_ix}];
0038 end
0039 if isempty(area_files)
0040 area_file = '';
0041 else
0042 area_file = ...
0043 [obj.brain_dir, filesep, area_files{area_ix}];
0044 end
0045 if isempty(act_files)
0046 act_file = '';
0047 else
0048 act_file = ...
0049 [obj.brain_dir, filesep, act_files{act_ix}];
0050 end
0051
0052 obj.brain_file = brain_file;
0053 obj.area_file = area_file;
0054 obj.act_file = act_file;
0055
0056
0057
0058
0059 if nargout ~= 1
0060 error('function caller should receive obj.');
0061 end