Ignore:
Timestamp:
Jun 7, 2014, 6:17:53 PM (10 years ago)
Author:
sommeria
Message:

adpat uvmat to reading data from rdvision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_file_type.m

    r783 r784  
    1 %'get_file_type': determine info about a file (image, multimage, civdata,...) .
     1%'get_file_type': OBSOLETE, replaced by get_file_info
    22%------------------------------------------------------------------------
    33% [FileType,FileInfo,Object]=get_file_type(fileinput)
    44%
    55% OUTPUT:
    6 % FileType: type of file
    76% FileInfo: structure containing info on the file (case of images or video), in particular
     7%      .FileType: type of file, needed as input of read_field.m
    88%      .Height: image height in pixels
    99%      .Width:  image width in pixels
     
    1616% INPUT:
    1717% fileinput: name, including path, of the file to analyse
    18 function [FileInfo,VideoObject]=get_file_type(fileinput)
     18function [FileType,FileInfo,VideoObject]=get_file_type(fileinput)
    1919VideoObject=[];
    2020if exist(fileinput,'file')
     
    2323else
    2424    FileInfo.FileType='';
     25    FileType=FileInfo.FileType;
    2526    return
    2627end
     
    3031    case '.fig'
    3132        FileInfo.FileType='figure';
    32     case '.xml'
    33         FileInfo.FileType='xml';
    34     case '.xls'
    35         FileInfo.FileType='xls';
    36     case '.dat'
    37         FileInfo.FileType='dat';;
     33    case {'.xml','.xls','.dat','.bin'}
     34        FileInfo.FileType=regexprep(FileExt,'^.','');% eliminate the dot of the extension;
    3835    otherwise
    3936        if ~isempty(FileExt)% exclude empty extension
     
    109106        end
    110107end
     108FileType=FileInfo.FileType;
Note: See TracChangeset for help on using the changeset viewer.