- Timestamp:
- Nov 22, 2014, 12:15:53 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r822 r824 2828 2828 2829 2829 % -------------------------------------------------------------------- 2830 function MenuImportParam_Callback(hObject, eventdata, handles)2831 % % use a starting file name for browserr2832 InputTable=get(handles.InputTable,'Data');2833 oldfile=InputTable{1,1};2834 if isempty(oldfile)2835 % use a file name stored in prefdir2836 dir_perso=prefdir;2837 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');2838 if exist(profil_perso,'file')2839 h=load (profil_perso);2840 if isfield(h,'RootPath') && ischar(h.RootPath)2841 oldfile=h.RootPath;2842 end2843 end2844 end2845 filexml=uigetfile_uvmat('pick a xml parameter file',oldfile,'.xml');% get the xml file containing processing parameters2846 % proceed only if a file has been introduced by the browser2847 if ~isempty(filexml)2848 Param=xml2struct(filexml);% read the input xml file as a Matlab structure2849 % ask to stop current Action if button RUN is in action (another process is already running)2850 if isequal(get(handles.RUN,'Value'),1)2851 answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?');2852 if strcmp(answer,'Yes')2853 STOP_Callback(hObject, eventdata, handles)2854 else2855 return2856 end2857 end2858 Param.Action.RUN=0; %desactivate the input RUN=12859 if ~isfield(Param,'InputTable')||~isfield(Param,'IndexRange')2860 msgbox_uvmat('ERROR','invalid config file: open a file in a folder ''/0_XML''')2861 return2862 end2863 Param=rmfield(Param,'InputTable');% do not refresh Input files and index range2864 Param=rmfield(Param,'IndexRange');2865 fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters2866 SeriesData=get(handles.series,'UserData');2867 if isfield(Param,'InputFields')2868 ListField=Param.InputFields.FieldName;2869 set(handles.FieldName,'String',[ListField;{'get-field...'}])2870 set(handles.FieldName,'Value',1:numel(ListField))2871 end2872 if isfield(Param,'ActionInput')% introduce parameters specific to an Action fct, for instance PIV parameters2873 set(handles.ActionInput,'Visible','on')2874 set(handles.ActionInput,'Value',0)2875 Param.ActionInput.ConfigSource=filexml;% record the source of config for future info2876 SeriesData.ActionInput=Param.ActionInput;2877 end2878 if isfield(Param,'ProjObject') %introduce projection object if relevant2879 SeriesData.ProjObject=Param.ProjObject;2880 end2881 set(handles.series,'UserData',SeriesData)2882 if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1)2883 set(handles.ProjObject,'String',Param.ProjObject.Name)2884 set(handles.ViewObject,'Visible','on')2885 set(handles.EditObject,'Visible','on')2886 set(handles.DeleteObject,'Visible','on')2887 else2888 set(handles.ProjObject,'String','')2889 set(handles.ProjObject,'Visible','off')2890 set(handles.ViewObject,'Visible','off')2891 set(handles.EditObject,'Visible','off')2892 set(handles.DeleteObject,'Visible','off')2893 end2894 set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated2895 end2830 % function MenuImportParam_Callback(hObject, eventdata, handles) 2831 % %% use a starting file name for browserr 2832 % InputTable=get(handles.InputTable,'Data'); 2833 % oldfile=InputTable{1,1}; 2834 % if isempty(oldfile) 2835 % % use a file name stored in prefdir 2836 % dir_perso=prefdir; 2837 % profil_perso=fullfile(dir_perso,'uvmat_perso.mat'); 2838 % if exist(profil_perso,'file') 2839 % h=load (profil_perso); 2840 % if isfield(h,'RootPath') && ischar(h.RootPath) 2841 % oldfile=h.RootPath; 2842 % end 2843 % end 2844 % end 2845 % filexml=uigetfile_uvmat('pick a xml parameter file',oldfile,'.xml');% get the xml file containing processing parameters 2846 % %proceed only if a file has been introduced by the browser 2847 % if ~isempty(filexml) 2848 % Param=xml2struct(filexml);% read the input xml file as a Matlab structure 2849 % % ask to stop current Action if button RUN is in action (another process is already running) 2850 % if isequal(get(handles.RUN,'Value'),1) 2851 % answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?'); 2852 % if strcmp(answer,'Yes') 2853 % STOP_Callback(hObject, eventdata, handles) 2854 % else 2855 % return 2856 % end 2857 % end 2858 % Param.Action.RUN=0; %desactivate the input RUN=1 2859 % if ~isfield(Param,'InputTable')||~isfield(Param,'IndexRange') 2860 % msgbox_uvmat('ERROR','invalid config file: open a file in a folder ''/0_XML''') 2861 % return 2862 % end 2863 % Param=rmfield(Param,'InputTable');% do not refresh Input files and index range 2864 % Param=rmfield(Param,'IndexRange'); 2865 % fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters 2866 % SeriesData=get(handles.series,'UserData'); 2867 % if isfield(Param,'InputFields') 2868 % ListField=Param.InputFields.FieldName; 2869 % set(handles.FieldName,'String',[ListField;{'get-field...'}]) 2870 % set(handles.FieldName,'Value',1:numel(ListField)) 2871 % end 2872 % if isfield(Param,'ActionInput')% introduce parameters specific to an Action fct, for instance PIV parameters 2873 % set(handles.ActionInput,'Visible','on') 2874 % set(handles.ActionInput,'Value',0) 2875 % Param.ActionInput.ConfigSource=filexml;% record the source of config for future info 2876 % SeriesData.ActionInput=Param.ActionInput; 2877 % end 2878 % if isfield(Param,'ProjObject') %introduce projection object if relevant 2879 % SeriesData.ProjObject=Param.ProjObject; 2880 % end 2881 % set(handles.series,'UserData',SeriesData) 2882 % if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1) 2883 % set(handles.ProjObject,'String',Param.ProjObject.Name) 2884 % set(handles.ViewObject,'Visible','on') 2885 % set(handles.EditObject,'Visible','on') 2886 % set(handles.DeleteObject,'Visible','on') 2887 % else 2888 % set(handles.ProjObject,'String','') 2889 % set(handles.ProjObject,'Visible','off') 2890 % set(handles.ViewObject,'Visible','off') 2891 % set(handles.EditObject,'Visible','off') 2892 % set(handles.DeleteObject,'Visible','off') 2893 % end 2894 % set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated 2895 % end 2896 2896 2897 2897 … … 3333 3333 %------------------------------------------------------------------------ 3334 3334 Mode_Callback([],[]) 3335 3336 -
trunk/src/series/civ_input.m
r822 r824 2099 2099 2100 2100 % handles structure with handles and user data (see GUIDATA) 2101 2102 2103 % --- Executes on button press in InportParam. 2104 function InportParam_Callback(hObject, eventdata, handles) 2105 hseries=findobj(allchild(0),'Tag','series'); 2106 hhseries=guidata(hseries); 2107 InputTable=get(hhseries.InputTable,'Data');% read the input file(s) table in the GUI series 2108 oldfile=InputTable{1,1}; 2109 if isempty(oldfile) 2110 % use a file name stored in prefdir 2111 dir_perso=prefdir; 2112 profil_perso=fullfile(dir_perso,'uvmat_perso.mat'); 2113 if exist(profil_perso,'file') 2114 h=load (profil_perso); 2115 if isfield(h,'RootPath') && ischar(h.RootPath) 2116 oldfile=h.RootPath; 2117 end 2118 end 2119 end 2120 filexml=uigetfile_uvmat('pick a xml parameter file for civ',oldfile,'.xml');% get the xml file containing processing parameters 2121 %proceed only if a file has been introduced by the browser 2122 if ~isempty(filexml) 2123 Param=xml2struct(filexml);% read the input xml file as a Matlab structure 2124 2125 % Param.Action.RUN=0; %desactivate the input RUN=1 2126 if ~isfield(Param,'InputTable')||~isfield(Param,'IndexRange') 2127 msgbox_uvmat('ERROR','invalid config file: open a file in a folder ''/0_XML''') 2128 return 2129 end 2130 check_input=0; 2131 if isfield(Param,'ActionInput') 2132 if isfield(Param.ActionInput,'Program')&& strcmp(Param.ActionInput.Program,'civ_series') 2133 fill_GUI(Param.ActionInput,handles.civ_input)% fill the elements of the GUI series with the input parameters 2134 check_input=1; 2135 update_CivOptions(handles,0) 2136 2137 end 2138 end 2139 if ~check_input 2140 msgbox_uvmat('ERROR','invalid config file (not for civ_series') 2141 return 2142 end 2143 % Param=rmfield(Param,'InputTable');% do not refresh Input files and index range 2144 % Param=rmfield(Param,'IndexRange'); 2145 % fill_GUI(Param,handles.civ_input)% fill the elements of the GUI series with the input parameters 2146 % % SeriesData=get(h,'UserData'); 2147 % if isfield(Param,'InputFields') 2148 % ListField=Param.InputFields.FieldName; 2149 % set(handles.FieldName,'String',[ListField;{'get-field...'}]) 2150 % set(handles.FieldName,'Value',1:numel(ListField)) 2151 % end 2152 % if isfield(Param,'ActionInput')% introduce parameters specific to an Action fct, for instance PIV parameters 2153 % set(handles.ActionInput,'Visible','on') 2154 % set(handles.ActionInput,'Value',0) 2155 % Param.ActionInput.ConfigSource=filexml;% record the source of config for future info 2156 % SeriesData.ActionInput=Param.ActionInput; 2157 % end 2158 % if isfield(Param,'ProjObject') %introduce projection object if relevant 2159 % SeriesData.ProjObject=Param.ProjObject; 2160 % end 2161 % set(handles.series,'UserData',SeriesData) 2162 % if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1) 2163 % set(handles.ProjObject,'String',Param.ProjObject.Name) 2164 % set(handles.ViewObject,'Visible','on') 2165 % set(handles.EditObject,'Visible','on') 2166 % set(handles.DeleteObject,'Visible','on') 2167 % else 2168 % set(handles.ProjObject,'String','') 2169 % set(handles.ProjObject,'Visible','off') 2170 % set(handles.ViewObject,'Visible','off') 2171 % set(handles.EditObject,'Visible','off') 2172 % set(handles.DeleteObject,'Visible','off') 2173 % end 2174 % set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated 2175 end -
trunk/src/series/civ_series.m
r822 r824 131 131 PairCiv1=Param.ActionInput.PairIndices.ListPairCiv1; 132 132 if isfield(Param.ActionInput.PairIndices,'ListPairCiv2') 133 PairCiv2=Param.ActionInput.PairIndices.ListPairCiv2; 133 PairCiv2=Param.ActionInput.PairIndices.ListPairCiv2;%string which determines the civ2 pair 134 134 end 135 135 if iview_A==1% if Civ1 is performed … … 157 157 % j2_series_Civ1=j2_series_Civ1(~check_bounds); 158 158 case 'displacement' 159 i1_series_Civ1=Param.ActionInput.OriginIndex*ones(size(i _series{1}));160 i2_series_Civ1=i _series{1};i2_series_Civ2=i_series{1};161 j1_series_Civ1=ones(size(i _series{1}));% first j index is 1159 i1_series_Civ1=Param.ActionInput.OriginIndex*ones(size(i1_series{1})); 160 i2_series_Civ1=i1_series{1};i2_series_Civ2=i1_series{1}; 161 j1_series_Civ1=ones(size(i1_series{1}));% first j index is 1 162 162 if isempty(j1_series_Civ1) 163 j2_series_Civ1=ones(size(i _series{1}));163 j2_series_Civ1=ones(size(i1_series{1})); 164 164 else 165 165 j2_series_Civ1=j1_series_Civ1; … … 170 170 NomTypeNc=NomType; 171 171 case 'shift' 172 i1_series_Civ1=i _series{1};i1_series_Civ2=i_series{1};173 i2_series_Civ1=i _series{1};i2_series_Civ2=i_series{1};174 if isempty(j _series{1})175 j1_series_Civ1=ones(size(i _series{1}));176 j2_series_Civ1=ones(size(i _series{1}));172 i1_series_Civ1=i1_series{1};i1_series_Civ2=i1_series{1}; 173 i2_series_Civ1=i1_series{2};i2_series_Civ2=i1_series{2}; 174 if isempty(j1_series{1}) 175 j1_series_Civ1=ones(size(i1_series{1})); 176 j2_series_Civ1=ones(size(i1_series{2})); 177 177 else 178 j1_series_Civ1=j _series{1};179 j2_series_Civ1=j _series{1};178 j1_series_Civ1=j1_series{1}; 179 j2_series_Civ1=j1_series{2}; 180 180 end 181 181 j1_series_Civ2=j1_series_Civ1; … … 192 192 FrameIndex_B_Civ1=j2_series_Civ1; 193 193 end 194 if ~isempty(PairCiv2) 195 % i1_series_Civ2=i1_series_Civ2(~check_bounds); 196 % i2_series_Civ2=i2_series_Civ2(~check_bounds); 197 % j1_series_Civ2=j1_series_Civ2(~check_bounds); 198 % j2_series_Civ2=j2_series_Civ2(~check_bounds); 194 if isempty(PairCiv2) 195 FrameIndex_A_Civ2=FrameIndex_A_Civ1; 196 FrameIndex_B_Civ2=FrameIndex_B_Civ1; 197 else 199 198 if isempty(j1_series_Civ2) 200 199 FrameIndex_A_Civ2=i1_series_Civ2; -
trunk/src/series/extract_rdvision.m
r810 r824 117 117 return 118 118 end 119 if exist(fullfile(RootPath{1},OutputDir),'dir') 120 msgbox_uvmat('ERROR',['output folder ' OutputDir ' already exists, put data in a new folder Experiment']); 121 return 122 end 119 123 120 124 %% calibration data and timing: read the ImaDoc files … … 198 202 ImageName='img_1.png'; 199 203 end 200 204 201 205 %update information of 'Heading' 202 206 uid_Heading=find(t,'ImaDoc/Heading'); -
trunk/src/series/turb_stat.m
r810 r824 221 221 Uprev=Field.U; 222 222 Vprev=Field.V; 223 if isfield(Field,'FF') 223 224 FFprev=Field.FF; 225 else 226 FFprev=true(size(Field.U)); 227 end 224 228 end 225 229 FF=isnan(Field.U);%|Field.U<-60|Field.U>30;% threshold on U -
trunk/src/uigetfile_uvmat.m
r809 r824 147 147 htitlebox=findobj(hfig,'tag','titlebox'); % display the current dir name 148 148 DirName=get(htitlebox,'String'); 149 149 if isempty(regexp(DirName,'^http://'))% if the input dir is not a web site (begins by http://) 150 % FullSelectName=DirName; 151 % else 150 152 if ~strcmp(filter_ext,'uigetdir')% a file is expected as output, not a dir 151 153 hlist=findobj(hfig,'Tag','list'); … … 162 164 end 163 165 FullSelectName=fullfile(DirName,SelectName); 166 % if regexp(DirName,'^http://')% if the input dir is a web site (begins by http://) 167 164 168 if exist(FullSelectName,'file') 165 169 switch option … … 181 185 end 182 186 end 187 end 183 188 set(hObject,'backgroundColor',[0 1 0])% indicate end button activation 184 189 uiresume(get(hObject,'parent')) … … 313 318 NumFiles=0; %default 314 319 if numel(ListStruct)<1 % case of empty dir 320 % if regexp(DirName,'^http://')% if the input dir is a web site (begins by http://) 321 % web(DirName) 322 % else 315 323 ListFiles={}; 316 324 return 325 % end 317 326 end 318 327 ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
Note: See TracChangeset
for help on using the changeset viewer.