Ignore:
Timestamp:
Mar 11, 2012, 11:47:21 AM (12 years ago)
Author:
sommeria
Message:

pb with masks corrected
bug in fileparts_uvmat corrected
find_file_series corrected so that it finds the root name corresponding tothe existing xml file : for instance Dalsa1_0001 gives root=Dalsa1 instead of Dalsa
bug corrected in uvmat, runpm (j1 and j2 set to 1 when not visible)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r379 r384  
    6363        RootFile='';
    6464    end
    65 else   
     65else
     66    %% possibly include the first index in the root name, if there exists a   corresponding xml file   
     67    NomTypePref='';
     68    RootFileNew=RootFile;
     69    if ~isempty(regexp(NomType,['^_']))
     70        NomTypePref='_';
     71        RootFileNew=[RootFileNew '_'];
     72    end
     73    r=regexp(NomType,['^' NomTypePref '(?<num1>\d+)'],'names');%look for a number at the beginning of NomTypeSt
     74    if ~isempty(r)
     75        NomTypePref=[NomTypePref r.num1];
     76        fileinput_end=regexprep(fileinput,['^' RootFileNew],'');
     77        r=regexp(fileinput_end,'^(?<num1>\d+)','names');
     78        if ~isempty(r)           
     79            RootFileNew=[RootFileNew r.num1];
     80        end
     81        if exist(fullfile(RootPath,[RootFileNew '.xml']),'file')
     82            RootFile=RootFileNew;
     83            NomType=regexprep(NomType,['^' NomTypePref],'');
     84            i2_input=j2_input;
     85            j1_input=[];
     86            j2_input=[];
     87        end
     88    end
    6689    %% analyse the list of existing files when relevant
    6790    sep1='';
     
    205228    else
    206229        [tild,tild,tild,tild,tild,tild,tild,tild,NomType]=fileparts_uvmat(dirpair(ifile_min).name);% update the representation of indices (number of 0 before the number)
     230        NomType=regexprep(NomType,['^' NomTypePref],'');
    207231    end
    208232end
Note: See TracChangeset for help on using the changeset viewer.