Changeset 309 for trunk/src/uvmat.m


Ignore:
Timestamp:
Nov 30, 2011, 11:09:12 PM (13 years ago)
Author:
sommeria
Message:

many bugs corrected, cleaning of civ.m, resize of the GUI civ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r307 r309  
    236236set(hObject,'WindowButtonUpFcn',{'mouse_up',handles})
    237237set(hObject,'DeleteFcn',{@closefcn})%
    238 %set(handles.ListObject,'ButtonDownFcn',{@list_object_1_Callback,handles})% allows activation of lis_object_1_callback with right mouse click
    239 %set(handles.list_object_2,'ButtonDownFcn',{@list_object_2_Callback,handles})
    240238
    241239%% refresh projection plane
     
    13291327set_scan_options(hObject, eventdata, handles)
    13301328
    1331 %---------------------------------------------------
    1332 % switch file index scanning options scan_i and scan_j in an exclusive way
     1329%------------------------------------------------------------------------
     1330% --- switch file index scanning options scan_i and scan_j in an exclusive way
    13331331function scan_i_Callback(hObject, eventdata, handles)
    1334 %---------------------------------------------------
     1332%------------------------------------------------------------------------
    13351333if get(handles.scan_i,'Value')==1
    13361334    set(handles.scan_i,'BackgroundColor',[1 1 0])
     
    13441342scan_j_Callback(hObject, eventdata, handles)
    13451343
    1346 %-------------------------------------------------------------------
    1347 % switch file index scanning options scan_i and scan_j in an exclusive way
     1344%------------------------------------------------------------------------
     1345% --- switch file index scanning options scan_i and scan_j in an exclusive way
    13481346function scan_j_Callback(hObject, eventdata, handles)
    1349 %-------------------------------------------------------------------
     1347%------------------------------------------------------------------------
    13501348if get(handles.scan_j,'Value')==1
    13511349    set(handles.scan_j,'BackgroundColor',[1 1 0])
     
    13661364end
    13671365
    1368 %-------------------------------------------------------------------
     1366%------------------------------------------------------------------------
    13691367function i1_Callback(hObject, eventdata, handles)
    1370 %-------------------------------------------------------------------
     1368%------------------------------------------------------------------------
    13711369set(handles.i1,'BackgroundColor',[0.7 0.7 0.7])
    13721370NomType=get(handles.FileIndex,'UserData');
     
    13861384     set(handles.FileIndex_1,'BackgroundColor',[0.7 0.7 0.7])
    13871385end
    1388 %Run0_Callback(hObject, eventdata, handles)
    1389 
    1390 %-------------------------------------------------------------------
     1386
     1387%------------------------------------------------------------------------
    13911388function i2_Callback(hObject, eventdata, handles)
     1389%------------------------------------------------------------------------
    13921390set(handles.i2,'BackgroundColor',[0.7 0.7 0.7])
    13931391i1_Callback(hObject, eventdata, handles)
    1394 %-------------------------------------------------------------------
    1395 
    1396 %-------------------------------------------------------------------
     1392
     1393%------------------------------------------------------------------------
    13971394function j1_Callback(hObject, eventdata, handles)
     1395%------------------------------------------------------------------------
    13981396set(handles.j1,'BackgroundColor',[0.7 0.7 0.7])
    13991397i1_Callback(hObject, eventdata, handles)
    1400 %-------------------------------------------------------------------
    1401 
    1402 %-------------------------------------------------------------------
     1398
     1399%------------------------------------------------------------------------
    14031400function j2_Callback(hObject, eventdata, handles)
     1401%------------------------------------------------------------------------
    14041402set(handles.j2,'BackgroundColor',[0.7 0.7 0.7])
    14051403i1_Callback(hObject, eventdata, handles)
    1406 %-------------------------------------------------------------------
    1407 
    1408 %-------------------------------------------------------------------
     1404
     1405%------------------------------------------------------------------------
    14091406function slices_Callback(hObject, eventdata, handles)
    1410 %-------------------------------------------------------------------
     1407%------------------------------------------------------------------------
    14111408if get(handles.slices,'Value')==1
    14121409    set(handles.slices,'BackgroundColor',[1 1 0])
     
    14241421end
    14251422
    1426 %-------------------------------------------------------------------
     1423%------------------------------------------------------------------------
    14271424function nb_slice_Callback(hObject, eventdata, handles)
    1428 %-------------------------------------------------------------------
     1425%------------------------------------------------------------------------
    14291426nb_slice_str=get(handles.nb_slice,'String');
    14301427if isequal(nb_slice_str,'volume')
     
    15411538    end
    15421539    set(handles.mask_test,'UserData',[])   
    1543     %huvmat=get(handles.mask_test,'parent');
    15441540    UvData=get(handles.uvmat,'UserData');
    15451541    if isfield(UvData,'MaskName')
     
    15501546end
    15511547
    1552 %-------------------------------------------------------------------
     1548%------------------------------------------------------------------------
    15531549function errormsg=update_mask(handles,num_i1,num_j1)
    1554 %-------------------------------------------------------------------
     1550%------------------------------------------------------------------------
    15551551errormsg=[];%default
    15561552MaskData=get(handles.mask_test,'UserData');
     
    16331629
    16341630
    1635 %-------------------------------------------------------------------
     1631%------------------------------------------------------------------------
    16361632function MenuExportFigure_Callback(hObject, eventdata, handles)
    1637 %-------------------------------------------------------------------
     1633%------------------------------------------------------------------------
    16381634huvmat=get(handles.MenuExport,'parent');
    1639 %UvData=get(huvmat,'UserData');
    16401635hfig=figure;
    16411636copyobj(handles.axes3,hfig);
     
    16441639colorbar
    16451640
    1646 %-------------------------------------------------------------------
    1647 %-------------------------------------------------------------------
     1641%------------------------------------------------------------------------
     1642%------------------------------------------------------------------------
    16481643% III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT'
    1649 %-------------------------------------------------------------------
    1650 
    1651 %-------------------------------------------------------------------
     1644%------------------------------------------------------------------------
     1645
     1646%------------------------------------------------------------------------
    16521647% --- Executes on button press in runplus: make one step forward and call
    16531648% --- run0. The step forward is along the fields series 1 or 2 depending on
    16541649% --- the scan_i and scan_j check box (exclusive each other)
    16551650function runplus_Callback(hObject, eventdata, handles)
    1656 %-------------------------------------------------------------------
     1651%------------------------------------------------------------------------
    16571652set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow
    16581653drawnow
     
    16691664set(handles.runplus,'BackgroundColor',[1 0 0])%paint the command button back to red
    16701665
    1671 %-------------------------------------------------------------------
     1666%------------------------------------------------------------------------
    16721667% --- Executes on button press in runmin: make one step backward and call
    16731668% --- run0. The step backward is along the fields series 1 or 2 depending on
    16741669% --- the scan_i and scan_j check box (exclusive each other)
    16751670function runmin_Callback(hObject, eventdata, handles)
    1676 %-------------------------------------------------------------------
     1671%------------------------------------------------------------------------
    16771672set(handles.runmin,'BackgroundColor',[1 1 0])%paint the command button in yellow
    16781673drawnow
     
    16881683set(handles.runmin,'BackgroundColor',[1 0 0])%paint the command button back to red
    16891684
    1690 %-------------------------------------------------------------------
     1685%------------------------------------------------------------------------
    16911686% -- Executes on button press in Movie: make a series of +> steps
    16921687function Movie_Callback(hObject, eventdata, handles)
    1693 %------------------------------------------------------------------
     1688%------------------------------------------------------------------------
    16941689set(handles.Movie,'BackgroundColor',[1 1 0])%paint the command button in yellow
    16951690drawnow
     
    17191714set(handles.Movie,'BackgroundColor',[1 0 0])%paint the command buttonback to red
    17201715
    1721 %-------------------------------------------------------------------
     1716%------------------------------------------------------------------------
    17221717% -- Executes on button press in Movie: make a series of <- steps
    17231718function MovieBackward_Callback(hObject, eventdata, handles)
    1724 %------------------------------------------------------------------
     1719%------------------------------------------------------------------------
    17251720set(handles.MovieBackward,'BackgroundColor',[1 1 0])%paint the command button in yellow
    17261721drawnow
     
    17501745set(handles.MovieBackward,'BackgroundColor',[1 0 0])%paint the command buttonback to red
    17511746
    1752 %-------------------------------------------------------------------
     1747%------------------------------------------------------------------------
    17531748function STOP_Callback(hObject, eventdata, handles)
    1754 %-------------------------------------------------------------------
     1749%------------------------------------------------------------------------
    17551750set(handles.movie_pair,'BusyAction','Cancel')
    17561751set(handles.movie_pair,'value',0)
     
    17621757set(handles.MovieBackward,'BackgroundColor',[1 0 0])%paint the command buttonback to red
    17631758
    1764 %------------------------------------------------------------------
     1759%------------------------------------------------------------------------
    17651760function errormsg=runpm(hObject,eventdata,handles,increment)
    1766 %------------------------------------------------------------------
    1767 %check for mï¿œovie pair status
     1761%------------------------------------------------------------------------
     1762%check for movie pair status
    17681763movie_status=get(handles.movie_pair,'Value');
    17691764if isequal(movie_status,1)
     
    17711766end
    17721767%read the data on the current input rootfile(s)
    1773 
    17741768[FileName,RootPath,filebase,FileIndices,FileExt,subdir]=read_file_boxes(handles);
    17751769NomType=get(handles.FileIndex,'UserData');
     
    17921786    filename_1=[];
    17931787end   
    1794 
    17951788comp_input=get(handles.fix_pair,'Value');
    17961789
     
    18431836end
    18441837
    1845 
    1846 %-------------------------------------------------------
     1838%------------------------------------------------------------------------
    18471839% --- Executes on button press in movie_pair: create an alternating movie with two view
    1848 %-------------------------------------------------------
    18491840function movie_pair_Callback(hObject, eventdata, handles)
     1841%------------------------------------------------------------------------
    18501842status=get(handles.movie_pair,'value');
    18511843if isequal(status,0)
     
    36753667       set(handles.num_MaxVec,'String','1')
    36763668       set(handles.num_ColCode1,'String','0.333')
    3677        colcode1_Callback(hObject, eventdata, handles)
     3669       num_ColCode1_Callback(hObject, eventdata, handles)
    36783670       set(handles.num_ColCode2,'String','0.666')
    3679        colcode2_Callback(hObject, eventdata, handles)
     3671       num_ColCode2_Callback(hObject, eventdata, handles)
    36803672   else
    36813673       set(handles.CheckFixVecColor,'Value',1)%auto scale between min,max by default
     
    37073699    set(handles.num_ColCode2,'String',num2str(col))
    37083700end
    3709 colcode1_Callback(hObject, eventdata, handles)
     3701num_ColCode1_Callback(hObject, eventdata, handles)
    37103702
    37113703%----------------------------------------------------------------
     
    37223714    set(handles.num_ColCode1,'String',num2str(col))
    37233715end
    3724 colcode2_Callback(hObject, eventdata, handles)
     3716num_ColCode2_Callback(hObject, eventdata, handles)
    37253717
    37263718%----------------------------------------------------------------
    3727 %execute on return carriage on the edit box corresponding to slider 1
     3719% --- Execute on return carriage on the edit box corresponding to slider 1
    37283720%----------------------------------------------------------------
    3729 function num_ColCode1_Callback(hObject, eventdata, handles)
    3730 % col=str2num(get(handles.num_ColCode1,'String'));
    3731 % set(handles.Slider1,'Value',col)
     3721function num_ColCode1_Callback(hObject, eventdata, handles)
    37323722set_vec_col_bar(handles)
    37333723update_plot(handles);
    37343724
    37353725%----------------------------------------------------------------
    3736 %execute on return carriage on the edit box corresponding to slider 2
     3726% --- Execute on return carriage on the edit box corresponding to slider 2
    37373727%----------------------------------------------------------------
    37383728function 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)
    37423729set_vec_col_bar(handles)
    37433730update_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%------------------------------------------------------------------------
    37633732%-------------------------------------------------------
    37643733% --- Executes on button press in CheckFixVecColor.
     
    37713740function transform_fct_Callback(hObject, eventdata, handles)
    37723741%-------------------------------------------------------------
    3773 
    37743742UvData=get(handles.uvmat,'UserData');
    37753743menu=get(handles.transform_fct,'String');
Note: See TracChangeset for help on using the changeset viewer.