Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r467 r468 482 482 if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file 483 483 %[PP,FF,fc,str2,str_a,str_b,ext_ima_read,nom_type_read]=name2display(XmlData.Heading.ImageName); 484 [ tild,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName);484 [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName); 485 485 fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file, 486 486 if ~exist(fullname,'file') … … 488 488 end 489 489 end 490 if isfield(XmlData,'Time') 490 if isfield(XmlData,'Time') && ~isempty(XmlData.Time) 491 491 time=XmlData.Time; 492 492 %transform .Time to a column vector if it is a line vector thenomenclature uses a single index: correct possible bug in xml … … 502 502 TimeUnit=XmlData.TimeUnit; 503 503 end 504 504 505 505 if isfield(XmlData,'GeometryCalib') 506 506 tsai=XmlData.GeometryCalib; 507 if isfield(tsai,'fx_fy') 508 pxcm_search=max(tsai.fx_fy(1),tsai.fx_fy(2));%pixels:cm estimated for the search range 507 if isfield(tsai,'fx_fy') 508 pxcm_search=max(tsai.fx_fy(1),tsai.fx_fy(2));%pixels:cm estimated for the search range 509 509 end 510 510 if isfield(tsai,'CoordUnit') … … 518 518 end 519 519 nom_type_ima='001a'; 520 case {'.avi','.AVI'} 521 nom_type_ima='*'; 522 ImaExt=ext_imadoc; 523 set(handles.ListPairMode,'Value',1); 524 set(handles.ListPairMode,'String',{'series(Di)'}) 525 dt=0.04;%default 526 if exist([RootName ext_imadoc],'file')==2 527 hhh=which('videoreader'); 528 if isempty(hhh)%use old video function of matlab 529 imainfo=aviinfo([RootName ext_imadoc]);%read infos on the avi movie TO REPLACE mmreader 530 dt=1/imainfo.FramesPerSecond;%time interval between successive frames 531 MaxIndex_i=imainfo.NumFrames;%number of frames 532 % XmlData.Time=(0:1/imainfo.FramesPerSecond:(imainfo.NumFrames-1)/imainfo.FramesPerSecond)'; 533 % nbfield=imainfo.NumFrames; 534 % set(handles.Dt_txt,'String',['Dt=' num2str(1000/imainfo.FramesPerSecond) 'ms']);%display the elementary time interval in millisec 535 % ColorType=imainfo.ImageType;%='truecolor' for color images 536 else %use video function videoreader of matlab 537 imainfo=get(videoreader([RootName ext_imadoc]));%read infos on the avi movie 538 dt=1/imainfo.FrameRate;%time interval between successive frames 539 MaxIndex_i=imainfo.NumberOfFrames;%number of frames 540 % XmlData.Time=(0:1/imainfo.FrameRate:(imainfo.NumberOfFrames-1)/imainfo.FrameRate)'; 541 % nbfield=imainfo.NumberOfFrames; 542 % set(handles.Dt_txt,'String',['Dt=' num2str(1000/imainfo.FrameRate) 'ms']);%display the elementary time interval in millisec 543 % ColorType='truecolor'; 544 end 545 546 time=(dt*(0:MaxIndex_i-1))';%list of image times 547 TimeUnit='s'; 548 end 549 set(handles.ImaDoc,'BackgroundColor',[1 1 1])% set display box back to whiter 520 end 521 if isempty(time) && (strcmp(FileType,'video') || strcmp(FileType,'mmreader')) 522 nom_type_ima='*'; 523 %ImaExt=ext_imadoc; 524 set(handles.ListPairMode,'Value',1); 525 set(handles.ListPairMode,'String',{'series(Di)'}) 526 dt=0.04;%default 527 hhh=which('videoreader'); 528 if strcmp(FileType,'mmreader')%use old video function of matlab 529 imainfo=aviinfo(fileinput);%read infos on the avi movie TO REPLACE mmreader 530 dt=1/imainfo.FramesPerSecond;%time interval between successive frames 531 MaxIndex_i=imainfo.NumFrames;%number of frames 532 else %use video function videoreader of matlab 533 imainfo=get(videoreader(fileinput));%read infos on the avi movie 534 dt=1/imainfo.FrameRate;%time interval between successive frames 535 MaxIndex_i=imainfo.NumberOfFrames;%number of frames 536 end 537 time=(dt*(0:MaxIndex_i-1))';%list of image times 538 TimeUnit='s'; 539 set(handles.ImaDoc,'BackgroundColor',[1 1 1])% set display box back to whiter 550 540 end 551 541 end -
trunk/src/find_file_series.m
r456 r468 93 93 RootFile_i=[RootFile rr.i1]; 94 94 % checkpair=~isempty(regexp(NomType,'-','once'))||~isempty(regexp(NomType,'ab$','once'))||~isempty(regexp(NomType,'AB$','once'));%case of PIV results 95 if exist(fullfile(RootPath,SubDir,[RootFile_i '.xml']),'file') %|| (checkpair && exist(fullfile(fileparts(RootPath),[RootFile_i '.xml']),'file'))95 if exist(fullfile(RootPath,SubDir,[RootFile_i '.xml']),'file') || exist(fullfile(RootPath,[RootFile_i '.xml']),'file') 96 96 RootFile=RootFile_i; 97 97 NomTypePref=r.tiretnum; -
trunk/src/series.m
r463 r468 683 683 if ~isempty(time) 684 684 TimeTable=get(handles.TimeTable,'Data'); 685 first_i=str2num(get(handles.num_first_i,'String')); 686 last_i=str2num(get(handles.num_last_i,'String')); 687 first_j=str2num(get(handles.num_first_i,'String')); 688 last_j=str2num(get(handles.num_last_i,'String')); 689 MinIndexTable=get(handles.MinIndex,'Data'); 690 MinIndex_i=MinIndexTable{iview,1}; 691 MinIndex_j=MinIndexTable{iview,2}; 692 MaxIndexTable=get(handles.MaxIndex,'Data'); 693 MaxIndex_i=MaxIndexTable{iview,1}; 694 MaxIndex_j=MaxIndexTable{iview,2}; 685 695 if isempty(MinIndex_j) 686 696 if MinIndex_i>0
Note: See TracChangeset
for help on using the changeset viewer.