Changeset 29 for trunk/src/uvmat.m
- Timestamp:
- Mar 3, 2010, 10:48:08 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r17 r29 470 470 %---------------------------------------------------------------- 471 471 function display_file_name(hObject, eventdata, handles,fileinput) 472 if ~exist(fileinput,'file') 473 msgbox_uvmat('ERROR',['input file ' fileinput ' does not exist']) 474 return 475 end 472 476 [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 477 ext_test=''; %default 478 if ~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'; 478 493 i1='1'; % set the frame counter to 1 by default 479 494 i2=''; … … 482 497 NomType='*'; %indicate a set of indexed frames within a single file 483 498 [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 495 502 end 496 503 switch ext_test
Note: See TracChangeset
for help on using the changeset viewer.