Ignore:
Timestamp:
Feb 24, 2014, 10:51:40 PM (10 years ago)
Author:
sommeria
Message:

fct improved by reducing the input file check when selected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_series.m

    r711 r716  
    4343addpath(fullfile(path_series,'series'))
    4444%% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed
    45 if isstruct(Param) && isequal(Param.Action.RUN,0)
     45if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN
    4646    Data=civ_input(Param);% introduce the civ parameters using the GUI civ_input
    4747    if isempty(Data)
     
    6060    Data.OutputSubDirMode='last'; %select the last subDir in the input table as root of the output subdir name (option 'all'/'first'/'last', 'all' by default)
    6161    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
    62     filecell=get_file_series(Param);%check existence of the first input file
    63     if ~exist(filecell{1,1},'file')
    64         msgbox_uvmat('WARNING','the first input file does not exist')
     62        % check the existence of the first file in the series
     63    first_j=[];
     64    if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end
     65    last_j=[];
     66    if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end
     67    PairString='';
     68    if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end
     69    [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString);
     70    FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},...
     71        Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2);
     72    if ~exist(FirstFileName,'file')
     73        msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist'])
    6574    else
    66         FileType=get_file_type(filecell{1,1});
     75        FileType=get_file_type(FirstFileName);
    6776        if isempty(find(strcmp(FileType,{'civdata','image','multimage','mmreader','video'})));% =1 for images
    6877            msgbox_uvmat('ERROR',['bad input file type for ' mfilename ': an image or civdata file is needed'])
Note: See TracChangeset for help on using the changeset viewer.