Changeset 1164 for trunk/src/find_file_series.m
- Timestamp:
- Jul 29, 2024, 9:43:17 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_file_series.m
r1127 r1164 49 49 50 50 %% get input root name and info on the input file 51 if isempty(regexp(FilePath,'^http://','once')) 51 if isempty(regexp(FilePath,'^http://','once'))% case of usual file input 52 52 fullfileinput=fullfile(FilePath,fileinput);% input file name with path 53 53 else 54 fullfileinput=[FilePath '/' fileinput]; 54 fullfileinput=[FilePath '/' fileinput]; % case of web input 55 55 end 56 56 [FileInfo,MovieObject]=get_file_info(fullfileinput); … … 105 105 sep2=''; 106 106 i1_str='(?<i1>)';%will set i1=[]; 107 i1_star='';108 107 i2_str='(?<i2>)';%will set i2=[]; 109 i2_star='';110 108 j1_str='(?<j1>)';%will set j1=[]; 111 j1_star='';112 109 j2_str='(?<j2>)';%will set j2=[]; 113 j2_star=''; 110 114 111 %Look for cases with letter indexing for the second index 115 112 r=regexp(NomType,'^(?<sep1>_?)(?<i1>\d+)(?<sep2>_?)(?<j1>[a|A])(?<j2>[b|B]?)$','names'); … … 118 115 sep2=r.sep2; 119 116 i1_str='(?<i1>\d+)'; 120 i1_star='*';121 117 if strcmp(lower(r.j1),r.j1)% lower case index 122 118 j1_str='(?<j1>[a-z])'; … … 124 120 j1_str='(?<j1>[A-Z])'; % upper case index 125 121 end 126 j1_star='*';127 122 if ~isempty(r.j2) 128 123 if strcmp(lower(r.j1),r.j1) … … 131 126 j2_str='(?<j2>[A-Z])'; 132 127 end 133 j2_star='*';134 128 end 135 129 else %numerical indexing … … 138 132 sep1=r.sep1; 139 133 i1_str='(?<i1>\d+)'; 140 i1_star='*';141 134 if ~isempty(r.i2) 142 135 i2_str='(?<i2>-\d+)'; 143 i2_star='-*';144 136 end 145 137 if ~isempty(r.j1) 146 138 j1_str='(?<j1>_\d+)'; 147 j1_star='_*';148 139 end 149 140 if ~isempty(r.j2) 150 141 j2_str='(?<j2>-\d+)'; 151 j2_star='-*';152 142 end 153 143 end … … 290 280 i1_series=i1_series(:,2)*ones(1,FileInfo.NumberOfFrames);% 291 281 i1_series=[zeros(size(i1_series,1),1) i1_series]; 282 if ~isempty(i2_series) 283 i2_series=i2_series(:,2)*ones(1,FileInfo.NumberOfFrames);% 284 i2_series=[zeros(size(i2_series,1),1) i2_series]; 285 end 292 286 j1_series=ones(size(i1_series,1),1)*(1:FileInfo.NumberOfFrames);% 293 287 j1_series=[zeros(size(i1_series,1),1) j1_series];
Note: See TracChangeset
for help on using the changeset viewer.