Changeset 1178 for trunk/src/series/civ_series.m
- Timestamp:
- Mar 21, 2025, 10:17:07 AM (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r1177 r1178 254 254 end 255 255 end 256 CheckRelabel=isfield(Param,'FileSeries' );%=true for index relabeling (PCO) 256 257 257 258 %% introduce input image transform 258 259 transform_fct=[];%default, no transform 259 260 if isfield(Param,'FieldTransform')&&~isempty(Param.FieldTransform.TransformName) 260 % addpath(Param.FieldTransform.TransformPath)261 261 currentdir=pwd; 262 262 cd(Param.FieldTransform.TransformPath) 263 263 transform_fct=str2func(Param.FieldTransform.TransformName); 264 264 cd (currentdir) 265 %rmpath(Param.FieldTransform.TransformPath)266 265 end 267 266 … … 289 288 end 290 289 OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device); 291 290 if CheckRelabel 291 RootFileOut=index2filename(Param.FileSeries,1,1,MaxIndex_j); 292 else 293 RootFileOut=RootFile_A; 294 end 292 295 if strcmp(Param.ActionInput.ListCompareMode,'PIV') 293 ncfile=fullfile_uvmat(OutputPath,OutputDir,RootFile _A,'.nc',NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),...296 ncfile=fullfile_uvmat(OutputPath,OutputDir,RootFileOut,'.nc',NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),... 294 297 j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 295 298 else 296 ncfile=fullfile_uvmat(OutputPath,OutputDir,RootFile _A,'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...299 ncfile=fullfile_uvmat(OutputPath,OutputDir,RootFileOut,'.nc',NomTypeNc,i2_series_Civ1(ifield),[],... 297 300 j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 298 301 end … … 314 317 end 315 318 if strcmp(Param.ActionInput.ListCompareMode,'PIV') 316 ncfile_out=fullfile_uvmat(OutputPath,OutputDir,RootFile _A,'.nc',NomTypeNc,i1_civ2,i2_civ2,j1_civ2,j2_civ2);319 ncfile_out=fullfile_uvmat(OutputPath,OutputDir,RootFileOut,'.nc',NomTypeNc,i1_civ2,i2_civ2,j1_civ2,j2_civ2); 317 320 else % displacement 318 ncfile_out=fullfile_uvmat(OutputPath,OutputDir,RootFile _A,'.nc',NomTypeNc,i2_civ2,[],j2_civ2);321 ncfile_out=fullfile_uvmat(OutputPath,OutputDir,RootFileOut,'.nc',NomTypeNc,i2_civ2,[],j2_civ2); 319 322 end 320 323 end … … 336 339 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 337 340 ImageName_A=Param.ActionInput.RefFile; 341 elseif CheckRelabel 342 [RootFile,FileIndexString,FrameIndex_A]=index2filename(Param.FileSeries,i1_series_Civ1(ifield),j1_series_Civ1(ifield),MaxIndex_j); 343 ImageName_A=fullfile(RootPath_A,SubDir_A,[RootFile FileIndexString FileExt_A]); 338 344 else 339 345 ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(ifield),[],j1_series_Civ1(ifield)); 346 FrameIndex_A=FrameIndex_A_Civ1(ifield); 340 347 end 341 348 if strcmp(FileExt_A,'.nc')% case of input images in format netcdf … … 368 375 end 369 376 tsart_input=tic; 370 [par_civ1.ImageA,VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A _Civ1(ifield));377 [par_civ1.ImageA,VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A); 371 378 time_input=toc(tsart_input); 372 379 end 380 if CheckRelabel 381 [RootFile,FileIndexString,FrameIndex_B]=index2filename(Param.FileSeries,i1_series_Civ1(ifield),j1_series_Civ1(ifield),MaxIndex_j); 382 ImageName_B=fullfile(RootPath_B,SubDir_B,[RootFile FileIndexString FileExt_B]); 383 else 373 384 ImageName_B=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ1(ifield),[],j2_series_Civ1(ifield)); 385 FrameIndex_B=FrameIndex_B_Civ1(ifield); 386 end 374 387 if isempty(FileType_B)% determine the image type for the first field 375 388 [FileInfo_B,VideoObject_B]=get_file_info(ImageName_B); … … 380 393 continue 381 394 end 382 [par_civ1.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B _Civ1(ifield));395 [par_civ1.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B); 383 396 384 397 catch ME % display errors in reading input images … … 613 626 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 614 627 ImageName_A_Civ2=Param.ActionInput.RefFile; 615 else 628 elseif CheckRelabel 629 [RootFile,FileIndexString,FrameIndex_A_2]=index2filename(Param.FileSeries,i1_series_Civ2(ifield),j1_series_Civ2(ifield),MaxIndex_j); 630 ImageName_A_Civ2=fullfile(RootPath_A,SubDir_A,[RootFile FileIndexString FileExt_A]); 631 else 616 632 ImageName_A_Civ2=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_civ2,[],j1_civ2); 617 end 618 if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2(ifield)) 633 FrameIndex_A_2=FrameIndex_A_Civ2(ifield); 634 end 635 if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A,FrameIndex_A_2) 619 636 par_civ2.ImageA=par_civ1.ImageA; 620 637 else 621 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A_Civ2,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield)); 622 end 638 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A_Civ2,FileType_A,VideoObject_A,FrameIndex_A_2); 639 end 640 if CheckRelabel 641 [RootFile,FileIndexString,FrameIndex_B_2]=index2filename(Param.FileSeries,i2_civ2,j2_civ2,MaxIndex_j); 642 ImageName_B_Civ2=fullfile(RootPath_B,SubDir_B,[RootFile FileIndexString FileExt_B]); 643 else 644 645 623 646 ImageName_B_Civ2=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_civ2,[],j2_civ2); 624 if strcmp(ImageName_B_Civ2,ImageName_B) && isequal(FrameIndex_B_Civ1(ifield),FrameIndex_B_Civ2) 647 FrameIndex_B_2=FrameIndex_B_Civ2(ifield); 648 end 649 if strcmp(ImageName_B_Civ2,ImageName_B) && isequal(FrameIndex_B_2,FrameIndex_B) 625 650 par_civ2.ImageB=par_civ1.ImageB; 626 651 else 627 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B_Civ2,FileType_B,VideoObject_B,FrameIndex_B_ Civ2(ifield));652 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B_Civ2,FileType_B,VideoObject_B,FrameIndex_B_2); 628 653 end 629 654 % [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A_Civ2);
Note: See TracChangeset
for help on using the changeset viewer.