Ignore:
Timestamp:
Jun 11, 2016, 9:32:29 PM (8 years ago)
Author:
sommeria
Message:

various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_series.m

    r949 r950  
    283283if iview_A~=0
    284284    XmlFileName=find_imadoc(RootPath_A,SubDir_A,RootFile_A,FileExt_A);
    285     time=[];
     285    Time=[];
    286286    if ~isempty(XmlFileName)
    287287        XmlData=imadoc2struct(XmlFileName);
    288288        if isfield(XmlData,'Time')
    289             time=XmlData.Time;
     289            Time=XmlData.Time;
    290290            TimeSource='xml';
    291291        end
     
    302302        end
    303303    end
    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)';
     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)';
    307307        TimeSource='video';
    308308        ColorType='truecolor';
    309309    end
    310     if isempty(time)% time = index i +0.001 index j by default
     310    if isempty(Time)% Time = index i +0.001 index j by default
    311311        %MinIndex_i=min(i1_series_Civ1);
    312312        MaxIndex_i=max(i2_series_Civ1);
    313313        %MinIndex_j=min(j1_series_Civ1);
    314314        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 zeros
    318         time=[zeros(MaxIndex_i+1,1) time];% insert a first column of zeros
     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 zeros
     318        Time=[zeros(MaxIndex_i+1,1) Time];% insert a first column of zeros
    319319    end
    320320   
     
    438438            end
    439439            if strcmp(Param.ActionInput.ListCompareMode,'displacement')
    440                 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
     440                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
    442442            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 pair
    444             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);
    445445            end
    446446            for ilist=1:length(list_param)
     
    736736                Civ2_Dt=1;
    737737            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);
    739739            end
    740740        end
     
    761761            Data.Civ2_ImageB=ImageName_B;
    762762             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 image
    764                 Data.Civ2_Dt=1;% time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading
     763                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
    765765             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;
    767767            Data.Civ2_Dt=Civ2_Dt;
    768768             end
Note: See TracChangeset for help on using the changeset viewer.