Changeset 361
- Timestamp:
- Jan 9, 2012, 8:26:06 AM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/fill_GUI.m
r360 r361 7 7 for ifield=1:numel(fields) 8 8 if isstruct(Param.(fields{ifield})) 9 fields{ifield}10 9 if isfield(handles,fields{ifield}) 11 errormsg=fill_GUI(Param.(fields{ifield}),get(handles.(fields{ifield}),'children')); 10 set(handles.(fields{ifield}),'Visible','on') 11 children=get(handles.(fields{ifield}),'children'); 12 for ichild=1:numel(children) 13 hchild.(get(children(ichild),'tag'))=children(ichild); 14 end 15 errormsg=fill_GUI(Param.(fields{ifield}),hchild); 12 16 end 13 17 else 14 fields{ifield} 15 num2str(Param.(fields{ifield})) 16 if isnumeric(Param.(fields{ifield})) 17 if isfield(handles,['num_' fields{ifield}]) 18 set(handles.(['num_' fields{ifield}]),'String',num2str(Param.(fields{ifield}))) 18 hh=[]; 19 if isfield(handles,fields{ifield}) 20 hh=handles.(fields{ifield}); 21 if strcmp(get(hh,'Type'),'uitable') 22 set(hh,'Data',input) 23 break 19 24 end 20 else 21 if isfield(handles,fields{ifield}) 22 set(handles.(fields{ifield}),'String',num2str(Param.(fields{ifield}))) 25 elseif isnumeric(input) && isfield(handles,['num_' fields{ifield}]) 26 hh=handles.(['num_' fields{ifield}]); 27 end 28 if ~isempty(hh) 29 set(hh,'Visible','on') 30 switch get(hh,'style') 31 case {'checkbox','pushbutton','radiobutton','togglebutton'} 32 if isnumeric(input) 33 set(hh,'Value',input) 34 end 35 case 'edit' 36 if isnumeric(input) 37 input=num2str(input); 38 end 39 set(hh,'String',input) 40 case{'Listbox','popupmenu'} 41 if isnumeric(input) 42 input=num2str(input); 43 end 44 menu=get(hh,'String'); 45 iline=find(strcmp(input,menu)); 46 if isempty(iline) 47 iline=numel(menu)+1; 48 set(hh,'String',[menu;{input}]) 49 end 50 set(hh,'Value',iline) 23 51 end 24 52 end -
trunk/src/series/aver_stat.m
r340 r361 13 13 %Series: Matlab structure containing information set by the series interface 14 14 % 15 function GUI_input=aver_stat( num_i1,num_i2,num_j1,num_j2,Series)15 function GUI_input=aver_stat(Param) 16 16 %---------------------------------------------------------------------- 17 17 % --- make average on a series of files … … 25 25 % Series.Time: 26 26 % Series.GeometryCalib:%requests for the visibility of input windows in the GUI series (activated directly by the selection in the menu ACTION) 27 if ~exist(' num_i1','var')27 if ~exist('Param','var') 28 28 GUI_input={'RootPath';'two';...%nbre of possible input series (options 'on'/'two'/'many', default:'one') 29 29 'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default) … … 43 43 44 44 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 45 hseries=guidata(Series.hseries);%handles of the GUI series 46 WaitbarPos=get(hseries.waitbar_frame,'Position'); 47 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 45 46 %% Input parameters: read the xml file fior batch case 47 if ischar(Param) && ~isempty(find(regexp('Param','.xml$'))) 48 Param=xml2struct(Param); 49 else 50 hseries=guidata(Param.hseries);%handles of the GUI series 51 WaitbarPos=get(hseries.waitbar_frame,'Position'); 52 end 53 Param 54 Param.IndexRange 48 55 49 56 %% projection object … … 60 67 61 68 %% root input file and type 62 if ~iscell(Series.RootPath)% case of a single input field series 63 num_i1={num_i1};num_j1={num_j1};num_i2={num_i2};num_j2={num_j2}; 64 RootPath={Series.RootPath}; 65 RootFile={Series.RootFile}; 66 SubDir={Series.SubDir}; 67 FileExt={Series.FileExt}; 68 NomType={Series.NomType}; 69 else 70 RootPath=Series.RootPath; 71 RootFile=Series.RootFile; 72 SubDir=Series.SubDir; 73 NomType=Series.NomType; 74 FileExt=Series.FileExt; 75 end 69 % if ~iscell(Series.RootPath)% case of a single input field series 70 % num_i1={num_i1};num_j1={num_j1};num_i2={num_i2};num_j2={num_j2}; 71 % RootPath={Series.RootPath}; 72 % RootFile={Series.RootFile}; 73 % SubDir={Series.SubDir}; 74 % FileExt={Series.FileExt}; 75 % NomType={Series.NomType}; 76 % else 77 % RootPath=Series.RootPath; 78 % RootFile=Series.RootFile; 79 % SubDir=Series.SubDir; 80 % NomType=Series.NomType; 81 % FileExt=Series.FileExt; 82 % end 83 RootPath=Param.InputTable(:,1); 84 RootFile=Param.InputTable(:,3); 85 SubDir=Param.InputTable(:,2); 86 NomType=Param.InputTable(:,4); 87 FileExt=Param.InputTable(:,5); 76 88 ext=FileExt{1}; 77 89 form=imformats(ext([2:end]));%test valid Matlab image formats … … 134 146 135 147 %% number of slices 136 NbSlice= Series.IndexRange.NbSlice;148 NbSlice=Param.IndexRange.NbSlice; 137 149 NbSlice_name=num2str(NbSlice); 138 150 … … 161 173 %% get the velocity type 162 174 testcivx=0; 163 FileExt=get(hseries.FileExt,'String');175 % FileExt=get(hseries.FileExt,'String'); 164 176 if ~isequal(FieldName,{'get_field...'}) 165 177 testcivx=isequal(FileType{1},'netcdf'); … … 297 309 transform_fct=[];%default 298 310 if isfield(Series,'transform_fct') 299 transform_fct= Series.transform_fct;311 transform_fct=Param.transform_fct; 300 312 end 301 313 … … 456 468 display([fileresult{i_slice} ' written']); 457 469 else %case of netcdf input file , determine global attributes 458 DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute { Series.Action}];470 DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute {Param.Action}]; 459 471 ActionKey='Action'; 460 472 while isfield(DataMean,ActionKey) 461 473 ActionKey=[ActionKey '_1']; 462 474 end 463 eval(['DataMean.' ActionKey '= Series.Action;'])475 eval(['DataMean.' ActionKey '=Param.Action;']) 464 476 DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute {ActionKey}]; 465 477 if isfield(DataMean,'Time') -
trunk/src/series/check_data_files.m
r340 r361 134 134 end 135 135 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]}; 136 Tabchar(index+1,i_slice)={[file ' 136 Tabchar(index+1,i_slice)={[file '...' lastfield]}; 137 137 end 138 138 end … … 165 165 set(hfig,'name',['view= ' num2str(iview)]) 166 166 167 h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', @ncbrowser_uvmat);167 h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', {'open_uvmat'}); 168 168 hh=uicontrol('Style','listbox', 'Position', [20 340 500 40], 'String', message); 169 169 end
Note: See TracChangeset
for help on using the changeset viewer.