- Timestamp:
- Sep 29, 2017, 4:31:36 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_file_series.m
r1009 r1011 53 53 54 54 %% check for particular file types: images, movies, civ data 55 if isfield(FileInfo,'FileIndexing') && strcmp(FileInfo.FileIndexing,'on')55 %if isfield(FileInfo,'FileIndexing') && strcmp(FileInfo.FileIndexing,'on') 56 56 [RootPath,SubDir,RootFile,i1_input,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fullfileinput); 57 57 % if ~isempty(regexp(SubDir,'^level\d+$')) && exist([RootPath '.xml'],'file') … … 63 63 j2_series=zeros(1,1,1); 64 64 checkfileindexing=1; 65 else % no file indexing66 [PathDir,RootFile]=fileparts(fullfileinput);67 [RootPath,SubDir,DirExt]=fileparts(PathDir);68 SubDir=[SubDir DirExt];% include part after . in the name (considered as a file extension)69 NomType='*';70 i1_series=[];i2_series=[];j1_series=[];j2_series=[];71 i1_input=1;i2_input=[];j1_input=[];j2_input=[];72 if exist(fullfileinput,'file')~=273 RootFile='';74 return75 end76 checkfileindexing=0;77 end65 %else % no file indexing 66 % [PathDir,RootFile]=fileparts(fullfileinput); 67 % [RootPath,SubDir,DirExt]=fileparts(PathDir); 68 % SubDir=[SubDir DirExt];% include part after . in the name (considered as a file extension) 69 % NomType='*'; 70 % i1_series=[];i2_series=[];j1_series=[];j2_series=[]; 71 % i1_input=1;i2_input=[];j1_input=[];j2_input=[]; 72 % if exist(fullfileinput,'file')~=2 73 % RootFile=''; 74 % return 75 % end 76 % checkfileindexing=0; 77 %end 78 78 if ~exist(FilePath,'dir') 79 79 return % don't go further if the dir path does not exist … … 173 173 end 174 174 end 175 % if strcmp(NomType,'level') 176 % star_string=[RootFile '*' FileExt]; 177 % detect_string=['^' RootFile '(?<i1>\d+)' FileExt '$'];%string used in regexp to detect file indices 178 % wd=pwd;%current working directory 179 % cd (FilePath)% move to the local dir to save time in the operation dir. 180 % dirpair=dir(star_string);% look for relevant files in the file directory 181 % cd(wd)% back to the working directory 182 % nbpair=numel(dirpair); 183 % i1_series=zeros(1,nbpair); 184 % if nbpair==0% no detected file 185 % RootFile=''; 186 % end 187 % % scan the list of relevant files, extract the indices 188 % for ifile=1:nbpair 189 % rr=regexp(dirpair(ifile).name,detect_string,'names'); 190 % if ~isempty(rr) 191 % i1_series(ifile)=str2num(rr.i1); 192 % end 193 % end 194 % % look for the list of subfolders level# 195 % cd (RootPath)% move to the local dir to save time in the operation dir. 196 % dirpair=dir('level*');% look for relevant subfolders named with leve# 197 % cd(wd) 198 % [RootPath,SubDir]=fileparts(RootPath); 199 % nbpair=numel(dirpair); 200 % jfile=0; 201 % for ifile=1:nbpair 202 % rr=regexp(dirpair(ifile).name,'^level(?<i1>\d+)$','names'); 203 % if ~isempty(rr) 204 % jfile=jfile+1; 205 % j1_series(jfile)=str2num(rr.i1); 206 % end 207 % end 208 % [j1_series,i1_series]=meshgrid(j1_series,i1_series); 209 % else 175 210 176 detect_string=['^' RootFile sep1 i1_str i2_str sep2 j1_str j2_str FileExt '$'];%string used in regexp to detect file indices 211 177 %find the string used to extract the relevant files with the command dir -
trunk/src/geometry_calib.m
r1009 r1011 378 378 SubDirBase=regexprep(OutPut.DataSeries{1},'\..+$',''); 379 379 XmlName=fullfile(OutPut.Campaign,OutPut.Experiment{ilist},[SubDirBase '.xml']); 380 dispmessage=' created with calibration parameters'; 380 381 % copy the xml file from the old location if appropriate, then update with the calibration parameters 381 382 if ~exist(XmlName,'file') && ~isempty(SubDirBase) … … 383 384 if exist(oldxml,'file') 384 385 [success,message]=copyfile(oldxml,XmlName);%copy the old xml file to a new one with the new convention 386 dispmessage=' updated with calibration parameters'; 385 387 end 386 388 end … … 389 391 msgbox_uvmat('ERROR',errormsg); 390 392 else 391 display([XmlName ' updated with calibration parameters'])393 display([XmlName dispmessage]) 392 394 nbcalib=nbcalib+1; 393 395 end -
trunk/src/series.m
r1010 r1011 642 642 RootFile=''; 643 643 else %scan the input folder 644 InputTable{iview,3} (1)=[];644 InputTable{iview,3}=regexprep(InputTable{iview,3},'^/',''); 645 645 [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=... 646 646 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]); … … 3612 3612 ListViewLines=find(cellfun('isempty',PairString)==0); % find list of non empty pairs 3613 3613 ListViewMenu=cell(numel(ListViewLines),1); 3614 iview=get(handles.PairString,'Value'); 3614 %iview=get(handles.PairString,'Value'); 3615 iview=[]; 3615 3616 for ilist=1:numel(ListViewLines) 3616 3617 ListViewMenu{ilist}=num2str(ListViewLines(ilist));
Note: See TracChangeset
for help on using the changeset viewer.