Ignore:
Timestamp:
Apr 19, 2024, 8:21:23 PM (3 months ago)
Author:
sommeria
Message:

adapted to reading hdf5 data from fluidimage, extract_rdvision improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_file_info.m

    r1127 r1134  
    6262end
    6363% check the existence (not possible for OpenDAP data)
    64 if ~isempty(regexp(fileinput,'^http://'))|| exist(fileinput,'file')
     64if ~isempty(regexp(fileinput,'^http://','once'))|| exist(fileinput,'file')
    6565    FileInfo.FileName=fileinput;
    6666    FileInfo.FileType='txt'; %default
    67 % else
    68 %     return %input file does not exist.
     67 else
     68     return %input file does not exist.
    6969end
    7070[tild,tild,FileExt]=fileparts(fileinput);%get the file extension FileExt
     
    101101        end
    102102    case '.h5'
    103         hinfo=hdf5info(fileinput);
    104         if strcmp(hinfo.GroupHierarchy.Attributes(1).Value.Data,'MultipassPIVResults')
     103        hinfo=h5info(fileinput);
     104        FileInfo.CivStage=0;
     105        for igroup=1:numel(hinfo.Groups)
     106            if strcmp(hinfo.Groups(igroup).Name,'/piv0')
     107                FileInfo.CivStage=3;
     108            end
     109            if strcmp(hinfo.Groups(igroup).Name,'/piv1')
     110                FileInfo.CivStage=6;
     111                break
     112            end
     113        end
     114        if FileInfo.CivStage~=0
    105115            FileInfo.FileType='pivdata_fluidimage';
    106             FileInfo.CivStage=6; % A MODIFIER
     116        else
     117            FileInfo.FileType='h5';
    107118        end
    108119    case '.cine'
Note: See TracChangeset for help on using the changeset viewer.