Changeset 635 for trunk/src/uvmat.m


Ignore:
Timestamp:
May 19, 2013, 11:37:49 PM (8 years ago)
Author:
sommeria
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r627 r635  
    14651465function runplus_Callback(hObject, eventdata, handles)
    14661466%------------------------------------------------------------------------
     1467
    14671468set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow
    14681469drawnow
    1469 %TODO: introduce the option: increment ='*' to move to the next available view
    1470 increment=str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d
    1471 % if isnan(increment)
    1472 %     set(handles.num_IndexIncrement,'String','1')%default value
    1473 %     increment=1;
    1474 % end
     1470increment=str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
     1471if isnan(increment)% case of free increment: move to next available field index
     1472    increment='+';
     1473end
    14751474errormsg=runpm(hObject,eventdata,handles,increment);
    14761475if ~isempty(errormsg)
     
    14851484function runmin_Callback(hObject, eventdata, handles)
    14861485%------------------------------------------------------------------------
     1486
    14871487set(handles.runmin,'BackgroundColor',[1 1 0])%paint the command button in yellow
    14881488drawnow
    1489 increment=-str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d
    1490 % if isnan(increment)
    1491 %     set(handles.num_IndexIncrement,'String','1')%default value
    1492 %     increment=1;
    1493 % end
     1489increment=-str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
     1490if isnan(increment)% case of free increment: move to previous available field index
     1491    increment='-';
     1492end
    14941493errormsg=runpm(hObject,eventdata,handles,increment);
    14951494if ~isempty(errormsg)
     
    15021501function Movie_Callback(hObject, eventdata, handles)
    15031502%------------------------------------------------------------------------
     1503
    15041504set(handles.Movie,'BackgroundColor',[1 1 0])%paint the command button in yellow
    15051505drawnow
    1506 increment=str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d
    1507 % if isnan(increment)
    1508 %     set(handles.num_IndexIncrement,'String','1')%default value
    1509 %     increment=1;
    1510 % end
     1506increment=str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
     1507if isnan(increment)% case of free increment: move to next available field index
     1508    increment='+';
     1509end
    15111510set(handles.STOP,'Visible','on')
    15121511set(handles.speed,'Visible','on')
     
    15351534set(handles.MovieBackward,'BackgroundColor',[1 1 0])%paint the command button in yellow
    15361535drawnow
    1537 increment=-str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d
     1536increment=-str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d
     1537if isnan(increment)% case of free increment: move to next available field index
     1538    increment='-';
     1539end
    15381540set(handles.STOP,'Visible','on')
    15391541set(handles.speed,'Visible','on')
     
    16071609
    16081610%% increment (or decrement) the field indices and update the input filename(s)
    1609 if isempty(increment)
     1611if ~isnumeric(increment)% undefined increment value
    16101612    set(handles.CheckFixPair,'Value',0)
    16111613end
     
    16171619        j1_1=j1;
    16181620        j2_1=j2;
    1619 if CheckFixPair
     1621if CheckFixPair && isnumeric(increment)
    16201622    if get(handles.scan_i,'Value')==1% case of scanning along index i
    16211623        i1=i1+increment;
     
    16241626            i1_1=i1_1+increment;
    16251627            i2_1=i2_1+increment;
    1626         end
    1627        
     1628        end       
    16281629    else % case of scanning along index j (burst numbers)
    16291630        j1=j1+increment;
     
    16491650        end
    16501651    end
    1651     if ~isempty(increment)
     1652    if isnumeric(increment)
    16521653        if get(handles.scan_i,'Value')==1% case of scanning along index i
    16531654            ref_i=ref_i+increment;% increment the current reference index i
     
    16571658    else % free increment
    16581659        runaction=get(gcbo,'tag');
    1659         if strcmp(runaction,'runplus')||strcmp(runaction,'Movie')% if runplus or movie is activated
     1660        if strcmp(increment,'+')% if runplus or movie is activated
    16601661            step=1;
    16611662        else
     
    17191720            end
    17201721        end
    1721         if ~isempty(increment)
     1722        if isnumeric(increment)
    17221723            if get(handles.scan_i,'Value')==1% case of scanning along index i
    17231724                ref_i_1=ref_i_1+increment;% increment the current reference index i
Note: See TracChangeset for help on using the changeset viewer.