0001 function [obj] = bm_edit_app_update_model_status_listbox(obj)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0017 if ~strcmp(obj.class_type, 'bm_edit_app')
0018 error('class type is invalid.');
0019 end
0020
0021
0022
0023
0024 H = guihandles(obj.h);
0025
0026 all_index = bm_manager_get_bm_list_index(obj.bmm);
0027 selected_index = get(H.brain_model_list_listbox, 'Value');
0028
0029 if length(selected_index) == 1 && ~isempty(all_index)
0030
0031
0032
0033 info_cell = bm_manager_get_model_info(obj.bmm, selected_index);
0034 info = info_cell{1};
0035 status_str = sprintf('model name : %s\ntype : %s\n', ...
0036 info.model_name, ...
0037 info.class_type);
0038
0039 if isfield(info, 'surf_close')
0040 if info.surf_close == true
0041 surf_str = 'surface : closed.';
0042 else
0043 surf_str = 'surface : not closed.';
0044 end
0045 status_str = [status_str, surf_str];
0046 end
0047
0048 conductivity_str = num2str(info_cell{1}.conductivity);
0049 else
0050 status_str = [];
0051 conductivity_str = [];
0052 end
0053
0054 set(H.brain_model_status_edit, 'String', status_str);
0055 set(H.conductivity_edit, 'String', conductivity_str);
0056
0057
0058
0059
0060 if nargout ~= 1
0061 error('function caller should receive obj.');
0062 end