Changeset 711 for trunk/src/series.m


Ignore:
Timestamp:
Feb 18, 2014, 10:11:11 AM (10 years ago)
Author:
sommeria
Message:

various improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r710 r711  
    20552055end       
    20562056
    2057 %% Check whether alphabetical sorting of input Subdir is alowed by the Action fct  (for multiples series entries)
     2057%% Check whether alphabetical sorting of input Subdir is allowed by the Action fct  (for multiples series entries)
    20582058if isfield(ParamOut,'AllowInputSort')&&isequal(ParamOut.AllowInputSort,'on')&& size(Param.InputTable,1)>1
    20592059    [tild,iview]=sort(InputTable(:,2)); %subdirectories sorted in alphabetical order
     
    21922192OutputDirVisible='off';
    21932193if isfield(ParamOut,'OutputDirExt')&&~isempty(ParamOut.OutputDirExt)
     2194    OutputSubDirMode='all';%default
     2195    if isfield(ParamOut,'OutputSubDirMode')
     2196        OutputSubDirMode=ParamOut.OutputSubDirMode;
     2197    end
    21942198    set(handles.OutputDirExt,'String',ParamOut.OutputDirExt)
    21952199    OutputDirVisible='on';
    21962200    SubDir=InputTable(1:end,2); %set of subdirectories sorted in alphabetical order
    2197     SubDirOut=SubDir{1};
    2198     if numel(SubDir)>1
    2199         for ilist=2:numel(SubDir)
    2200             SubDirOut=[SubDirOut '-' SubDir{ilist}];
     2201    if strcmp(OutputSubDirMode,'last')
     2202        SubDirOut=SubDir{end};
     2203    else
     2204        SubDirOut=SubDir{1};
     2205        if ~strcmp(OutputSubDirMode,'first')  && numel(SubDir)>1
     2206            for ilist=2:numel(SubDir)
     2207                SubDirOut=[SubDirOut '-' SubDir{ilist}];
     2208            end
    22012209        end
    22022210    end
     
    22202228%% definition of an additional parameter set, determined by an ancillary GUI
    22212229if isfield(ParamOut,'ActionInput')
     2230%     set(handles.ActionInput,'Visible','on')
     2231%     set(handles.ActionInput_title,'Visible','on')
    22222232    set(handles.ActionInput,'Visible','on')
    2223     set(handles.ActionInput_title,'Visible','on')
    2224     set(handles.ActionInputView,'Visible','on')
    2225     set(handles.ActionInputView,'Value',0)
    2226     set(handles.ActionInput,'String',ActionName)
     2233 %   set(handles.ActionInput,'Value',0)
     2234%     set(handles.ActionInput,'String',ActionName)
    22272235    ParamOut.ActionInput.Program=ActionName; % record the program in ActionInput
    22282236    SeriesData.ActionInput=ParamOut.ActionInput;
    22292237else
     2238%     set(handles.ActionInput,'Visible','off')
     2239%     set(handles.ActionInput_title,'Visible','off')
    22302240    set(handles.ActionInput,'Visible','off')
    2231     set(handles.ActionInput_title,'Visible','off')
    2232     set(handles.ActionInputView,'Visible','off')
    22332241    if isfield(SeriesData,'ActionInput')
    22342242    SeriesData=rmfield(SeriesData,'ActionInput');
     
    22392247
    22402248%------------------------------------------------------------------------
    2241 % --- Executes on button press in ActionInputView.
    2242 function ActionInputView_Callback(hObject, eventdata, handles)
    2243 %------------------------------------------------------------------------
    2244 if get(handles.ActionInputView,'Value')
     2249% --- Executes on button press in ActionInput.
     2250function ActionInput_Callback(hObject, eventdata, handles)
     2251%------------------------------------------------------------------------
     2252if get(handles.ActionInput,'Value')
    22452253    ActionName_Callback(hObject, eventdata, handles)
    22462254end
     
    27052713    Param.Action.RUN=0; %desactivate the input RUN=1
    27062714    fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters
     2715    SeriesData=get(handles.series,'UserData');
     2716    if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
     2717%         set(handles.ActionInput,'Visible','on')
     2718%         set(handles.ActionInput_title,'Visible','on')
     2719        set(handles.ActionInput,'Visible','on')
     2720        set(handles.ActionInput,'Value',0)
     2721        SeriesData.ActionInput=Param.ActionInput;
     2722    end
     2723    if isfield(Param,'ProjObject') %introduce projection object if relevant
     2724        SeriesData.ProjObject=Param.ProjObject;
     2725    end
     2726    set(handles.series,'UserData',SeriesData)
    27072727    if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1)
    27082728        set(handles.ProjObject,'String',Param.ProjObject.Name)
     
    27202740    set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated
    27212741  %  REFRESH_Callback([],[],handles)% refresh data relative to the input files
    2722     SeriesData=get(handles.series,'UserData');
    2723     if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
    2724         set(handles.ActionInput,'Visible','on')
    2725         set(handles.ActionInput_title,'Visible','on')
    2726         set(handles.ActionInputView,'Visible','on')
    2727         set(handles.ActionInputView,'Value',0)
    2728         SeriesData.ActionInput=Param.ActionInput;
    2729     end
    2730     if isfield(Param,'ProjObject') %introduce projection object if relevant
    2731         SeriesData.ProjObject=Param.ProjObject;
    2732     end
    2733     set(handles.series,'UserData',SeriesData)
    27342742end
    27352743
Note: See TracChangeset for help on using the changeset viewer.