Changeset 309 for trunk/src/uvmat.m
- Timestamp:
- Nov 30, 2011, 11:09:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r307 r309 236 236 set(hObject,'WindowButtonUpFcn',{'mouse_up',handles}) 237 237 set(hObject,'DeleteFcn',{@closefcn})% 238 %set(handles.ListObject,'ButtonDownFcn',{@list_object_1_Callback,handles})% allows activation of lis_object_1_callback with right mouse click239 %set(handles.list_object_2,'ButtonDownFcn',{@list_object_2_Callback,handles})240 238 241 239 %% refresh projection plane … … 1329 1327 set_scan_options(hObject, eventdata, handles) 1330 1328 1331 %--------------------------------------------------- 1332 % switch file index scanning options scan_i and scan_j in an exclusive way1329 %------------------------------------------------------------------------ 1330 % --- switch file index scanning options scan_i and scan_j in an exclusive way 1333 1331 function scan_i_Callback(hObject, eventdata, handles) 1334 %--------------------------------------------------- 1332 %------------------------------------------------------------------------ 1335 1333 if get(handles.scan_i,'Value')==1 1336 1334 set(handles.scan_i,'BackgroundColor',[1 1 0]) … … 1344 1342 scan_j_Callback(hObject, eventdata, handles) 1345 1343 1346 %------------------------------------------------------------------- 1347 % switch file index scanning options scan_i and scan_j in an exclusive way1344 %------------------------------------------------------------------------ 1345 % --- switch file index scanning options scan_i and scan_j in an exclusive way 1348 1346 function scan_j_Callback(hObject, eventdata, handles) 1349 %------------------------------------------------------------------- 1347 %------------------------------------------------------------------------ 1350 1348 if get(handles.scan_j,'Value')==1 1351 1349 set(handles.scan_j,'BackgroundColor',[1 1 0]) … … 1366 1364 end 1367 1365 1368 %------------------------------------------------------------------- 1366 %------------------------------------------------------------------------ 1369 1367 function i1_Callback(hObject, eventdata, handles) 1370 %------------------------------------------------------------------- 1368 %------------------------------------------------------------------------ 1371 1369 set(handles.i1,'BackgroundColor',[0.7 0.7 0.7]) 1372 1370 NomType=get(handles.FileIndex,'UserData'); … … 1386 1384 set(handles.FileIndex_1,'BackgroundColor',[0.7 0.7 0.7]) 1387 1385 end 1388 %Run0_Callback(hObject, eventdata, handles) 1389 1390 %------------------------------------------------------------------- 1386 1387 %------------------------------------------------------------------------ 1391 1388 function i2_Callback(hObject, eventdata, handles) 1389 %------------------------------------------------------------------------ 1392 1390 set(handles.i2,'BackgroundColor',[0.7 0.7 0.7]) 1393 1391 i1_Callback(hObject, eventdata, handles) 1394 %------------------------------------------------------------------- 1395 1396 %------------------------------------------------------------------- 1392 1393 %------------------------------------------------------------------------ 1397 1394 function j1_Callback(hObject, eventdata, handles) 1395 %------------------------------------------------------------------------ 1398 1396 set(handles.j1,'BackgroundColor',[0.7 0.7 0.7]) 1399 1397 i1_Callback(hObject, eventdata, handles) 1400 %------------------------------------------------------------------- 1401 1402 %------------------------------------------------------------------- 1398 1399 %------------------------------------------------------------------------ 1403 1400 function j2_Callback(hObject, eventdata, handles) 1401 %------------------------------------------------------------------------ 1404 1402 set(handles.j2,'BackgroundColor',[0.7 0.7 0.7]) 1405 1403 i1_Callback(hObject, eventdata, handles) 1406 %------------------------------------------------------------------- 1407 1408 %------------------------------------------------------------------- 1404 1405 %------------------------------------------------------------------------ 1409 1406 function slices_Callback(hObject, eventdata, handles) 1410 %------------------------------------------------------------------- 1407 %------------------------------------------------------------------------ 1411 1408 if get(handles.slices,'Value')==1 1412 1409 set(handles.slices,'BackgroundColor',[1 1 0]) … … 1424 1421 end 1425 1422 1426 %------------------------------------------------------------------- 1423 %------------------------------------------------------------------------ 1427 1424 function nb_slice_Callback(hObject, eventdata, handles) 1428 %------------------------------------------------------------------- 1425 %------------------------------------------------------------------------ 1429 1426 nb_slice_str=get(handles.nb_slice,'String'); 1430 1427 if isequal(nb_slice_str,'volume') … … 1541 1538 end 1542 1539 set(handles.mask_test,'UserData',[]) 1543 %huvmat=get(handles.mask_test,'parent');1544 1540 UvData=get(handles.uvmat,'UserData'); 1545 1541 if isfield(UvData,'MaskName') … … 1550 1546 end 1551 1547 1552 %------------------------------------------------------------------- 1548 %------------------------------------------------------------------------ 1553 1549 function errormsg=update_mask(handles,num_i1,num_j1) 1554 %------------------------------------------------------------------- 1550 %------------------------------------------------------------------------ 1555 1551 errormsg=[];%default 1556 1552 MaskData=get(handles.mask_test,'UserData'); … … 1633 1629 1634 1630 1635 %------------------------------------------------------------------- 1631 %------------------------------------------------------------------------ 1636 1632 function MenuExportFigure_Callback(hObject, eventdata, handles) 1637 %------------------------------------------------------------------- 1633 %------------------------------------------------------------------------ 1638 1634 huvmat=get(handles.MenuExport,'parent'); 1639 %UvData=get(huvmat,'UserData');1640 1635 hfig=figure; 1641 1636 copyobj(handles.axes3,hfig); … … 1644 1639 colorbar 1645 1640 1646 %------------------------------------------------------------------- 1647 %------------------------------------------------------------------- 1641 %------------------------------------------------------------------------ 1642 %------------------------------------------------------------------------ 1648 1643 % III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT' 1649 %------------------------------------------------------------------- 1650 1651 %------------------------------------------------------------------- 1644 %------------------------------------------------------------------------ 1645 1646 %------------------------------------------------------------------------ 1652 1647 % --- Executes on button press in runplus: make one step forward and call 1653 1648 % --- run0. The step forward is along the fields series 1 or 2 depending on 1654 1649 % --- the scan_i and scan_j check box (exclusive each other) 1655 1650 function runplus_Callback(hObject, eventdata, handles) 1656 %------------------------------------------------------------------- 1651 %------------------------------------------------------------------------ 1657 1652 set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow 1658 1653 drawnow … … 1669 1664 set(handles.runplus,'BackgroundColor',[1 0 0])%paint the command button back to red 1670 1665 1671 %------------------------------------------------------------------- 1666 %------------------------------------------------------------------------ 1672 1667 % --- Executes on button press in runmin: make one step backward and call 1673 1668 % --- run0. The step backward is along the fields series 1 or 2 depending on 1674 1669 % --- the scan_i and scan_j check box (exclusive each other) 1675 1670 function runmin_Callback(hObject, eventdata, handles) 1676 %------------------------------------------------------------------- 1671 %------------------------------------------------------------------------ 1677 1672 set(handles.runmin,'BackgroundColor',[1 1 0])%paint the command button in yellow 1678 1673 drawnow … … 1688 1683 set(handles.runmin,'BackgroundColor',[1 0 0])%paint the command button back to red 1689 1684 1690 %------------------------------------------------------------------- 1685 %------------------------------------------------------------------------ 1691 1686 % -- Executes on button press in Movie: make a series of +> steps 1692 1687 function Movie_Callback(hObject, eventdata, handles) 1693 %------------------------------------------------------------------ 1688 %------------------------------------------------------------------------ 1694 1689 set(handles.Movie,'BackgroundColor',[1 1 0])%paint the command button in yellow 1695 1690 drawnow … … 1719 1714 set(handles.Movie,'BackgroundColor',[1 0 0])%paint the command buttonback to red 1720 1715 1721 %------------------------------------------------------------------- 1716 %------------------------------------------------------------------------ 1722 1717 % -- Executes on button press in Movie: make a series of <- steps 1723 1718 function MovieBackward_Callback(hObject, eventdata, handles) 1724 %------------------------------------------------------------------ 1719 %------------------------------------------------------------------------ 1725 1720 set(handles.MovieBackward,'BackgroundColor',[1 1 0])%paint the command button in yellow 1726 1721 drawnow … … 1750 1745 set(handles.MovieBackward,'BackgroundColor',[1 0 0])%paint the command buttonback to red 1751 1746 1752 %------------------------------------------------------------------- 1747 %------------------------------------------------------------------------ 1753 1748 function STOP_Callback(hObject, eventdata, handles) 1754 %------------------------------------------------------------------- 1749 %------------------------------------------------------------------------ 1755 1750 set(handles.movie_pair,'BusyAction','Cancel') 1756 1751 set(handles.movie_pair,'value',0) … … 1762 1757 set(handles.MovieBackward,'BackgroundColor',[1 0 0])%paint the command buttonback to red 1763 1758 1764 %------------------------------------------------------------------ 1759 %------------------------------------------------------------------------ 1765 1760 function errormsg=runpm(hObject,eventdata,handles,increment) 1766 %------------------------------------------------------------------ 1767 %check for m ï¿œovie pair status1761 %------------------------------------------------------------------------ 1762 %check for movie pair status 1768 1763 movie_status=get(handles.movie_pair,'Value'); 1769 1764 if isequal(movie_status,1) … … 1771 1766 end 1772 1767 %read the data on the current input rootfile(s) 1773 1774 1768 [FileName,RootPath,filebase,FileIndices,FileExt,subdir]=read_file_boxes(handles); 1775 1769 NomType=get(handles.FileIndex,'UserData'); … … 1792 1786 filename_1=[]; 1793 1787 end 1794 1795 1788 comp_input=get(handles.fix_pair,'Value'); 1796 1789 … … 1843 1836 end 1844 1837 1845 1846 %------------------------------------------------------- 1838 %------------------------------------------------------------------------ 1847 1839 % --- Executes on button press in movie_pair: create an alternating movie with two view 1848 %-------------------------------------------------------1849 1840 function movie_pair_Callback(hObject, eventdata, handles) 1841 %------------------------------------------------------------------------ 1850 1842 status=get(handles.movie_pair,'value'); 1851 1843 if isequal(status,0) … … 3675 3667 set(handles.num_MaxVec,'String','1') 3676 3668 set(handles.num_ColCode1,'String','0.333') 3677 colcode1_Callback(hObject, eventdata, handles)3669 num_ColCode1_Callback(hObject, eventdata, handles) 3678 3670 set(handles.num_ColCode2,'String','0.666') 3679 colcode2_Callback(hObject, eventdata, handles)3671 num_ColCode2_Callback(hObject, eventdata, handles) 3680 3672 else 3681 3673 set(handles.CheckFixVecColor,'Value',1)%auto scale between min,max by default … … 3707 3699 set(handles.num_ColCode2,'String',num2str(col)) 3708 3700 end 3709 colcode1_Callback(hObject, eventdata, handles)3701 num_ColCode1_Callback(hObject, eventdata, handles) 3710 3702 3711 3703 %---------------------------------------------------------------- … … 3722 3714 set(handles.num_ColCode1,'String',num2str(col)) 3723 3715 end 3724 colcode2_Callback(hObject, eventdata, handles)3716 num_ColCode2_Callback(hObject, eventdata, handles) 3725 3717 3726 3718 %---------------------------------------------------------------- 3727 % execute on return carriage on the edit box corresponding to slider 13719 % --- Execute on return carriage on the edit box corresponding to slider 1 3728 3720 %---------------------------------------------------------------- 3729 function num_ColCode1_Callback(hObject, eventdata, handles) 3730 % col=str2num(get(handles.num_ColCode1,'String')); 3731 % set(handles.Slider1,'Value',col) 3721 function num_ColCode1_Callback(hObject, eventdata, handles) 3732 3722 set_vec_col_bar(handles) 3733 3723 update_plot(handles); 3734 3724 3735 3725 %---------------------------------------------------------------- 3736 % execute on return carriage on the edit box corresponding to slider 23726 % --- Execute on return carriage on the edit box corresponding to slider 2 3737 3727 %---------------------------------------------------------------- 3738 3728 function num_ColCode2_Callback(hObject, eventdata, handles) 3739 % col=str2num(get(handles.num_ColCode2,'String'));3740 % set(handles.Slider2,'Value',col)3741 % slider2_Callback(hObject, eventdata, handles)3742 3729 set_vec_col_bar(handles) 3743 3730 update_plot(handles); 3744 %------------------------------------------------------------ 3745 %update the slider values after displaying vectors 3746 %-------------------------------------------------------- 3747 % function slider_update(handles,auto,minC,num_ColCode1,num_ColCode2,maxC) 3748 % set(handles.Slider1,'Min',minC) 3749 % set(handles.Slider1,'Max',maxC) 3750 % set(handles.Slider2,'Min',minC) 3751 % set(handles.Slider2,'Max',maxC) 3752 % set(handles.min_title_vec,'String',num2str(minC)) 3753 % set(handles.num_MaxVec,'String',num2str(maxC)) 3754 % if auto 3755 % set(handles.num_ColCode1,'String',num2str(num_ColCode1,3))%update display 3756 % set(handles.num_ColCode2,'String',num2str(num_ColCode2,3)) 3757 % end 3758 % set(handles.Slider1,'Value',num_ColCode1)%update slider with constant display 3759 % set(handles.Slider2,'Value',num_ColCode2) 3760 % set_vec_col_bar(handles) 3761 3762 3731 %------------------------------------------------------------------------ 3763 3732 %------------------------------------------------------- 3764 3733 % --- Executes on button press in CheckFixVecColor. … … 3771 3740 function transform_fct_Callback(hObject, eventdata, handles) 3772 3741 %------------------------------------------------------------- 3773 3774 3742 UvData=get(handles.uvmat,'UserData'); 3775 3743 menu=get(handles.transform_fct,'String');
Note: See TracChangeset
for help on using the changeset viewer.