Changeset 1011 for trunk/src


Ignore:
Timestamp:
Sep 29, 2017, 4:31:36 PM (4 years ago)
Author:
sommeria
Message:

series REFRESH improved

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r1009 r1011  
    5353
    5454%% 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')
    5656    [RootPath,SubDir,RootFile,i1_input,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fullfileinput);
    5757    %     if ~isempty(regexp(SubDir,'^level\d+$')) && exist([RootPath '.xml'],'file')
     
    6363    j2_series=zeros(1,1,1);
    6464    checkfileindexing=1;
    65 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
     65%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
    7878if ~exist(FilePath,'dir')
    7979    return % don't go further if the dir path does not exist
     
    173173            end
    174174        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 
    210176        detect_string=['^' RootFile sep1 i1_str i2_str sep2 j1_str j2_str FileExt '$'];%string used in regexp to detect file indices
    211177        %find the string used to extract the relevant files with the command dir
  • trunk/src/geometry_calib.m

    r1009 r1011  
    378378    SubDirBase=regexprep(OutPut.DataSeries{1},'\..+$','');
    379379    XmlName=fullfile(OutPut.Campaign,OutPut.Experiment{ilist},[SubDirBase '.xml']);
     380    dispmessage=' created with calibration parameters';
    380381    % copy the xml file from the old location if appropriate, then update with the calibration parameters
    381382    if ~exist(XmlName,'file') && ~isempty(SubDirBase)
     
    383384        if exist(oldxml,'file')
    384385            [success,message]=copyfile(oldxml,XmlName);%copy the old xml file to a new one with the new convention
     386            dispmessage=' updated with calibration parameters';
    385387        end
    386388    end
     
    389391        msgbox_uvmat('ERROR',errormsg);
    390392    else
    391         display([XmlName ' updated with calibration parameters'])
     393        display([XmlName dispmessage])
    392394        nbcalib=nbcalib+1;
    393395    end
  • trunk/src/series.m

    r1010 r1011  
    642642        RootFile='';
    643643    else %scan the input folder
    644         InputTable{iview,3}(1)=[];
     644        InputTable{iview,3}=regexprep(InputTable{iview,3},'^/','');
    645645            [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=...
    646646                find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]);
     
    36123612ListViewLines=find(cellfun('isempty',PairString)==0); % find list of non empty pairs
    36133613ListViewMenu=cell(numel(ListViewLines),1);
    3614 iview=get(handles.PairString,'Value');
     3614%iview=get(handles.PairString,'Value');
     3615iview=[];
    36153616for ilist=1:numel(ListViewLines)
    36163617    ListViewMenu{ilist}=num2str(ListViewLines(ilist));
Note: See TracChangeset for help on using the changeset viewer.