Changeset 29 for trunk/src/uvmat.m


Ignore:
Timestamp:
Mar 3, 2010, 10:48:08 AM (14 years ago)
Author:
sommeria
Message:

read_imadoc suppressed (obsolete, replaced by imadoc2struct)
update_imadoc: bug repaired: existing xml file was erased
various cleaning (deals with non existing input file for series and uvmat)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r17 r29  
    470470%----------------------------------------------------------------
    471471function display_file_name(hObject, eventdata, handles,fileinput)
     472if ~exist(fileinput,'file')
     473    msgbox_uvmat('ERROR',['input file ' fileinput  ' does not exist'])
     474    return
     475end
    472476[RootPath,RootFile,i1,i2,str_a,str_b,ext,NomType,SubDir]=name2display(fileinput);
    473 form=imformats(ext(2:end));%test valid Matlab image formats
    474 if ~isempty(form)
    475     ext_test='.image';
    476     imainfo=imfinfo(fileinput); 
    477     if length(imainfo) >1 %case of image with multiple frames
     477ext_test=''; %default
     478if ~isempty(ext)
     479    form=imformats(ext(2:end));%test valid Matlab image formats
     480    if ~isempty(form)
     481        ext_test='.image';
     482        imainfo=imfinfo(fileinput); 
     483        if length(imainfo) >1 %case of image with multiple frames
     484            i1='1'; % set the frame counter to 1 by default
     485            i2='';
     486            str_a='';
     487            str_b='';
     488            NomType='*'; %indicate a set of indexed frames within a single file
     489            [RootPath,RootFile]=fileparts(fileinput); %include the indices in the root file
     490        end
     491    elseif isequal(lower(ext),'.avi')
     492        ext_test='.image';
    478493        i1='1'; % set the frame counter to 1 by default
    479494        i2='';
     
    482497        NomType='*'; %indicate a set of indexed frames within a single file
    483498        [RootPath,RootFile]=fileparts(fileinput); %include the indices in the root file
    484     end
    485 elseif isequal(lower(ext),'.avi')
    486     ext_test='.image';
    487     i1='1'; % set the frame counter to 1 by default
    488     i2='';
    489     str_a='';
    490     str_b='';
    491     NomType='*'; %indicate a set of indexed frames within a single file
    492     [RootPath,RootFile]=fileparts(fileinput); %include the indices in the root file
    493 else
    494     ext_test=lower(ext);
     499    else
     500        ext_test=lower(ext);
     501    end
    495502end
    496503switch ext_test
Note: See TracChangeset for help on using the changeset viewer.