Changeset 635 for trunk/src/uvmat.m
- Timestamp:
- May 19, 2013, 11:37:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r627 r635 1465 1465 function runplus_Callback(hObject, eventdata, handles) 1466 1466 %------------------------------------------------------------------------ 1467 1467 1468 set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow 1468 1469 drawnow 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 1470 increment=str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d 1471 if isnan(increment)% case of free increment: move to next available field index 1472 increment='+'; 1473 end 1475 1474 errormsg=runpm(hObject,eventdata,handles,increment); 1476 1475 if ~isempty(errormsg) … … 1485 1484 function runmin_Callback(hObject, eventdata, handles) 1486 1485 %------------------------------------------------------------------------ 1486 1487 1487 set(handles.runmin,'BackgroundColor',[1 1 0])%paint the command button in yellow 1488 1488 drawnow 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 1489 increment=-str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d 1490 if isnan(increment)% case of free increment: move to previous available field index 1491 increment='-'; 1492 end 1494 1493 errormsg=runpm(hObject,eventdata,handles,increment); 1495 1494 if ~isempty(errormsg) … … 1502 1501 function Movie_Callback(hObject, eventdata, handles) 1503 1502 %------------------------------------------------------------------------ 1503 1504 1504 set(handles.Movie,'BackgroundColor',[1 1 0])%paint the command button in yellow 1505 1505 drawnow 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 1506 increment=str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d 1507 if isnan(increment)% case of free increment: move to next available field index 1508 increment='+'; 1509 end 1511 1510 set(handles.STOP,'Visible','on') 1512 1511 set(handles.speed,'Visible','on') … … 1535 1534 set(handles.MovieBackward,'BackgroundColor',[1 1 0])%paint the command button in yellow 1536 1535 drawnow 1537 increment=-str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d 1536 increment=-str2double(get(handles.num_IndexIncrement,'String')); %get the field increment d 1537 if isnan(increment)% case of free increment: move to next available field index 1538 increment='-'; 1539 end 1538 1540 set(handles.STOP,'Visible','on') 1539 1541 set(handles.speed,'Visible','on') … … 1607 1609 1608 1610 %% increment (or decrement) the field indices and update the input filename(s) 1609 if isempty(increment)1611 if ~isnumeric(increment)% undefined increment value 1610 1612 set(handles.CheckFixPair,'Value',0) 1611 1613 end … … 1617 1619 j1_1=j1; 1618 1620 j2_1=j2; 1619 if CheckFixPair 1621 if CheckFixPair && isnumeric(increment) 1620 1622 if get(handles.scan_i,'Value')==1% case of scanning along index i 1621 1623 i1=i1+increment; … … 1624 1626 i1_1=i1_1+increment; 1625 1627 i2_1=i2_1+increment; 1626 end 1627 1628 end 1628 1629 else % case of scanning along index j (burst numbers) 1629 1630 j1=j1+increment; … … 1649 1650 end 1650 1651 end 1651 if ~isempty(increment)1652 if isnumeric(increment) 1652 1653 if get(handles.scan_i,'Value')==1% case of scanning along index i 1653 1654 ref_i=ref_i+increment;% increment the current reference index i … … 1657 1658 else % free increment 1658 1659 runaction=get(gcbo,'tag'); 1659 if strcmp( runaction,'runplus')||strcmp(runaction,'Movie')% if runplus or movie is activated1660 if strcmp(increment,'+')% if runplus or movie is activated 1660 1661 step=1; 1661 1662 else … … 1719 1720 end 1720 1721 end 1721 if ~isempty(increment)1722 if isnumeric(increment) 1722 1723 if get(handles.scan_i,'Value')==1% case of scanning along index i 1723 1724 ref_i_1=ref_i_1+increment;% increment the current reference index i
Note: See TracChangeset
for help on using the changeset viewer.