Ignore:
Timestamp:
Apr 29, 2013, 11:28:23 PM (11 years ago)
Author:
sommeria
Message:

waitbar system for series improved to aloow use as stand alone fcts.

to add at the head of series fcts:
hseries=findobj(allchild(0),'Tag','series');
RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
WaitbarHandle?=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series

call to waitbar:

update_waitbar(WaitbarHandle?,index/nbfield)
if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction?'),'queue')

disp('program stopped by user')
break

end

File:
1 edited

Legend:

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

    r599 r624  
    6767    checkrun=0;
    6868end
     69hseries=findobj(allchild(0),'Tag','series');
     70RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
     71WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
    6972
    7073%% root input file(s) and type
     
    220223%% main loop on images
    221224%j1=[];%default
    222 nbfield2=size(XmlData.Time,2)
     225nbfield2=size(XmlData.Time,2);
    223226for ifile=1:nbfield
    224     if checkrun
    225         stopstate=get(Param.RUNHandle,'BusyAction');
    226         update_waitbar(Param.WaitbarHandle,ifile/nbfield)
    227     else
    228         stopstate='queue';
    229     end
    230     if ~isequal(stopstate,'queue')% enable STOP command
     227            update_waitbar(WaitbarHandle,ifile/nbfield)
     228    if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
     229        disp('program stopped by user')
    231230        break
    232231    end
Note: See TracChangeset for help on using the changeset viewer.