Home > functions > gui > brain_file_maker > brain_file_maker_set_selected_filename.m

brain_file_maker_set_selected_filename

PURPOSE ^

set selected filename to brain_file_marker object

SYNOPSIS ^

function [obj] = brain_file_maker_set_selected_filename(obj)

DESCRIPTION ^

 set selected filename to brain_file_marker object
 [USAGE]
    [obj] = brain_file_maker_set_selected_filename(<obj>);
 [IN]
    obj : brain_file_maker object
 [OUT]
    obj : brain_file_maker object

 Author: rhayashi
 Created: 2007-07-13

 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 [obj] = brain_file_maker_set_selected_filename(obj)
0002 % set selected filename to brain_file_marker object
0003 % [USAGE]
0004 %    [obj] = brain_file_maker_set_selected_filename(<obj>);
0005 % [IN]
0006 %    obj : brain_file_maker object
0007 % [OUT]
0008 %    obj : brain_file_maker object
0009 %
0010 % Author: rhayashi
0011 % Created: 2007-07-13
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 %
0017 % --- Previous check
0018 %
0019 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0020 
0021 %
0022 % --- Main Procedure
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 % --- After check
0058 %
0059 if nargout ~= 1
0060     error('function caller should receive obj.');
0061 end

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005