Changeset 711 for trunk/src


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

various improvements

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_GUI.m

    r591 r711  
    9393    List=fields(UserData);
    9494    for ilist=1:numel(List)
    95         if isstruct(UserData.(List{ilist})) 
     95        if isstruct(UserData.(List{ilist}))% look for edit box with the tag UserData.(List{ilist})
    9696            heditbox=findobj(handle,'Tag',List{ilist},'Style','edit','Visible','on');
    9797            if isequal(numel(heditbox),1)
    9898                struct.(List{ilist})=UserData.(List{ilist});
     99            else% look for pushbutton with the tag UserData.(List{ilist})
     100                hpushbutton=findobj(handle,'Tag',List{ilist},'Style','pushbutton','Visible','on');
     101                if isequal(numel(hpushbutton),1)
     102                    struct.(List{ilist})=UserData.(List{ilist});
     103                end
    99104            end
    100105        end
  • 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
  • trunk/src/series/civ_input.m

    r710 r711  
    8787NomTypeInput=Param.InputTable{1,4};
    8888FileExt=Param.InputTable{1,5};
    89 FileType=SeriesData.FileType{1};%type of the first input file series
    90 FileInfo=SeriesData.FileInfo{1};
     89if isfield(SeriesData,'FileType')&&isfield(SeriesData,'FileInfo')
     90    FileType=SeriesData.FileType{1};%type of the first input file series
     91    FileInfo=SeriesData.FileInfo{1};
     92else
     93    msgbox_uvmat('ERROR','please refresh the input file series')
     94    return
     95end
    9196
    9297
     
    333338function errormsg=display_file_name(handles,fileinput)
    334339%------------------------------------------------------------------------
    335 
    336 
    337 %% enable OK, BATCH button and 'status' display
    338 % set(handles.OK, 'Enable','On')
    339 % set(handles.OK,'BackgroundColor',[1 0 0])%set RUN button to red color
    340 % if isfield(handles,'status')
    341 %     set(handles.status,'Value',0);       %suppress the 'status' display
    342 %     status_Callback([], [], handles)
    343 % end
    344 
    345 %% determine nomenclature types and extension of the input files
    346 % [RootPath,SubDir,Civ2_ImageB,i1,i2,j1,j2,ExtInput,NomTypeInput]=fileparts_uvmat(fileinput);
    347 % NomTypeNc='';%default
    348 
    349 
    350340
    351341%% scan the image file series
  • trunk/src/series/civ_series.m

    r707 r711  
    5858    Data.Mask='off';%can use mask option   (option 'off'/'on', 'off' by default)
    5959    Data.OutputDirExt='.civ';%set the output dir extension
     60    Data.OutputSubDirMode='last'; %select the last subDir in the input table as root of the output subdir name (option 'all'/'first'/'last', 'all' by default)
    6061    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
    6162    filecell=get_file_series(Param);%check existence of the first input file
Note: See TracChangeset for help on using the changeset viewer.