Ignore:
Timestamp:
Dec 6, 2014, 4:40:35 PM (6 years ago)
Author:
sommeria
Message:

civ_input corrected to handle the new fct 'stereo_civ'

File:
1 edited

Legend:

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

    r824 r833  
    285285%% get timing from the ImaDoc file or input video
    286286if iview_A~=0
    287 XmlFileName=find_imadoc(RootPath_A,SubDir_A,RootFile_A,FileExt_A);
    288 time=[];
    289 if ~isempty(XmlFileName)
    290     XmlData=imadoc2struct(XmlFileName);
     287    XmlFileName=find_imadoc(RootPath_A,SubDir_A,RootFile_A,FileExt_A);
     288    time=[];
     289    if ~isempty(XmlFileName)
     290        XmlData=imadoc2struct(XmlFileName);
    291291        if isfield(XmlData,'Time')
    292292            time=XmlData.Time;
     
    304304            end
    305305        end
    306 end
    307 if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input
    308     time=zeros(FileInfo_A.NumberOfFrames+1,2);
    309     time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
    310     TimeSource='video';
    311     ColorType='truecolor';
    312 end
    313 if isempty(time)% time = index i +0.001 index j by default
    314     %MinIndex_i=min(i1_series_Civ1);
    315     MaxIndex_i=max(i2_series_Civ1);
    316     %MinIndex_j=min(j1_series_Civ1);
    317     MaxIndex_j=max(j2_series_Civ1);
    318     time=(1:MaxIndex_i)'*ones(1,MaxIndex_j);
    319     time=time+0.001*ones(MaxIndex_i,1)*(1:MaxIndex_j);
    320     time=[zeros(1,MaxIndex_j);time];% insert a first line of zeros
    321     time=[zeros(MaxIndex_i+1,1) time];% insert a first column of zeros
    322 end
     306    end
     307    if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input
     308        time=zeros(FileInfo_A.NumberOfFrames+1,2);
     309        time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
     310        TimeSource='video';
     311        ColorType='truecolor';
     312    end
     313    if isempty(time)% time = index i +0.001 index j by default
     314        %MinIndex_i=min(i1_series_Civ1);
     315        MaxIndex_i=max(i2_series_Civ1);
     316        %MinIndex_j=min(j1_series_Civ1);
     317        MaxIndex_j=max(j2_series_Civ1);
     318        time=(1:MaxIndex_i)'*ones(1,MaxIndex_j);
     319        time=time+0.001*ones(MaxIndex_i,1)*(1:MaxIndex_j);
     320        time=[zeros(1,MaxIndex_j);time];% insert a first line of zeros
     321        time=[zeros(MaxIndex_i+1,1) time];% insert a first column of zeros
     322    end
    323323   
    324 if length(FileInfo_A) >1 %case of image with multiple frames
    325     nbfield=length(FileInfo_A);
    326     nbfield_j=1;
    327 end
     324    if length(FileInfo_A) >1 %case of image with multiple frames
     325        nbfield=length(FileInfo_A);
     326        nbfield_j=1;
     327    end
    328328end
    329329
Note: See TracChangeset for help on using the changeset viewer.