Changeset 773 for trunk/src/series.m
- Timestamp:
- May 10, 2014, 12:49:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r772 r773 241 241 242 242 %% introduce the input file name(s) if defined from input Param, TODO: avoid the file checking if Param.i1_series defined 243 if isfield(Param,'FileName')&&~isempty(Param.FileName) 243 if isfield(Param,'InputFile') 244 244 245 InputTable={}; 246 %% fill the list of file series 247 SeriesData=Param.HiddenData; 248 InputTable=[{Param.InputFile.RootPath},{Param.InputFile.SubDir},{Param.InputFile.RootFile},{Param.InputFile.NomType},{Param.InputFile.FileExt}]; 249 TimeTable=[{[]},{[]},{[]},{[]}]; 250 if isfield(Param.InputFile,'RootPath_1') 251 InputTable=[InputTable;[{Param.InputFile.RootPath_1},{Param.InputFile.SubDir_1},{Param.InputFile.RootFile_1},{Param.InputFile.NomType_1},{Param.InputFile.FileExt_1}]]; 252 TimeTable=[TimeTable; [{[]},{[]},{[]},{[]}]]; 253 end 245 254 set(handles.InputTable,'Data',InputTable) 246 display_file_name(handles,Param,'one')%refresh the input table 255 256 % display_file_name(handles,Param,'one')%refresh the input table 257 update_rootinfo(handles,Param.HiddenData.i1_series{1},Param.HiddenData.i2_series{1},Param.HiddenData.j1_series{1},Param.HiddenData.j2_series{1},... 258 Param.HiddenData.FileInfo{1},Param.HiddenData.MovieObject{1},1) 247 259 if isfield(Param,'FileName_1') 248 Param.FileName=Param.FileName_1; 249 display_file_name(handles,Param,2) 260 261 % display_file_name(handles,Param,2) 262 update_rootinfo(handles,Param.HiddenData.i1_series{2},Param.HiddenData.i2_series{2},Param.HiddenData.j1_series{2},Param.HiddenData.j2_series{2},... 263 Param.HiddenData.FileInfo{2},Param.HiddenData.MovieObject{2},2) 250 264 end 251 265 else 252 266 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed 253 end 267 end 254 268 if isfield(Param,'incr_i') 255 269 set(handles.num_incr_i,'String',num2str(Param.incr_i)) … … 1198 1212 function num_last_j_Callback(hObject, eventdata, handles) 1199 1213 %------------------------------------------------------------------------ 1200 first_j=str2num(get(handles.num_first_j,'String'));1201 last_j=str2num(get(handles.num_last_j,'String'));1202 ref_j=ceil((first_j+last_j)/2);1203 set(handles.num_ref_j,'String', num2str(ref_j))1204 num_ref_j_Callback(hObject, eventdata, handles)1214 % first_j=str2num(get(handles.num_first_j,'String')); 1215 % last_j=str2num(get(handles.num_last_j,'String')); 1216 % ref_j=ceil((first_j+last_j)/2); 1217 % set(handles.num_ref_j,'String', num2str(ref_j)) 1218 % num_ref_j_Callback(hObject, eventdata, handles) 1205 1219 SeriesData=get(handles.series,'UserData'); 1206 1220 if ~isfield(SeriesData,'Time') … … 2646 2660 function MenuHelp_Callback(hObject, eventdata, handles) 2647 2661 %------------------------------------------------------------------- 2648 web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp# series')2662 web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp#Series') 2649 2663 % path_to_uvmat=which ('uvmat');% check the path of uvmat 2650 2664 % pathelp=fileparts(path_to_uvmat); … … 2781 2795 set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated 2782 2796 end 2797 2798 2799 2800 % -------------------------------------------------------------------- 2801 function MenuImportParam_Callback(hObject, eventdata, handles) 2802 %% use a starting file name for browserr 2803 InputTable=get(handles.InputTable,'Data'); 2804 oldfile=InputTable{1,1}; 2805 if isempty(oldfile) 2806 % use a file name stored in prefdir 2807 dir_perso=prefdir; 2808 profil_perso=fullfile(dir_perso,'uvmat_perso.mat'); 2809 if exist(profil_perso,'file') 2810 h=load (profil_perso); 2811 if isfield(h,'RootPath') && ischar(h.RootPath) 2812 oldfile=h.RootPath; 2813 end 2814 end 2815 end 2816 filexml=uigetfile_uvmat('pick a xml parameter file',oldfile,'.xml');% get the xml file containing processing parameters 2817 %proceed only if a file has been introduced by the browser 2818 if ~isempty(filexml) 2819 Param=xml2struct(filexml);% read the input xml file as a Matlab structure 2820 % ask to stop current Action if button RUN is in action (another process is already running) 2821 if isequal(get(handles.RUN,'Value'),1) 2822 answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?'); 2823 if strcmp(answer,'Yes') 2824 STOP_Callback(hObject, eventdata, handles) 2825 else 2826 return 2827 end 2828 end 2829 Param.Action.RUN=0; %desactivate the input RUN=1 2830 if ~isfield(Param,'InputTable')||~isfield(Param,'IndexRange') 2831 msgbox_uvmat('ERROR','invalid config file: open a file in a folder ''/0_XML''') 2832 return 2833 end 2834 Param=rmfield(Param,'InputTable');% do not refresh Input files and index range 2835 Param=rmfield(Param,'IndexRange'); 2836 fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters 2837 SeriesData=get(handles.series,'UserData'); 2838 if isfield(Param,'InputFields') 2839 ListField=Param.InputFields.FieldName; 2840 set(handles.FieldName,'String',[ListField;{'get-field...'}]) 2841 set(handles.FieldName,'Value',1:numel(ListField)) 2842 end 2843 if isfield(Param,'ActionInput')% introduce parameters specific to an Action fct, for instance PIV parameters 2844 set(handles.ActionInput,'Visible','on') 2845 set(handles.ActionInput,'Value',0) 2846 Param.ActionInput.ConfigSource=filexml;% record the source of config for future info 2847 SeriesData.ActionInput=Param.ActionInput; 2848 end 2849 if isfield(Param,'ProjObject') %introduce projection object if relevant 2850 SeriesData.ProjObject=Param.ProjObject; 2851 end 2852 set(handles.series,'UserData',SeriesData) 2853 if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1) 2854 set(handles.ProjObject,'String',Param.ProjObject.Name) 2855 set(handles.ViewObject,'Visible','on') 2856 set(handles.EditObject,'Visible','on') 2857 set(handles.DeleteObject,'Visible','on') 2858 else 2859 set(handles.ProjObject,'String','') 2860 set(handles.ProjObject,'Visible','off') 2861 set(handles.ViewObject,'Visible','off') 2862 set(handles.EditObject,'Visible','off') 2863 set(handles.DeleteObject,'Visible','off') 2864 end 2865 set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated 2866 end 2867 2868 2783 2869 2784 2870 %------------------------------------------------------------------------ … … 3253 3339 % Indices: row and column indices of the cell(s) currently selecteds 3254 3340 % handles structure with handles and user data (see GUIDATA) 3341 3342
Note: See TracChangeset
for help on using the changeset viewer.