Ignore:
Timestamp:
Apr 30, 2018, 8:01:35 PM (3 years ago)
Author:
sommeria
Message:

miscellaneous updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r1027 r1033  
    4848%------------------------------------------------------------------------
    4949
    50 %% get input root name and nomenclature type
     50%% get input root name and info on the input file
    5151if isempty(regexp(FilePath,'^http://'))
    5252fullfileinput=fullfile(FilePath,fileinput);% input file name with path
     
    153153            end
    154154        end
    155  
     155       
    156156        detect_string=['^' RootFile sep1 i1_str i2_str sep2 j1_str j2_str FileExt '$'];%string used in regexp to detect file indices
    157 %         if isempty(regexp(FilePath,'^http://'))
    158         %find the string used to extract the relevant files with the command dir
    159 %         star_string=[RootFile sep1 i1_star i2_star sep2 j1_star j2_star FileExt];
    160 %         wd=pwd;%current working directory
    161 %         cd (FilePath)% move to the local dir to save time in the operation dir.
    162 %         dirpair=dir(star_string);% look for relevant files in the file directory
    163 %         cd(wd)
    164 %         else
    165             ListStruct=dir_uvmat(FilePath);
    166             ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
    167             ListFiles=ListCells(1,:);%list of file names
    168             rr=regexp(ListFiles,detect_string,'names');
    169 %         end
    170 %         nbpair=numel(dirpair);
     157        ListStruct=dir_uvmat(FilePath);% scan the content of the folder FilePath
     158        ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
     159        ListFiles=ListCells(1,:);%list of file names
     160        rr=regexp(ListFiles,detect_string,'names');
    171161        nbpair=numel(rr);
    172162        ref_i_list=zeros(1,nbpair);
     
    177167        % scan the list of relevant files, extract the indices
    178168        for ifile=1:nbpair
    179 %             rr=regexp(dirpair(ifile).name,detect_string,'names');
     169            %             rr=regexp(dirpair(ifile).name,detect_string,'names');
    180170            if ~isempty(rr{ifile})
    181171                i1=str2num(rr{ifile}.i1);
     
    274264        NomType='*';
    275265        i2_series=[];j1_series=[];j2_series=[];
    276 %         i1_input=1;i2_input=[];j1_input=[];j2_input=[];
     266        %         i1_input=1;i2_input=[];j1_input=[];j2_input=[];
    277267        if ~exist(fullfileinput,'file')
    278268            RootFile='';
     
    281271    end
    282272end
    283 % %% detect rdvision format
    284 % if strcmp(FileExt,'.bin')
    285 %     if exist(fullfile(RootPath,SubDir,[RootFile '.seq']),'file')
    286 %         FileInfo.FileType='rdvision';
    287 %         FileInfo.SeqFile=[RootFile '.seq'];
    288 %     end
    289 % end
    290273
    291274%% introduce the frame index in case of movies or multimage type
Note: See TracChangeset for help on using the changeset viewer.