Ignore:
Timestamp:
Apr 30, 2018, 8:01:35 PM (3 years ago)
Author:
sommeria
Message:

miscellaneous updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_field.m

    r1032 r1033  
    4747Field=[];
    4848if ~exist('num','var')
     49    num=1;
     50end
     51if isempty(num)
    4952    num=1;
    5053end
     
    272275    case 'image_DaVis'
    273276        Input=readimx(FileName);
     277        if numel(Input.Frames)==1
     278            num=1;
     279        end
    274280        A=Input.Frames{num}.Components{1}.Planes{1}';
    275         %timestamps=double(Input.Attributes{1}.Value(2))/1000000;
    276         timestamps=str2num(Input.Frames{1}.Attributes{12}.Value(1:end-3))/1000000;
     281        for ilist=1:numel(Input.Frames{1}.Attributes)
     282            if strcmp(Input.Frames{1}.Attributes{ilist}.Name,'AcqTimeSeries')
     283        timestamps=str2num(Input.Frames{1}.Attributes{ilist}.Value(1:end-3))/1000000;
     284        break
     285            end
     286        end
    277287    case 'cine_phantom'
    278288        [A,FileInfo] = read_cine_phantom(FileName,num );
Note: See TracChangeset for help on using the changeset viewer.