Changeset 1020 for trunk/src/series/civ_series.m
- Timestamp:
- Nov 18, 2017, 5:55:26 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r1010 r1020 60 60 Data.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 61 61 Data.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 62 % if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices')&& strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')63 % Data.Desable_j_index='on';% hide the j index in series (set by the pair choice in civ_input)64 % end65 62 Data.NbSlice='off'; %nbre of slices ('off' by default) 66 63 Data.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) … … 73 70 Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar) 74 71 Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1) 75 if is equal(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')72 if isfield(Data.ActionInput,'PairIndices') && strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2') 76 73 if isfield(Data.ActionInput.PairIndices,'ListPairCiv2') 77 74 str_civ=Data.ActionInput.PairIndices.ListPairCiv2; … … 133 130 iview_A=2;% the second line is used for the input images of Civ2 134 131 end 135 if strcmp(Param.ActionInput.ListCompareMode,'shift')136 iview_B=iview_A+1; % the second image series is on the next line of the input table137 end132 % if strcmp(Param.ActionInput.ListCompareMode,'shift') 133 % iview_B=iview_A+1; % the second image series is on the next line of the input table 134 % end 138 135 if iview_A~=0 139 136 RootPath_A=Param.InputTable{iview_A,1}; … … 180 177 case 'displacement' 181 178 i1_series_Civ1=Param.ActionInput.OriginIndex*ones(size(i1_series{1})); 182 i2_series_Civ1=i1_series{1};i2_series_Civ2=i1_series{1}; 183 j1_series_Civ1=ones(size(i1_series{1}));% first j index is 1 184 if isempty(j1_series_Civ1) 185 j2_series_Civ1=ones(size(i1_series{1})); 179 i1_series_Civ2=i1_series_Civ1; 180 i2_series_Civ1=i1_series{1}; 181 i2_series_Civ2=i1_series{1}; 182 j1_series_Civ1=[];% no j index variation for the ref image 183 j1_series_Civ2=[]; 184 if isempty(j1_series{1}) 185 j2_series_Civ1=ones(size(i1_series_Civ1)); 186 186 else 187 j2_series_Civ1=j1_series_Civ1; 188 end 189 i1_series_Civ2=i1_series_Civ1; 190 j1_series_Civ2=j1_series_Civ1; 187 j2_series_Civ1=j1_series{1};% if j index exist 188 end 191 189 j2_series_Civ2=j2_series_Civ1; 192 NomTypeNc= Param.InputTable{1,4};190 NomTypeNc='_1'; 193 191 case 'PIV volume' 194 192 % TODO, TODO 195 193 end 196 if isempty(j1_series_Civ1) 194 %determine frame indices for input with movie or other multiframe input file 195 if isempty(j1_series_Civ1)% simple movie with index i 197 196 FrameIndex_A_Civ1=i1_series_Civ1; 198 197 FrameIndex_B_Civ1=i2_series_Civ1; 199 198 j1_series_Civ1=ones(size(i1_series_Civ1)); 199 if strcmp(Param.ActionInput.ListCompareMode,'PIV') 200 200 j2_series_Civ1=ones(size(i1_series_Civ1)); 201 else 201 end 202 else % movie for each burst or volume (index j) 202 203 FrameIndex_A_Civ1=j1_series_Civ1; 203 204 FrameIndex_B_Civ1=j2_series_Civ1; … … 211 212 FrameIndex_B_Civ2=i2_series_Civ2; 212 213 j1_series_Civ2=ones(size(i1_series_Civ2)); 214 if strcmp(Param.ActionInput.ListCompareMode,'PIV') 213 215 j2_series_Civ2=ones(size(i1_series_Civ2)); 216 end 214 217 else 215 218 FrameIndex_A_Civ2=j1_series_Civ2; … … 227 230 NbField=numel(i1_series_Civ1); 228 231 elseif Param.ActionInput.CheckCiv2 % Civ2 is performed without Civ1 229 230 232 NbField=numel(i1_series_Civ2); 231 233 else … … 233 235 end 234 236 235 236 237 237 %% Output directory 238 238 OutputDir=''; … … 257 257 if isfield(XmlData,'Time') 258 258 Time=XmlData.Time; 259 TimeSource='xml';260 259 end 261 260 if isfield(XmlData,'Camera') … … 271 270 end 272 271 end 273 274 275 272 end 276 273 … … 342 339 disp('civ1 started') 343 340 end 344 par_civ1=Param.ActionInput.Civ1; 341 par_civ1=Param.ActionInput.Civ1;% parameters for civ1 345 342 if CheckInputFile % read input images (except in mode Test where it is introduced directly in Param.ActionInput.Civ1.ImageNameA and B) 346 343 try 344 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 345 ImageName_A=Param.ActionInput.RefFile; 346 else 347 347 ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(ifield),[],j1_series_Civ1(ifield)); 348 end 348 349 if strcmp(FileExt_A,'.nc')% case of input images in format netcdf 349 350 FieldName_A=Param.InputFields.FieldName; … … 351 352 par_civ1.ImageA=DataIn.(FieldName_A); 352 353 else % usual image formats for image A 353 if isempty(FileType_A) 354 if isempty(FileType_A)% open the image object if not already done in case of movie input 354 355 [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A); 355 356 FileType_A=FileInfo_A.FileType; … … 357 358 Time=zeros(FileInfo_A.NumberOfFrames+1,2); 358 359 Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)'; 359 TimeSource='video';360 ColorType='truecolor';361 360 end 362 361 if ~isempty(FileType_A) && isempty(Time)% Time = index i +0.001 index j by default … … 596 595 par_civ2.ImageA=[]; 597 596 par_civ2.ImageB=[]; 598 % i1_civ2=i1_series_Civ2(ifield); 599 % i2_civ2=i1_civ2; 600 % if ~isempty(i2_series_Civ2) 601 % i2_civ2=i2_series_Civ2(ifield); 602 % end 603 % j1_civ2=1; 604 % if ~isempty(j1_series_Civ2) 605 % j1_civ2=j1_series_Civ2(ifield); 606 % end 607 % j2_civ2=i1_civ2; 608 % if ~isempty(j2_series_Civ2) 609 % j2_civ2=j2_series_Civ2(ifield); 610 % end 597 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 598 ImageName_A_Civ2=Param.ActionInput.RefFile; 599 else 611 600 ImageName_A_Civ2=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_civ2,[],j1_civ2); 612 601 end 613 602 if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2(ifield)) 614 603 par_civ2.ImageA=par_civ1.ImageA; … … 622 611 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B_Civ2,FileType_B,VideoObject_B,FrameIndex_B_Civ2(ifield)); 623 612 end 624 % if strcmp(Param.ActionInput.ListCompareMode,'PIV')625 % ncfile_out=fullfile_uvmat(RootPath_A,OutputDir,RootFile_A,'.nc',NomTypeNc,i1,i2,j1,j2);626 % else % displacement627 % ncfile_out=fullfile_uvmat(RootPath_A,OutputDir,RootFile_A,'.nc',NomTypeNc,i2,[],j2);628 % end629 613 par_civ2.ImageWidth=FileInfo_A.Width; 630 614 par_civ2.ImageHeight=FileInfo_A.Height;
Note: See TracChangeset
for help on using the changeset viewer.