Changeset 950 for trunk/src/series/civ_series.m
- Timestamp:
- Jun 11, 2016, 9:32:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r949 r950 283 283 if iview_A~=0 284 284 XmlFileName=find_imadoc(RootPath_A,SubDir_A,RootFile_A,FileExt_A); 285 time=[];285 Time=[]; 286 286 if ~isempty(XmlFileName) 287 287 XmlData=imadoc2struct(XmlFileName); 288 288 if isfield(XmlData,'Time') 289 time=XmlData.Time;289 Time=XmlData.Time; 290 290 TimeSource='xml'; 291 291 end … … 302 302 end 303 303 end 304 if isempty( time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input305 time=zeros(FileInfo_A.NumberOfFrames+1,2);306 time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';304 if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input 305 Time=zeros(FileInfo_A.NumberOfFrames+1,2); 306 Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)'; 307 307 TimeSource='video'; 308 308 ColorType='truecolor'; 309 309 end 310 if isempty( time)% time = index i +0.001 index j by default310 if isempty(Time)% Time = index i +0.001 index j by default 311 311 %MinIndex_i=min(i1_series_Civ1); 312 312 MaxIndex_i=max(i2_series_Civ1); 313 313 %MinIndex_j=min(j1_series_Civ1); 314 314 MaxIndex_j=max(j2_series_Civ1); 315 time=(1:MaxIndex_i)'*ones(1,MaxIndex_j);316 time=time+0.001*ones(MaxIndex_i,1)*(1:MaxIndex_j);317 time=[zeros(1,MaxIndex_j);time];% insert a first line of zeros318 time=[zeros(MaxIndex_i+1,1) time];% insert a first column of zeros315 Time=(1:MaxIndex_i)'*ones(1,MaxIndex_j); 316 Time=Time+0.001*ones(MaxIndex_i,1)*(1:MaxIndex_j); 317 Time=[zeros(1,MaxIndex_j);Time];% insert a first line of zeros 318 Time=[zeros(MaxIndex_i+1,1) Time];% insert a first column of zeros 319 319 end 320 320 … … 438 438 end 439 439 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 440 Data.Civ1_Time= time(i2+1,j2+1);% the time is the time of the secodn image441 Data.Civ1_Dt=1;% time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading440 Data.Civ1_Time=Time(i2+1,j2+1);% the Time is the Time of the secodn image 441 Data.Civ1_Dt=1;% Time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading 442 442 else 443 Data.Civ1_Time=( time(i2+1,j2+1)+time(i1+1,j1+1))/2;% the time is the time at the middle of the image pair444 Data.Civ1_Dt= time(i2+1,j2+1)-time(i1+1,j1+1);443 Data.Civ1_Time=(Time(i2+1,j2+1)+Time(i1+1,j1+1))/2;% the Time is the Time at the middle of the image pair 444 Data.Civ1_Dt=Time(i2+1,j2+1)-Time(i1+1,j1+1); 445 445 end 446 446 for ilist=1:length(list_param) … … 736 736 Civ2_Dt=1; 737 737 else 738 Civ2_Dt= time(i2_civ2+1,j2_civ2+1)-time(i1_civ2+1,j1_civ2+1);738 Civ2_Dt=Time(i2_civ2+1,j2_civ2+1)-Time(i1_civ2+1,j1_civ2+1); 739 739 end 740 740 end … … 761 761 Data.Civ2_ImageB=ImageName_B; 762 762 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 763 Data.Civ2_Time= time(i2_civ2+1,j2_civ2+1);% the time is the time of the secodn image764 Data.Civ2_Dt=1;% time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading763 Data.Civ2_Time=Time(i2_civ2+1,j2_civ2+1);% the Time is the Time of the secodn image 764 Data.Civ2_Dt=1;% Time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading 765 765 else 766 Data.Civ2_Time=( time(i2_civ2+1,j2_civ2+1)+time(i1_civ2+1,j1_civ2+1))/2;766 Data.Civ2_Time=(Time(i2_civ2+1,j2_civ2+1)+Time(i1_civ2+1,j1_civ2+1))/2; 767 767 Data.Civ2_Dt=Civ2_Dt; 768 768 end
Note: See TracChangeset
for help on using the changeset viewer.