Changeset 1175 for trunk/src/series/civ_series.m
- Timestamp:
- Mar 11, 2025, 9:51:39 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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')
Note: See TracChangeset
for help on using the changeset viewer.