- Timestamp:
- Mar 11, 2025, 9:51:39 PM (3 days ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r1158 r1175 409 409 410 410 %% prepare the string for plot command 411 if isfield(PlotParam,'Type')&& strcmp(PlotParam.Type,'semilogx') 412 plotstr='hhh=semilogx('; 413 else 411 414 plotstr='hhh=plot('; 415 end 412 416 xtitle=''; 413 417 ytitle=''; -
trunk/src/series/civ_series.m
r1170 r1175 51 51 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed 52 52 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 53 if 0==1 %never satisfied but trigger compilation with the appropriate transform functions ('eval' inactive for compilation) 54 ima_rescale 55 end 53 56 path_series=fileparts(which('series')); 54 57 addpath(fullfile(path_series,'series')) … … 66 69 Data.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 67 70 Data.FieldName='on';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 68 Data.FieldTransform = 'o ff';%can use a transform function71 Data.FieldTransform = 'on';%can use a transform function 69 72 Data.ProjObject='off';%can use projection object(option 'off'/'on', 70 73 Data.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) … … 99 102 % CheckOutputFile=isfield(Param,'OutputSubDir');%= 1 in test use for TestPatch (no nc file produced) 100 103 101 %% input files and indexing (skipped in Test mode)104 %% input files and indexing 102 105 hseries=findobj(allchild(0),'Tag','series'); 103 106 RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series … … 112 115 if isfield(Param,'InputTable') 113 116 [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 114 % iview_A=0;% series index (iview) for the first image series115 117 iview_B=0;% series index (iview) for the second image series (only non zero for option 'shift' comparing two image series ) 116 118 if Param.ActionInput.CheckCiv1 … … 119 121 iview_A=2;% the second line is used for the input images 120 122 end 121 % if iview_A~=0122 123 RootPath_A=Param.InputTable{iview_A,1}; 123 124 RootFile_A=Param.InputTable{iview_A,3}; … … 253 254 end 254 255 end 255 % end 256 257 %% introduce input image transform 258 if isfield(Param,'FieldTransform')&&~isempty(Param.FieldTransform.TransformName) 259 addpath(Param.FieldTransform.TransformPath) 260 transform_fct=str2func(Param.FieldTransform.TransformName); 261 rmpath(Param.FieldTransform.TransformPath) 262 end 263 256 264 257 265 %%%%% MAIN LOOP %%%%%% … … 276 284 end 277 285 end 278 % % if CheckInputFile279 % if CheckOutputFile280 286 OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device); 281 % if iview_A==0 % no nc file has been entered 282 % ncfile=fullfile_uvmat(OutputPath,Param.InputTable{1,2},Param.InputTable{1,3},Param.InputTable{1,5},... 283 % NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 284 % else% an existing nc file has been entered 285 % if iview_A==1% if Civ1 is performed 286 % Civ1Dir=OutputDir; 287 % else 288 % Civ1Dir=Param.InputTable{1,2}; 289 % end 287 290 288 if strcmp(Param.ActionInput.ListCompareMode,'PIV') 291 289 ncfile=fullfile_uvmat(OutputPath,OutputDir,RootFile_A,'.nc',NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),... … … 295 293 j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 296 294 end 297 % end298 295 ncfile_out=ncfile;% by default 299 296 … … 380 377 end 381 378 [par_civ1.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B_Civ1(ifield)); 379 382 380 catch ME % display errors in reading input images 383 381 if ~isempty(ME.message) … … 385 383 continue 386 384 end 385 end 386 %% user defined image transform 387 if ~isempty(transform_fct) 388 par_civ1 =transform_fct(par_civ1,Param); 387 389 end 388 390 … … 597 599 par_civ2.Grid(:,2)=reshape(GridY,[],1);% increases with array index 598 600 end 601 602 %% user defined image transform 603 if ~isempty(transform_fct) 604 par_civ2 =transform_fct(par_civ2,Param); 605 end 606 599 607 600 608 % get the guess from patch1 or patch2 (case 'CheckCiv3') -
trunk/src/series/sub_background.m
r1172 r1175 151 151 end 152 152 BrightnessRankThreshold=0.1; 153 % CheckSubmedian='No';154 % SaturationCoeff=0;155 153 if isfield(Param,'ActionInput') 156 154 if isfield(Param.ActionInput,'CheckVolume') && Param.ActionInput.CheckVolume -
trunk/src/uvmat.m
r1169 r1175 4019 4019 set(handles.Histogram,'Visible','off') 4020 4020 set(handles.HistoMenu,'Visible','off') 4021 set(handles.LogLinHisto,'Visible','off') 4021 4022 set(handles.HistoAxes,'Visible','off') 4022 4023 hlegend=findobj(handles.uvmat,'Tag','HistoLegend'); … … 4265 4266 set(handles.Histogram,'Visible','on') 4266 4267 set(handles.HistoMenu,'Visible','on') 4268 set(handles.LogLinHisto,'Visible','on') 4267 4269 set(handles.HistoAxes,'Visible','on') 4268 4270 HistoMenu_Callback(handles.HistoMenu, [], handles)% plot first histogram … … 4383 4385 C=reshape(double(B),1,nxy(1)*nxy(2));% reshape in a vector 4384 4386 Histo.histo(:,col)=hist(C, Histo.(FieldName)); %calculate histogram 4385 end 4386 end 4387 plot_field(Histo,handles.HistoAxes); 4387 if isequal(get(handles.LogLinHisto,'Value'),2) 4388 PlotParam.Type='semilogx'; 4389 else 4390 PlotParam.Type='plot'; 4391 end 4392 end 4393 end 4394 plot_field(Histo,handles.HistoAxes,PlotParam); 4388 4395 hlegend=findobj(handles.uvmat,'Tag','HistoLegend'); 4389 4396 if isempty(hlegend) … … 6180 6187 6181 6188 6189 6190 6191 % --- Executes on selection change in LogLinHisto. 6192 function LogLinHisto_Callback(hObject, eventdata, handles) 6193 HistoMenu_Callback(hObject, eventdata, handles) 6194 % hObject handle to LogLinHisto (see GCBO) 6195 % eventdata reserved - to be defined in a future version of MATLAB 6196 % handles structure with handles and user data (see GUIDATA) 6197 6198 % Hints: contents = cellstr(get(hObject,'String')) returns LogLinHisto contents as cell array 6199 % contents{get(hObject,'Value')} returns selected item from LogLinHisto 6200 6201
Note: See TracChangeset
for help on using the changeset viewer.