Changeset 191 for trunk/src/uvmat.m
- Timestamp:
- Feb 5, 2011, 11:25:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r187 r191 309 309 set(handles.transform_fct,'UserData',fct_handle)% store the list of path in UserData of ACTION 310 310 set(handles.uvmat,'UserData',UvData) 311 %initiates menu of vector colors 312 % list_menu=calc_field; 313 % %list_menu=[{'ima_cor'};{'black'};{'white'};list_menu(3:end)]; 314 % set(handles.col_vec,'String',list_menu) 311 %set(handles.FixEqual,'Value',1)% by default: axes free to adapt in aspect ratio 312 %set(handles.FixEqual,'BackgroundColor',[1 1 0]) 315 313 316 314 %check the path and date of modification of all functions in uvmat … … 352 350 testinputfield=1; 353 351 end 354 % if ~isempty(Field)355 % menu_str=update_menu(handles.Fields,'get_field...');356 % % set(handles.Fields,'Value',1)357 % % set(handles.Fields,'String',{'get_field...'})358 % testinputfield=1;359 % elseif ischar(input)360 % scan_i_Callback(handles.scan_i, eventdata, handles);361 % end362 352 else 363 353 if ishandle(handles.UVMAT_title) … … 749 739 drawnow 750 740 if isfield(XmlData, 'GeometryCalib') && ~isempty(XmlData.GeometryCalib) 741 XmlData.GeometryCalib 742 if isfield(XmlData.GeometryCalib,'VolumeScan') && isequal(XmlData.GeometryCalib.VolumeScan,'y') 743 'TESTvol' 744 set (handles.nb_slice,'String','volume') 745 end 751 746 hgeometry_calib=findobj('tag','geometry_calib'); 752 747 if ~isempty(hgeometry_calib) … … 837 832 set(handles.pycm,'String',num2str(pixcmy)) 838 833 end 839 if ~get(handles.Fix edLimits,'Value')834 if ~get(handles.FixLimits,'Value') 840 835 set(handles.transform_fct,'Value',2); % phys transform by default if fixedLimits is off 841 836 end … … 848 843 set(handles.slices,'Value',1) 849 844 end 850 if isfield(GeometryCalib,' NbSlice') && isequal(GeometryCalib.NbSlice,'volume')845 if isfield(GeometryCalib,'VolumeScan') && isequal(GeometryCalib.VolumeScan,'y') 851 846 set(handles.nb_slice,'String','volume') 852 847 else … … 2098 2093 %update the z position index 2099 2094 nbslice_str=get(handles.nb_slice,'String'); 2100 if isequal(nbslice_str,'volume') 2095 if isequal(nbslice_str,'volume')%NOT USED 2101 2096 z_index=num_j1; 2102 2097 set(handles.z_index,'String',num2str(z_index)) … … 2523 2518 UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 2524 2519 end 2520 testnewseries=UvData.NewSeries; 2525 2521 UvData.NewSeries=0;% put to 0 the test for a new field series (set by RootPath_callback) 2526 2522 set(handles.uvmat,'UserData',UvData) … … 2543 2539 haxes(1)=handles.axes3; 2544 2540 PlotParam{1}=read_plot_param(handles);%read plotting parameters on the uvmat interfac 2545 keeplim(1)=get(handles.Fix edLimits,'Value');% test for fixed graph limits2541 keeplim(1)=get(handles.FixLimits,'Value');% test for fixed graph limits 2546 2542 PosColorbar{1}=UvData.OpenParam.PosColorbar;%prescribe the colorbar position on the uvmat interface 2547 2543 … … 2564 2560 iobj=IndexObj(imap); 2565 2561 [ObjectData,errormsg]=proj_field(UvData.Field,UvData.Object{iobj});% project field on the object 2562 if testnewseries && isfield(ObjectData,'CoordUnit') 2563 PlotParam{imap}=rmfield(PlotParam{imap},'FixEqual'); %set FixEqual to depend on the field (=1 if Data.CoordUnit=1 in plot_field) 2564 end 2566 2565 if ~isempty(errormsg) 2567 2566 return … … 2610 2609 ObjectData.DimValue(ind_off)=[]; 2611 2610 end 2612 end 2613 2611 end 2614 2612 if ~isempty(ObjectData) 2615 2613 PlotType='none'; %default … … 2622 2620 ObjectData.Mesh=Field.Mesh; % gives an estimated mesh size (useful for mouse action on the plot) 2623 2621 end 2624 % if imap==12625 % UvData.axes3=ObjectData;2626 % else2627 % ViewFieldData=get(view_field_handle,'UserData');2628 % ViewFieldData.axes3=ObjectData;2629 % set(view_field_handle,'UserData',ViewFieldData)2630 % end2631 2622 end 2632 2623 if isequal(PlotType,'none') … … 2640 2631 end 2641 2632 end 2642 2643 2633 2644 2634 %% update the mask … … 2764 2754 2765 2755 %------------------------------------------------------------------- 2766 % --- Executes on button press in 'Fix edLimits'.2767 %------------------------------------------------------------------- 2768 function Fix edLimits_Callback(hObject, eventdata, handles)2769 test=get(handles.Fix edLimits,'Value');2756 % --- Executes on button press in 'FixLimits'. 2757 %------------------------------------------------------------------- 2758 function FixLimits_Callback(hObject, eventdata, handles) 2759 test=get(handles.FixLimits,'Value'); 2770 2760 if test 2771 set(handles.Fix edLimits,'BackgroundColor',[1 1 0])2772 else 2773 set(handles.Fix edLimits,'BackgroundColor',[0.7 0.7 0.7])2761 set(handles.FixLimits,'BackgroundColor',[1 1 0]) 2762 else 2763 set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7]) 2774 2764 update_plot(handles); 2775 2765 end 2776 2766 2777 2767 %------------------------------------------------------------------- 2778 % --- Executes on button press in auto_xy.2779 function auto_xy_Callback(hObject, eventdata, handles)2780 test=get(handles. auto_xy,'Value');2768 % --- Executes on button press in FixEqual. 2769 function FixEqual_Callback(hObject, eventdata, handles) 2770 test=get(handles.FixEqual,'Value'); 2781 2771 if test 2782 set(handles. auto_xy,'BackgroundColor',[1 1 0])2772 set(handles.FixEqual,'BackgroundColor',[1 1 0]) 2783 2773 cla(handles.axes3) 2784 2774 update_plot(handles); 2785 2775 else 2786 set(handles. auto_xy,'BackgroundColor',[0.7 0.7 0.7])2776 set(handles.FixEqual,'BackgroundColor',[0.7 0.7 0.7]) 2787 2777 update_plot(handles); 2788 2778 % axis(handles.axes3,'image') … … 2799 2789 if (get(handles.zoom,'Value') == 1); 2800 2790 set(handles.zoom,'BackgroundColor',[1 1 0]) 2801 set(handles.Fix edLimits,'Value',1)% propose by default fixed limits for the plotting axes2802 set(handles.Fix edLimits,'BackgroundColor',[1 1 0])2791 set(handles.FixLimits,'Value',1)% propose by default fixed limits for the plotting axes 2792 set(handles.FixLimits,'BackgroundColor',[1 1 0]) 2803 2793 else 2804 2794 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7]) … … 3148 3138 setfield(handles);% update the field structure ('civ1'....) 3149 3139 3150 if ~ isfield(UvData,'NewSeries')||isequal(UvData.NewSeries,0)3140 if ~(isfield(UvData,'NewSeries')&&isequal(UvData.NewSeries,1)) 3151 3141 run0_Callback(hObject, eventdata, handles) 3152 3142 end … … 3353 3343 set(handles.uvmat,'UserData',UvData) 3354 3344 setfield(handles);% update the field structure ('civ1'....) 3355 if ~ isfield(UvData,'NewSeries')||isequal(UvData.NewSeries,0)3345 if ~(isfield(UvData,'NewSeries')&&isequal(UvData.NewSeries,1)) 3356 3346 run0_Callback(hObject, eventdata, handles) 3357 3347 end … … 3883 3873 end 3884 3874 3885 set(handles.Fix edLimits,'Value',0)3886 set(handles.Fix edLimits,'BackgroundColor',[0.7 0.7 0.7])3875 set(handles.FixLimits,'Value',0) 3876 set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7]) 3887 3877 3888 3878 UvData=get(huvmat,'UserData'); … … 4004 3994 % set(haxes,'XLimMode','auto')%reset auto mode (after zoom effect) 4005 3995 % set(haxes,'YLimMode','auto') 4006 PlotParam.Auto_xy=1; 4007 plot_field(Histo,haxes,PlotParam); 4008 end 4009 end 4010 4011 3996 % PlotParam.Auto_xy=1; 3997 plot_field(Histo,haxes); 3998 end 3999 end 4012 4000 4013 4001 %------------------------------------------------ 4014 4002 %CALLBACKS FOR PLOTTING PARAMETERS 4015 4003 %------------------------------------------------- 4004 %----------------------------------------------------------------- 4005 function MinX_Callback(hObject, eventdata, handles) 4006 %------------------------------------------ 4007 set(handles.FixLimits,'Value',1) %suppress auto mode 4008 set(handles.FixLimits,'BackgroundColor',[1 1 0]) 4009 update_plot(handles); 4010 4011 %----------------------------------------------------------------- 4012 function MaxX_Callback(hObject, eventdata, handles) 4013 %------------------------------------------ 4014 set(handles.FixLimits,'Value',1) %suppress auto mode 4015 set(handles.FixLimits,'BackgroundColor',[1 1 0]) 4016 update_plot(handles); 4017 4018 %----------------------------------------------------------------- 4019 function MinY_Callback(hObject, eventdata, handles) 4020 %------------------------------------------ 4021 set(handles.FixLimits,'Value',1) %suppress auto mode 4022 set(handles.FixLimits,'BackgroundColor',[1 1 0]) 4023 update_plot(handles); 4024 4025 %----------------------------------------------------------------- 4026 function MaxY_Callback(hObject, eventdata, handles) 4027 %------------------------------------------ 4028 set(handles.FixLimits,'Value',1) %suppress auto mode 4029 set(handles.FixLimits,'BackgroundColor',[1 1 0]) 4030 update_plot(handles); 4016 4031 4017 4032 %----------------------------------------------------------------- 4018 4033 function MinA_Callback(hObject, eventdata, handles) 4019 4034 %------------------------------------------ 4020 set(handles. AutoScal,'Value',1) %suppress auto mode4021 set(handles. AutoScal,'BackgroundColor',[1 1 0])4035 set(handles.FixScal,'Value',1) %suppress auto mode 4036 set(handles.FixScal,'BackgroundColor',[1 1 0]) 4022 4037 update_plot(handles); 4023 4038 … … 4025 4040 function MaxA_Callback(hObject, eventdata, handles) 4026 4041 %-------------------------------------------- 4027 set(handles. AutoScal,'Value',1) %suppress auto mode4028 set(handles. AutoScal,'BackgroundColor',[1 1 0])4042 set(handles.FixScal,'Value',1) %suppress auto mode 4043 set(handles.FixScal,'BackgroundColor',[1 1 0]) 4029 4044 update_plot(handles); 4030 4045 4031 4046 %----------------------------------------------- 4032 function AutoScal_Callback(hObject, eventdata, handles)4047 function FixScal_Callback(hObject, eventdata, handles) 4033 4048 %-------------------------------------------- 4034 test=get(handles. AutoScal,'Value');4049 test=get(handles.FixScal,'Value'); 4035 4050 if test 4036 set(handles. AutoScal,'BackgroundColor',[1 1 0])4037 else 4038 set(handles. AutoScal,'BackgroundColor',[0.7 0.7 0.7])4051 set(handles.FixScal,'BackgroundColor',[1 1 0]) 4052 else 4053 set(handles.FixScal,'BackgroundColor',[0.7 0.7 0.7]) 4039 4054 update_plot(handles); 4040 4055 end … … 4076 4091 function VecScale_Callback(hObject, eventdata, handles) 4077 4092 %------------------------------------------------------------------- 4078 set(handles. AutoVec,'Value',1);4079 set(handles. AutoVec,'BackgroundColor',[1 1 0])4093 set(handles.FixVec,'Value',1); 4094 set(handles.FixVec,'BackgroundColor',[1 1 0]) 4080 4095 update_plot(handles); 4081 4096 4082 4097 %------------------------------------------------------------------- 4083 function AutoVec_Callback(hObject, eventdata, handles)4084 %------------------------------------------------------------------- 4085 test=get(handles. AutoVec,'Value');4098 function FixVec_Callback(hObject, eventdata, handles) 4099 %------------------------------------------------------------------- 4100 test=get(handles.FixVec,'Value'); 4086 4101 if test 4087 set(handles. AutoVec,'BackgroundColor',[1 1 0])4102 set(handles.FixVec,'BackgroundColor',[1 1 0]) 4088 4103 else 4089 4104 update_plot(handles); 4090 4105 %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3)) 4091 set(handles. AutoVec,'BackgroundColor',[0.7 0.7 0.7])4106 set(handles.FixVec,'BackgroundColor',[0.7 0.7 0.7]) 4092 4107 end 4093 4108 … … 4187 4202 AxeData=UvData.axes3; 4188 4203 PlotParam=read_plot_param(handles); 4204 PlotParam.Scalar 4189 4205 [PP,PlotParamOut]= plot_field(AxeData,haxes,PlotParam); 4190 4206 write_plot_param(handles,PlotParamOut); %update the auto plot parameters … … 4308 4324 PlotHandles=guidata(hview_field); 4309 4325 end 4310 % if ~isempty(ProjData) 4311 'TEST' 4312 ProjData 4313 plot_field(ProjData,PlotHandles.axes3,PlotHandles); 4314 % end 4326 plot_field(ProjData,PlotHandles.axes3,PlotHandles); 4315 4327 set(handles.uvmat,'UserData',UvData) 4316 4328 hother=findobj('Tag','proj_object');%find all the proj objects … … 4982 4994 delete_object(IndexObj) 4983 4995 end 4984 4985 4986 4987 4988 4996 4997
Note: See TracChangeset
for help on using the changeset viewer.