Changeset 705 for trunk/src


Ignore:
Timestamp:
Feb 12, 2014, 12:02:04 AM (11 years ago)
Author:
sommeria
Message:

several bugs repaired

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r679 r705  
    160160%% check svn status
    161161[status,result]=system('svn --help');
    162 if status==0
     162if status==0 % if a svn line command is available
    163163    svn_info.rep_rev=0;svn_info.cur_rev=0;
    164     [tild,result]=system(['svn info ' dir_fct]);
    165     t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
     164    [tild,result]=system(['svn info ' dir_fct]); %get info fromn the svn server
     165    t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');%detect 'révision' or 'Revision' in the text
    166166    if ~isempty(t)
    167         svn_info.cur_rev=str2double(t.rev);
     167        svn_info.cur_rev=str2double(t.rev); %version nbre of the current package
    168168    end
    169169    [tild,result]=system(['svn info -r ''HEAD'' '  pathuvmat]);
    170170    t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
    171171    if ~isempty(t)
    172         svn_info.rep_rev=str2double(t.rev);
     172        svn_info.rep_rev=str2double(t.rev); % version nbre available on the svn repository
    173173    end
    174174    [tild,result]=system(['svn status '  pathuvmat]);
    175175    svn_info.status=result;
    176     checkmsg =[checkmsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];
    177     if svn_info.rep_rev>svn_info.cur_rev
     176    checkmsg =[checkmsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];%display version nbre of the current uvmat package
     177    if svn_info.rep_rev>svn_info.cur_rev %if the repository has a more advanced version than the uvmat package, warning msge
    178178        checkmsg =[checkmsg ...
    179179            {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}];
    180180    end
    181     modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');
     181    modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');% detect the files modified compared to the repository
    182182    if ~isempty(modifications)
    183183        for ilist=1:numel(modifications)
     
    186186        end
    187187    end
    188 else
     188else % no svn line command available
    189189    checkmsg=[checkmsg {'SVN not available'}];
    190190end
  • trunk/src/series.m

    r694 r705  
    14241424%% settings of the button RUN
    14251425set(handles.RUN,'BusyAction','queue');% activation of STOP button will set BusyAction to 'cancel'
    1426 %set(0,'CurrentFigure',handles.series); % display the GUI series
    14271426set(handles.RUN, 'Enable','Off')% avoid further RUN action until the current one is finished
    14281427set(handles.RUN,'BackgroundColor',[1 1 0])%show activation of RUN by yellow color
     
    18751874function ActionName_Callback(hObject, eventdata, handles)
    18761875%------------------------------------------------------------------------
     1876
    18771877%% stop any ongoing series processing
    18781878if isequal(get(handles.RUN,'Value'),1)
     
    21872187%% Expected nbre of output files
    21882188if isfield(ParamOut,'OutputFileMode')
    2189 StatusData.OutputFileMode=ParamOut.OutputFileMode;
    2190 set(handles.status,'UserData',StatusData)
     2189    StatusData.OutputFileMode=ParamOut.OutputFileMode;
     2190    set(handles.status,'UserData',StatusData)
    21912191end
    21922192
     
    22162216%------------------------------------------------------------------------
    22172217if get(handles.ActionInputView,'Value')
    2218 ActionName_Callback(hObject, eventdata, handles)
     2218    ActionName_Callback(hObject, eventdata, handles)
    22192219end
    22202220
     
    26522652
    26532653InputTable=get(handles.InputTable,'Data');
    2654 filexml=uigetfile_uvmat('pick a xml parameter file',InputTable{1,1},'.xml');
     2654filexml=uigetfile_uvmat('pick a xml parameter file',InputTable{1,1},'.xml');% get the xml file containing processing parameters
    26552655if ~isempty(filexml)%abandon if no file is introduced by the browser
    26562656    Param=xml2struct(filexml);
    2657     fill_GUI(Param,handles.series)
     2657    % stop current Action if button RUN has been activated
     2658    if isequal(get(handles.RUN,'Value'),1)
     2659        answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?');
     2660        if strcmp(answer,'Yes')
     2661            STOP_Callback(hObject, eventdata, handles)
     2662        else
     2663            return
     2664        end
     2665    end
     2666    Param.Action.RUN=0; %deactivate the RUN button
     2667    fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters
    26582668    REFRESH_Callback([],[],handles)% refresh data relative to the input files
    26592669    SeriesData=get(handles.series,'UserData');
    2660     if isfield(Param,'ActionInput')
     2670    if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
    26612671        set(handles.ActionInput,'Visible','on')
    26622672        set(handles.ActionInput_title,'Visible','on')
     
    26652675        SeriesData.ActionInput=Param.ActionInput;
    26662676    end
    2667     if isfield(Param,'ProjObject')
     2677    if isfield(Param,'ProjObject') %introduce projection object if relevant
    26682678        SeriesData.ProjObject=Param.ProjObject;
    26692679    end
    26702680    set(handles.series,'UserData',SeriesData)
    2671     ActionName_Callback([],[],handles)
     2681    %ActionName_Callback([],[],handles)
    26722682end
    26732683
     
    27242734    set(handles.status,'BackgroundColor',[1 1 0])
    27252735    drawnow
    2726     %StatusData.time_ref=get(handles.RUN,'UserData');% get the time of launch
    27272736    Param=read_GUI(handles.series);
    27282737    RootPath=Param.InputTable{1,1};
  • trunk/src/set_object.m

    r684 r705  
    3636function varargout = set_object(varargin)
    3737
    38 % Last Modified by GUIDE v2.5 02-Sep-2013 11:39:56
     38% Last Modified by GUIDE v2.5 11-Feb-2014 20:08:17
    3939
    4040% Begin initialization code - DO NOT REFRESH
     
    8282set(0,'Unit','pixels')
    8383ScreenSize=get(0,'ScreenSize');% get the size of the screen, to put the fig on the upper right
    84 Width=300;% fig width in pixels
    85 Height=600;
     84PosGUI=get(handles.set_object,'Position');% fig width in pixels
     85Width=PosGUI(3);%width of the gui set_object in pixels
     86Height=PosGUI(4);
    8687Left=ScreenSize(3)- Width-40; %right edge close to the right, with margin=40
    8788Bottom=ScreenSize(4)-Height-40; %put fig at top right
     
    650651        def=[Object.Style '.xml'];
    651652    end
    652     displ_txt={'save object as an .xml file in';dir_save};%default display
     653    displ_txt={['save object in' dir_save]; 'with file name (.xml):'};%default display
    653654    menu=get(handles.ProjMode,'String');
    654655    value=get(handles.ProjMode,'Value');
    655656    ProjMode=menu{value};
    656657    if strcmp(ProjMode,'mask_inside')||strcmp(ProjMode,'mask_outside')
    657         displ_txt={'save mask contour as an .xml file:'; 'to create a mask image, use save_mask on the GUI uvmat (lower right)'};
     658        displ_txt={displ_txt; '(to create a mask image, use save_mask on the GUI uvmat upper menu)'};
    658659    end
    659660    answer=msgbox_uvmat('INPUT_TXT',displ_txt,def);
    660     if iscell(answer)
    661         FullName=fullfile(dir_save,answer{1});
     661    if ischar(answer)
     662        FullName=fullfile(dir_save,answer);
    662663        t=struct2xml(Object);
    663664        t=set(t,1,'name','ProjObject');
     
    784785    set(handles.Coord,'Data',Coord);
    785786end
    786 
    787 
    788 
Note: See TracChangeset for help on using the changeset viewer.