Changeset 395 for trunk


Ignore:
Timestamp:
Apr 24, 2012, 8:46:32 PM (13 years ago)
Author:
sommeria
Message:

taking into account the xml file for PIV pairs. Comments on read_GUI

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r391 r395  
    4444%% get input root name and nomenclature type
    4545[tild,tild,RootFile,tild,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fileinput);
    46 fullfileinput=fullfile(RootPath,fileinput);
     46fullfileinput=fullfile(RootPath,fileinput);% input file name with path
    4747
    4848%% check for particular file types: images, movies, civ data
     
    6060if strcmp(NomType,'')||strcmp(NomType,'*')||strcmp(option,'filetype')
    6161    if exist(fullfileinput,'file')
    62         [tild,RootFile]=fileparts(fileinput);% case of constant name (no indexing)
     62        RootFile=fileinput;% case of constant name (no indexing)
     63       % [tild,RootFile]=fileparts(fileinput);% case of constant name (no indexing)
    6364    else
    6465        RootFile='';
    6566    end
    6667else
    67     %% possibly include the first index in the root name, if there exists a   corresponding xml file
     68    %% possibly include the first index in the root name, if there exists a corresponding xml file
    6869    %   RootFileNew=RootFile;
    6970    %     if ~isempty(regexp(NomType,['^_']))
     
    7677    if ~isempty(r)
    7778        fileinput_end=regexprep(fileinput,['^' RootFile],'');%remove RootFile at the beginning of fileinput
    78         if isempty(regexp(r.tiretnum,'^_'))% if a separator '_' is not  detected
     79        if isempty(regexp(r.tiretnum,'^_','once'))% if a separator '_' is not  detected
    7980            rr=regexp(fileinput_end,'^(?<i1>\d+)','names');
    8081        else% if a separator '_' is  detected
     
    8384        if ~isempty(rr)
    8485            RootFileNew=[RootFile rr.i1];
    85             if exist(fullfile(RootPath,[RootFileNew '.xml']),'file')
     86            checkpair=~isempty(regexp(NomType,'-','once'))||~isempty(regexp(NomType,'ab$','once'))||~isempty(regexp(NomType,'AB$','once'));%case of PIV results
     87            if exist(fullfile(RootPath,[RootFileNew '.xml']),'file') || (checkpair && exist(fullfile(fileparts(RootPath),[RootFileNew '.xml']),'file'))
    8688                RootFile=RootFileNew;
    8789                NomTypePref=r.tiretnum;
     
    9092                j1_input=[];
    9193                j2_input=[];
    92             end
     94            end       
    9395        end
    9496    end
  • trunk/src/read_GUI.m

    r379 r395  
    11% -----------------------------------------------------------------------
    22% --- read a GUI with handle 'handle' producing a structure 'struct'
     3%
     4% The output Matlab structure 'struct' contains the information displayed on
     5% the GUI or a panel with handle 'handle'
     6% The content of a panel with tag 'tag' is displayed as a substructure struct.(tag) (recursive use of read_GUI)
     7% Output of an element with tag 'tag':
     8%     'checkbox','radiobutton','togglebutton': struct.(tag)=value
     9%     'edit': struct.(tag)=string, 
     10%         or, if the tag is in the form by 'num_tag',
     11%         struct.(tag)=str2double(string). If the result is empty the  'UserData' is taken as the default input.
     12%     'listbox','popupmenu': struct.(tag)=selected string, or, if the tag is in the form by 'num_tag', struct.(tag)=str2double(string)
     13%     'table': struct.(tag)=data of the table
     14%
    315function struct=read_GUI(handle)
    416%------------------------------------------------------------------------
     
    5567                        check_input=0;
    5668                end
    57                 if check_input
     69                if check_input%
    5870                    if index==0
    5971                       struct.(tag)=input;
    60                     else
     72                    elseif ~isempty(input)
    6173                       struct.(tag)(index)=input;
    6274                    end
Note: See TracChangeset for help on using the changeset viewer.