Changeset 395 for trunk/src/find_file_series.m
- Timestamp:
- Apr 24, 2012, 8:46:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_file_series.m
r391 r395 44 44 %% get input root name and nomenclature type 45 45 [tild,tild,RootFile,tild,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fileinput); 46 fullfileinput=fullfile(RootPath,fileinput); 46 fullfileinput=fullfile(RootPath,fileinput);% input file name with path 47 47 48 48 %% check for particular file types: images, movies, civ data … … 60 60 if strcmp(NomType,'')||strcmp(NomType,'*')||strcmp(option,'filetype') 61 61 if exist(fullfileinput,'file') 62 [tild,RootFile]=fileparts(fileinput);% case of constant name (no indexing) 62 RootFile=fileinput;% case of constant name (no indexing) 63 % [tild,RootFile]=fileparts(fileinput);% case of constant name (no indexing) 63 64 else 64 65 RootFile=''; 65 66 end 66 67 else 67 %% possibly include the first index in the root name, if there exists a 68 %% possibly include the first index in the root name, if there exists a corresponding xml file 68 69 % RootFileNew=RootFile; 69 70 % if ~isempty(regexp(NomType,['^_'])) … … 76 77 if ~isempty(r) 77 78 fileinput_end=regexprep(fileinput,['^' RootFile],'');%remove RootFile at the beginning of fileinput 78 if isempty(regexp(r.tiretnum,'^_' ))% if a separator '_' is not detected79 if isempty(regexp(r.tiretnum,'^_','once'))% if a separator '_' is not detected 79 80 rr=regexp(fileinput_end,'^(?<i1>\d+)','names'); 80 81 else% if a separator '_' is detected … … 83 84 if ~isempty(rr) 84 85 RootFileNew=[RootFile rr.i1]; 85 if exist(fullfile(RootPath,[RootFileNew '.xml']),'file') 86 checkpair=~isempty(regexp(NomType,'-','once'))||~isempty(regexp(NomType,'ab$','once'))||~isempty(regexp(NomType,'AB$','once'));%case of PIV results 87 if exist(fullfile(RootPath,[RootFileNew '.xml']),'file') || (checkpair && exist(fullfile(fileparts(RootPath),[RootFileNew '.xml']),'file')) 86 88 RootFile=RootFileNew; 87 89 NomTypePref=r.tiretnum; … … 90 92 j1_input=[]; 91 93 j2_input=[]; 92 end 94 end 93 95 end 94 96 end
Note: See TracChangeset
for help on using the changeset viewer.