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

commit the series fcts with the new form

File:
1 edited

Legend:

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

    r590 r592  
    4040%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    4141 
    42 function GUI_input=ima_levels (Param)
     42function ParamOut=ima_levels (Param)
    4343
    4444%% set the input elements needed on the GUI series when the action is selected in the menu ActionName
    45 if ~exist('Param','var') % case with no input parameter
    46     GUI_input={'NbViewMax';1;...% max nbre of input file series (default='' , no limitation)
    47         'AllowInputSort';'off';...% allow alphabetic sorting of the list of input files (options 'off'/'on', 'off' by default)
    48         'NbSlice';'off'; ...%nbre of slices ('off' by default)
    49         'VelType';'off';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    50         'FieldName';'off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
    51         'FieldTransform'; 'off';...%can use a transform function
    52         'ProjObject';'off';...%can use projection object(option 'off'/'on',
    53         'Mask';'off';...%can use mask option   (option 'off'/'on', 'off' by default)
    54         'OutputDirExt';'.lev';...%set the output dir extension
    55                ''};
    56         return
     45if isstruct(Param) && isequal(Param.Action.RUN,0)
     46    ParamOut.NbViewMax=1;% max nbre of input file series (default='' , no limitation)
     47    ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
     48    ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     49    ParamOut.NbSlice='off'; %nbre of slices ('off' by default)
     50    ParamOut.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default)
     51    ParamOut.FieldName='one';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     52    ParamOut.FieldTransform = 'off';%can use a transform function
     53    ParamOut.ProjObject='off';%can use projection object(option 'off'/'on',
     54    ParamOut.Mask='off';%can use mask option   (option 'off'/'on', 'off' by default)
     55    ParamOut.OutputDirExt='.lev';%set the output dir extension
     56return
    5757end
    5858
    5959%%%%%%%%%%%% STANDARD PART (DO NOT EDIT) %%%%%%%%%%%%
    60 %% select different modes,  RUN, parameter input, BATCH
    61 % BATCH  case: read the xml file for batch case
     60%% read input parameters from an xml file if input is a file name (batch mode)
     61checkrun=1;
    6262if ischar(Param)
    63     if strcmp(Param,'input?')
    64         checkrun=1;% will inly search input parameters (preparation of BATCH mode)
    65     else
    66         Param=xml2struct(Param);
    67         checkrun=0;
    68     end
    69 % RUN case: parameters introduced as the input structure Param
    70 else
    71     hseries=guidata(Param.hseries);%handles of the GUI series
    72     checkrun=2; % indicate the RUN option is used
    73 end
     63    Param=xml2struct(Param);% read Param as input file (batch case)
     64    checkrun=0;
     65end
     66
     67ParamOut=Param; %default output
     68if ~isfield(Param,'InputFields')
     69    Param.InputFields.FieldName='';
     70end
     71OutputSubDir=[Param.OutputSubDir Param.OutputDirExt];% subdirectory for output files
    7472
    7573%% root input file(s) and type
     
    154152j1=[];%default
    155153for ifile=1:nbfield
    156     if checkrun
    157         update_waitbar(hseries.Waitbar,ifile/nbfield)
    158         stopstate=get(hseries.RUN,'BusyAction');
    159     else
    160         stopstate='queue';
    161     end
     154          if checkrun
     155                stopstate=get(Param.RUNHandle,'BusyAction');
     156                update_waitbar(Param.WaitbarHandle,ifile/nbfield)
     157          else
     158                stopstate='queue';
     159          end
    162160    if isequal(stopstate,'queue') % enable STOP command
    163161        if ~isempty(j1_series)&&~isequal(j1_series,{[]})
Note: See TracChangeset for help on using the changeset viewer.