Changeset 635 for trunk/src/series/civ_series.m
 Timestamp:
 May 19, 2013, 11:37:49 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series/civ_series.m
r633 r635 79 79 %% input files and indexing 80 80 NbField=1; 81 MaxIndex=cell2mat(Param.IndexRange.MaxIndex); 82 MinIndex=cell2mat(Param.IndexRange.MinIndex); 81 MaxIndex_i=Param.IndexRange.MaxIndex_i; 82 MinIndex_i=Param.IndexRange.MinIndex_i; 83 MaxIndex_j=1;MinIndex_j=1; 84 if isfield(Param.IndexRange,'MaxIndex_j')&& isfield(Param.IndexRange,'MinIndex_j') 85 MaxIndex_j=Param.IndexRange.MaxIndex_j; 86 MinIndex_j=Param.IndexRange.MinIndex_j; 87 end 83 88 if isfield(Param,'InputTable') 84 89 [filecell,i_series,tild,j_series]=get_file_series(Param); … … 120 125 if iview_B==0 121 126 FileType_B=FileType_A; 122 VideoObject_B=VideoObject_A;127 VideoObject_B=VideoObject_A; 123 128 PairCiv1=Param.ActionInput.PairIndices.ListPairCiv1; 124 129 PairCiv2=''; … … 127 132 end 128 133 [i1_series_Civ1,i2_series_Civ1,j1_series_Civ1,j2_series_Civ1,check_bounds,NomTypeNc]=... 129 find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex ,MaxIndex);134 find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j); 130 135 if ~isempty(PairCiv2) 131 136 [i1_series_Civ2,i2_series_Civ2,j1_series_Civ2,j2_series_Civ2,check_bounds_Civ2]=... 132 find_pair_indices(PairCiv2,i_series{1},j_series{1},MinIndex ,MaxIndex);137 find_pair_indices(PairCiv2,i_series{1},j_series{1},MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j); 133 138 check_bounds=check_bounds  check_bounds_Civ2; 134 139 end … … 158 163 end 159 164 else 160 165 [FileType_B,FileInfo,VideoObject_B]=get_file_type(filecell{2,1}); 161 166 if isempty(find(strcmp(FileType_B,{'multimage','mmreader','video'}))) 162 167 displ(['ERROR: the file line ' num2str(iview_B) ' must be an image']) 163 end 168 end 164 169 %TODO : introduce the second file series if relevant: case %displacement 165 170 end … … 217 222 %%%%% MAIN LOOP %%%%%% 218 223 for ifield=1:NbField 219 update_waitbar(WaitbarHandle,i ndex/nbfield)220 if ~isempty(RUNHandle) && ishandle(RUNHandle) &&~strcmp(get(RUNHandle,'BusyAction'),'queue')224 update_waitbar(WaitbarHandle,ifield/NbField) 225 if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 221 226 disp('program stopped by user') 222 227 break … … 264 269 j2=j2_series_Civ1(ifield); 265 270 end 266 Data.Civ1_Time=(time( i2+1,j2+1)+time(i1+1,j1+1))/2;267 Data.Civ1_Dt=time( i2+1,j2+1)time(i1+1,j1+1);271 Data.Civ1_Time=(time(j2+1,i2+1)+time(j1+1,i1+1))/2; 272 Data.Civ1_Dt=time(j2+1,i2+1)time(j1+1,i1+1); 268 273 for ilist=1:length(list_param) 269 274 Data.(Civ1_param{4+ilist})=Param.ActionInput.Civ1.(list_param{ilist}); … … 400 405 ImageName_A_Civ2=fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,i1_series_Civ2(ifield),[],j1_series_Civ2(ifield)); 401 406 402 if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2 )407 if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2(ifield)) 403 408 par_civ2.ImageA=par_civ1.ImageA; 404 409 else 405 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A_Civ2 );410 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield)); 406 411 end 407 412 ImageName_B_Civ2=fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,i2_series_Civ2(ifield),[],j2_series_Civ2(ifield)); … … 409 414 par_civ2.ImageB=par_civ1.ImageB; 410 415 else 411 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B_Civ2 );416 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B_Civ2(ifield)); 412 417 end 413 418 414 419 ncfile=fullfile_uvmat(RootPath,OutputDir,RootFile,'.nc',NomTypeNc,i1_series_Civ2(ifield),i2_series_Civ2(ifield),... 415 420 j1_series_Civ2(ifield),j2_series_Civ2(ifield)); 416 par_civ2.ImageWidth=FileInfo .Width;417 par_civ2.ImageHeight=FileInfo .Height;421 par_civ2.ImageWidth=FileInfo_A.Width; 422 par_civ2.ImageHeight=FileInfo_A.Height; 418 423 419 424 if isfield(par_civ2,'Grid')% grid points set as input file … … 935 940 %  determine the list of index pairs of processing file 936 941 function [i1_series,i2_series,j1_series,j2_series,check_bounds,NomTypeNc]=... 937 find_pair_indices(str_civ,i_series,j_series,MinIndex ,MaxIndex)942 find_pair_indices(str_civ,i_series,j_series,MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j) 938 943 % 939 944 i1_series=i_series;% set of first image indexes … … 973 978 i1_series=i_seriesind1;% set of first image numbers 974 979 i2_series=i_series+ind2; 975 check_bounds=i1_series<MinIndex(1,1)  i2_series>MaxIndex(1,1);980 check_bounds=i1_series<MinIndex_i  i2_series>MaxIndex_i; 976 981 if isempty(j_series) 977 982 NomTypeNc='_12'; … … 984 989 j1_series=j_seriesind1; 985 990 j2_series=j_series+ind2; 986 check_bounds=j1_series<MinIndex (1,2)  j2_series>MaxIndex(1,2);991 check_bounds=j1_series<MinIndex_j  j2_series>MaxIndex_j; 987 992 NomTypeNc='_1_12'; 988 993 else %bursts
Note: See TracChangeset
for help on using the changeset viewer.