Changeset 445 for trunk/src/find_file_series.m
- Timestamp:
- Jun 8, 2012, 4:30:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_file_series.m
r441 r445 52 52 % ifile_min=1;%default 53 53 [FileType,FileInfo,Object]=get_file_type(fullfileinput); 54 NbFrame=1; 55 54 56 switch FileType 55 57 case 'multimage' 56 NomType='*'; 57 i1_series=(1:FileInfo.NbFrame)'; 58 % NomType='*'; 59 % i1_series=(1:FileInfo.NbFrame)'; 60 NbFrame=FileInfo.NbFrame; 58 61 case {'video','mmreader'} 59 62 NomType='*'; 60 i1_series=(1:FileInfo.NumberOfFrames)'; 63 NbFrame=FileInfo.NumberOfFrames; 64 % i1_series=(1:FileInfo.NumberOfFrames)'; 61 65 end 62 66 % if strcmp( FileType,'multimage')||strcmp( FileType,'video')||strcmp( FileType,'mmreader') … … 64 68 % i1_series=(1:FileInfo.NumberOfFrames)'; 65 69 % end 66 70 RootFile_i=''; 71 NomTypePref=''; 67 72 if strcmp(NomType,'')||strcmp(NomType,'*') 68 73 if exist(fullfileinput,'file') … … 77 82 else 78 83 %% possibly include the first index in the root name, if there exists a corresponding xml file 79 NomTypePref='';80 84 r=regexp(NomType,'^(?<tiretnum>_?\d+)','names');%look for a number or _1 at the beginning of NomType 81 85 if ~isempty(r) … … 87 91 end 88 92 if ~isempty(rr) 89 RootFile New=[RootFile rr.i1];90 checkpair=~isempty(regexp(NomType,'-','once'))||~isempty(regexp(NomType,'ab$','once'))||~isempty(regexp(NomType,'AB$','once'));%case of PIV results91 if exist(fullfile(RootPath,SubDir,[RootFile New '.xml']),'file') %|| (checkpair && exist(fullfile(fileparts(RootPath),[RootFileNew'.xml']),'file'))92 RootFile=RootFile New;93 RootFile_i=[RootFile rr.i1]; 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')) 96 RootFile=RootFile_i; 93 97 NomTypePref=r.tiretnum; 94 98 NomType=regexprep(NomType,['^' NomTypePref],''); … … 252 256 if isequal(j2_series,0), j2_series=[]; end 253 257 258 %% introduce the frame index in case of movies or multimage type 259 if NbFrame>1 260 if isempty(i1_series) 261 i1_series=(1:NbFrame)'; 262 i1_input=1; 263 else 264 j1_series=(1:NbFrame)'; 265 j1_input=1; 266 end 267 end 268 254 269 %% sort pairs by decreasing index differences in case of multiple pairs at the same reference index 255 270 if size(i2_series,3)>1 %pairs i1 -i2 … … 280 295 end 281 296 297 % %% deals with frame index in movies 298 % switch FileType 299 % case 'multimage' 300 % NomType='*'; 301 % i1_series=(1:FileInfo.NbFrame)'; 302 % case {'video','mmreader'} 303 % NomType='*'; 304 % i1_series=(1:FileInfo.NumberOfFrames)'; 305 % end 306
Note: See TracChangeset
for help on using the changeset viewer.