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/aver_stat.m

    r585 r592  
    4848
    4949%% set the input elements needed on the GUI series when the action is selected in the menu ActionName
    50 if ~exist('Param','var') % case with no input parameter
    51     ParamOut={'AllowInputSort';'off';...% allow alphabetic sorting of the list of input files (options 'off'/'on', 'off' by default)
    52         'WholeIndexRange';'off';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
    53         'NbSlice';'on'; ...%nbre of slices ('off' by default)
    54         'VelType';'two';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    55         'FieldName';'two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
    56         'FieldTransform'; 'on';...%can use a transform function
    57         'ProjObject';'on';...%can use projection object(option 'off'/'on',
    58         'Mask';'off';...%can use mask option   (option 'off'/'on', 'off' by default)
    59         'OutputDirExt';'.stat';...%set the output dir extension
    60                ''};
    61         return
     50if isstruct(Param) && isequal(Param.Action.RUN,0)
     51    ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
     52    ParamOut.WholeIndexRange='off';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     53    ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default)
     54    ParamOut.VelType='two';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     55    ParamOut.FieldName='two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     56    ParamOut.FieldTransform = 'on';...%can use a transform function
     57    ParamOut.ProjObject='on';...%can use projection object(option 'off'/'on',
     58    ParamOut.Mask='off';...%can use mask option   (option 'off'/'on', 'off' by default)
     59    ParamOut.OutputDirExt='.stat';%set the output dir extension
     60return
    6261end
    6362
    6463%%%%%%%%%%%%  STANDARD PART  %%%%%%%%%%%%
    65 %% select different modes,  RUN, parameter input, BATCH
    66 % BATCH  case: read the xml file for batch case
     64%% read input parameters from an xml file if input is a file name (batch mode)
     65checkrun=1;
    6766if ischar(Param)
    68         Param=xml2struct(Param);
    69         checkrun=0;
    70 % RUN case: parameters introduced as the input structure Param
    71 else
    72     if isfield(Param,'Specific')&& strcmp(Param.Specific,'?')
    73         checkrun=1;% will only search interactive input parameters (preparation of BATCH mode)
    74     else
    75         checkrun=2; % indicate the RUN option is used
    76     end
    77     hseries=guidata(Param.hseries);%handles of the GUI series
    78 end
     67    Param=xml2struct(Param);% read Param as input file (batch case)
     68    checkrun=0;
     69end
     70
     71
    7972ParamOut=Param; %default output
    8073OutputDir=[Param.OutputSubDir Param.OutputDirExt];
     
    158151end
    159152NomTypeOut='_1-2_1';% output file index will indicate the first and last ref index in the series
    160 if checkrun==1
    161     return % stop here for input checks
    162 end
     153
    163154
    164155%% Set field names and velocity types
     
    188179    %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
    189180    for index=index_slice
    190         if checkrun
    191             update_waitbar(hseries.Waitbar,index/(nbfield))
    192             stopstate=get(hseries.RUN,'BusyAction');
    193         else
    194             stopstate='queue';
    195         end
     181          if checkrun
     182                stopstate=get(Param.RUNHandle,'BusyAction');
     183                update_waitbar(Param.WaitbarHandle,index/nbfield)
     184          else
     185                stopstate='queue';
     186          end
    196187        if isequal(stopstate,'queue')% enable STOP command
    197188           
     
    240231           
    241232            %% calculate tps coefficients if needed
    242             if isfield(Param.ProjObject,'ProjMode')&& strcmp(Param.ProjObject.ProjMode,'interp_tps')
     233            if isfield(Param,'ProjObject')&&isfield(Param.ProjObject,'ProjMode')&& strcmp(Param.ProjObject.ProjMode,'interp_tps')
    243234                Field=tps_coeff_field(Field,check_proj_tps);
    244235            end
Note: See TracChangeset for help on using the changeset viewer.