Home > functions > gui > brain_file_maker > brain_file_maker_update_display.m

brain_file_maker_update_display

PURPOSE ^

display update of brain_file_maker gui

SYNOPSIS ^

function [obj] = brain_file_maker_update_display(obj)

DESCRIPTION ^

 display update of brain_file_maker gui
 [USAGE]
    [obj] = brain_file_maker_update_display(<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_update_display(obj)
0002 % display update of brain_file_maker gui
0003 % [USAGE]
0004 %    [obj] = brain_file_maker_update_display(<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 global vbmeg_inst;
0025 const = vbmeg_inst.const;
0026 H = obj.H;
0027 
0028 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0029 % Project root directory
0030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0031 set(H.proj_root_edit, 'String', obj.proj_root);
0032 
0033 
0034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0035 % Viewer and Smoother section
0036 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0037 % Input directory
0038 brain_dir = [obj.proj_root, filesep, obj.brain_dir];
0039 
0040 if ~isempty(brain_dir)
0041     brain_file = dir([brain_dir, '/*', const.BRAIN_EXTENSION]);
0042     area_file  = dir([brain_dir, '/*', const.AREA_EXTENSION]);
0043     act_file   = dir([brain_dir, '/*', const.FMRI_EXTENSION]);
0044 
0045     % file list
0046     brain_file = {brain_file.name};
0047     area_file  = {area_file.name};
0048     act_file   = {act_file.name};
0049 
0050     % filter filename by strmatch
0051     filter_str = get(H.filter_edit, 'String');
0052     if length(filter_str) ~= 0
0053         ix = strmatch(filter_str, brain_file);
0054         brain_file = brain_file(ix);
0055         ix = strmatch(filter_str, area_file);
0056         area_file  = area_file(ix);
0057         ix = strmatch(filter_str, act_file);
0058         act_file   = act_file(ix);
0059     end
0060 else
0061     brain_file = '';
0062     area_file  = '';
0063     act_file   = '';
0064 end
0065 
0066 % set filename to each listbox
0067 set(H.brain_file_listbox, 'String', brain_file);
0068 set(H.area_file_listbox,  'String', area_file);
0069 set(H.act_file_listbox,   'String', act_file);
0070 set(H.brain_file_listbox, 'Value', 1);
0071 set(H.area_file_listbox,  'Value', 1);
0072 set(H.act_file_listbox,   'Value', 1);
0073 
0074 obj = brain_file_maker_set_selected_filename(obj);
0075 
0076 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0077 % Making Cortical files section
0078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0079 
0080 % Analyze file
0081 set(H.analyze_file_edit, 'String', obj.analyze_file);
0082 
0083 % Product type
0084 set(H.product_type_popup, 'Value', obj.product_type);
0085 
0086 % change object inner filename information
0087 obj = brain_file_maker_set_output_filename(obj);
0088 
0089 % SPM normalization file
0090 set(H.spm_norm_file_edit, 'String', obj.spm_norm_file);
0091 
0092 % Comment
0093 set(H.output_brain_file_comment, 'String', obj.comment);
0094 
0095 % set output filename to text
0096 set(H.brain_file_output_filename_edit, 'String', obj.brain_file_output_filename);
0097 set(H.brain_file_output_dir_edit, 'String', obj.brain_file_output_dir);
0098 set(H.output_mask_file_text, 'String', obj.output_mask_file);
0099 set(H.output_brain_file_text, 'String', obj.output_brain_file);
0100 set(H.output_area_file_text,  'String', obj.output_area_file);
0101 set(H.output_act_file_text,   'String', obj.output_act_file);
0102 
0103 
0104 % update ui status
0105 obj = brain_file_maker_update_ui_state(obj);
0106 
0107 %
0108 % --- After check
0109 %
0110 if nargout ~= 1
0111     error('function caller should received obj.');
0112 end

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