Ignore:
Timestamp:
Mar 25, 2013, 6:34:00 PM (8 years ago)
Author:
sommeria
Message:

commit the series fcts with the new form

File:
1 edited

Legend:

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

    r585 r592  
    4949
    5050%% set the input elements needed on the GUI series when the action is selected in the menu ActionName
    51 if ~exist('Param','var') % case with no input parameter
    52     ParamOut={'AllowInputSort';'off';...% allow alphabetic sorting of the list of input files (options 'off'/'on', 'off' by default)
    53         'WholeIndexRange';'off';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
    54         'NbSlice';'on'; ...%nbre of slices ('off' by default)
    55         'VelType';'two';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    56         'FieldName';'two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
    57         'FieldTransform'; 'on';...%can use a transform function
    58         'ProjObject';'on';...%can use projection object(option 'off'/'on',
    59         'Mask';'off';...%can use mask option   (option 'off'/'on', 'off' by default)
    60         'OutputDirExt';'.tseries';...%set the output dir extension
    61                ''};
    62         return
     51if isstruct(Param) && isequal(Param.Action.RUN,0)
     52    ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
     53    ParamOut.WholeIndexRange='off';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     54    ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default)
     55    ParamOut.VelType='two';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     56    ParamOut.FieldName='two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     57    ParamOut.FieldTransform = 'on';...%can use a transform function
     58    ParamOut.ProjObject='on';...%can use projection object(option 'off'/'on',
     59    ParamOut.Mask='off';...%can use mask option   (option 'off'/'on', 'off' by default)
     60    ParamOut.OutputDirExt='.tseries';%set the output dir extension
     61return
    6362end
    6463
    6564%%%%%%%%%%%% STANDARD PART  %%%%%%%%%%%%
    66 %% select different modes,  RUN, parameter input, BATCH
    67 % BATCH  case: read the xml file for batch case
     65%% read input parameters from an xml file if input is a file name (batch mode)
     66checkrun=1;
    6867if ischar(Param)
    69         Param=xml2struct(Param);
    70         checkrun=0;
    71 % RUN case: parameters introduced as the input structure Param
    72 else
    73     hseries=guidata(Param.hseries);%handles of the GUI series
    74     if isfield(Param,'Specific')&& strcmp(Param.Specific,'?')
    75         checkrun=1;% will only search interactive input parameters (preparation of BATCH mode)
    76     else
    77         checkrun=2; % indicate the RUN option is used
    78     end
    79 end
     68    Param=xml2struct(Param);% read Param as input file (batch case)
     69    checkrun=0;
     70end
     71
    8072ParamOut=Param; %default output
    8173OutputDir=[Param.OutputSubDir Param.OutputDirExt];
     
    218210   
    219211    %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
    220     for index=index_slice       
     212    for index=index_slice 
    221213        if checkrun
    222             update_waitbar(hseries.Waitbar,index/(nbfield))
    223             stopstate=get(hseries.RUN,'BusyAction');
     214            stopstate=get(Param.RUNHandle,'BusyAction');
     215            update_waitbar(Param.WaitbarHandle,index/nbfield)
    224216        else
    225217            stopstate='queue';
Note: See TracChangeset for help on using the changeset viewer.