- Timestamp:
- May 16, 2012, 10:15:39 AM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_down.m
r413 r424 275 275 UvData.Object{IndexObj}.Name=list_str{IndexObj}; 276 276 end 277 h_set_object=findobj(allchild(0),'Tag','set_object');278 if ~isempty(h_set_object)279 delete(h_set_object)280 end277 % h_set_object=findobj(allchild(0),'Tag','set_object'); 278 % if ~isempty(h_set_object) 279 % delete(h_set_object) 280 % end 281 281 set_object(UvData.Object{IndexObj}) 282 282 axes(hchild);%set back the current axes haxes -
trunk/src/set_object.m
r413 r424 180 180 if ~isempty(huvmat) 181 181 hhuvmat=guidata(huvmat); 182 set(hhuvmat.ViewObject_1,'value',0)% desactivate the two view buttons182 % set(hhuvmat.ViewObject_1,'value',0)% desactivate the two view buttons 183 183 set(hhuvmat.ViewObject,'value',0)% 184 184 set(hhuvmat.edit_object,'Value',0)% desactivate the edit option -
trunk/src/uvmat.m
r423 r424 229 229 %% set functions for the mouse and keyboard 230 230 % set(handles.histo_u,'NextPlot','replacechildren'); 231 set(handles.histo_v,'NextPlot','replacechildren');231 % set(handles.histo_v,'NextPlot','replacechildren'); 232 232 set(hObject,'KeyPressFcn',{'keyboard_callback',handles})%set keyboard action function 233 233 set(hObject,'WindowButtonMotionFcn',{'mouse_motion',handles})%set mouse action functio … … 238 238 %% refresh projection plane 239 239 UvData.Object{1}.ProjMode='projection';%main plotting plane 240 set(handles.ListObject,'Value',1)% default: empty projection objectproj_field 241 set(handles.ListObject,'String',{'plane_0'}) 240 242 set(handles.ListObject_1,'Value',1)% default: empty projection objectproj_field 241 set(handles.ListObject_1,'String',{' '})243 set(handles.ListObject_1,'String',{'plane_0'}) 242 244 set(handles.Fields,'Value',1) 243 245 set(handles.Fields,'string',{''}) … … 799 801 set(handles.MenuExportMovie,'Enable','on') 800 802 set(handles.MenuTools,'Enable','on') 801 set(handles.OBJECT_txt,'Visible','on')802 set(handles.edit_object,'Visible','on')803 set(handles.ListObject_1,'Visible','on')804 set(handles.ViewObject_1,'Visible','on')805 set(handles.frame_object,'Visible','on')803 % set(handles.OBJECT_txt,'Visible','on') 804 % set(handles.edit_object,'Visible','on') 805 % set(handles.ListObject_1,'Visible','on') 806 % set(handles.ViewObject,'Visible','on') 807 % set(handles.frame_object,'Visible','on') 806 808 807 809 % initiate input file series and refresh the current field view: … … 2408 2410 end 2409 2411 VarIndex=CellVarIndex{imax}; % list of variable indices 2410 DimIndex=VarDimIndex{VarIndex(1)}; %list of dim indices for the variable 2411 nbpoints_x=DimValue(DimIndex(NbDim)); 2412 XMax=nbpoints_x;%default 2413 XMin=1;%default 2412 DimIndex=VarDimIndex{VarIndex(1)}; %list of dim indices for the variable 2413 nbpoints_x=DimValue(DimIndex(NbDim)); 2414 XMax=nbpoints_x;%default 2415 XMin=1;%default 2416 end 2417 %% object visibility 2418 if NbDim>=2 2419 set(handles.Objects,'Visible','on') 2420 set(handles.ListObject_1_title,'Visible','on') 2421 set(handles.ListObject_1,'Visible','on') 2422 else% usual (x,y) plots: no projection object 2423 set(handles.Objects,'Visible','off') 2424 set(handles.ListObject_title,'Visible','off') 2425 set(handles.ListObject_1,'Visible','off') 2414 2426 end 2415 2427 if NbDim==3 … … 2691 2703 %% prepare the menus of histograms and plot them (histogram of the whole volume in 3D case) 2692 2704 menu_histo=(UvData.Field.ListVarName)';%list of field variables to be displayed for the menu of histogram display 2693 ind_bad=[]; 2694 nb_histo=1; 2695 2705 ind_skip=[]; 2706 % nb_histo=1; 2707 Ustring=''; 2708 Vstring=''; 2696 2709 % suppress coordinates from the histogram menu 2697 for ivar=1:numel(menu_histo)%l loop on field variables: 2710 for ivar=1:numel(menu_histo)%l loop on field variables: 2698 2711 if isfield(UvData.Field,'VarAttribute') && numel(UvData.Field.VarAttribute)>=ivar && isfield(UvData.Field.VarAttribute{ivar},'Role') 2699 2712 Role=UvData.Field.VarAttribute{ivar}.Role; 2700 2713 switch Role 2701 2714 case {'coord_x','coord_y','coord_z','dimvar'} 2702 ind_bad=[ind_bad ivar]; 2715 ind_skip=[ind_skip ivar]; 2716 case {'vector_x'} 2717 Ustring=UvData.Field.ListVarName{ivar}; 2718 ind_skip=[ind_skip ivar]; 2703 2719 case {'vector_y'} 2704 nb_histo=nb_histo+1; 2720 Vstring=UvData.Field.ListVarName{ivar}; 2721 ind_skip=[ind_skip ivar]; 2705 2722 end 2706 2723 end … … 2713 2730 end 2714 2731 if strcmp(DimName,menu_histo{ivar}) 2715 ind_bad=[ind_bad ivar]; 2716 end 2717 end 2718 menu_histo(ind_bad)=[]; 2732 ind_skip=[ind_skip ivar]; 2733 end 2734 end 2735 menu_histo(ind_skip)=[];% remove skipped items 2736 if ~isempty(Ustring) 2737 menu_histo=[{[Ustring ',' Vstring]};menu_histo];% add U, V at the beginning if they exist 2738 end 2719 2739 2720 2740 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 2726 2746 histo1_menu_Callback(handles.histo1_menu, [], handles)% plot first histogram 2727 2747 % case of more than one variables (eg vector components) 2728 if nb_histo > 12729 test_v=1;2730 set(handles.histo2_menu,'Visible','on')2731 set(handles.histo_v,'Visible','on')2732 set(handles.histo2_menu,'String',menu_histo)2733 set(handles.histo2_menu,'Value',2)2734 histo2_menu_Callback(handles.histo2_menu,[], handles)% plot second histogram2735 end2736 end 2737 if ~test_v2738 set(handles.histo2_menu,'Visible','off')2739 set(handles.histo_v,'Visible','off')2740 cla(handles.histo_v)2741 set(handles.histo2_menu,'Value',1)2742 end2748 % if nb_histo > 1 2749 % test_v=1; 2750 % set(handles.histo2_menu,'Visible','on') 2751 % set(handles.histo_v,'Visible','on') 2752 % set(handles.histo2_menu,'String',menu_histo) 2753 % set(handles.histo2_menu,'Value',2) 2754 % histo2_menu_Callback(handles.histo2_menu,[], handles)% plot second histogram 2755 % end 2756 end 2757 % if ~test_v 2758 % set(handles.histo2_menu,'Visible','off') 2759 % set(handles.histo_v,'Visible','off') 2760 % cla(handles.histo_v) 2761 % set(handles.histo2_menu,'Value',1) 2762 % end 2743 2763 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2744 2745 2746 2764 %------------------------------------------------------------------------ 2765 function histo1_menu_Callback(hObject, eventdata, handles) 2766 %-------------------------------------------- 2767 %plot first histo 2768 %huvmat=get(handles.histo1_menu,'parent'); 2769 histo_menu=get(handles.histo1_menu,'String'); 2770 histo_value=get(handles.histo1_menu,'Value'); 2771 FieldName=histo_menu{histo_value}; 2772 % update_histo(handles.histo_u,handles.uvmat,FieldName) 2773 % 2774 % %------------------------------------------------------------------------ 2775 % function histo2_menu_Callback(hObject, eventdata, handles) 2776 % %------------------------------------------------------------------------ 2777 % %plot second histo 2778 % %huvmat=get(handles.histo2_menu,'parent'); 2779 % histo_menu=get(handles.histo2_menu,'String'); 2780 % histo_value=get(handles.histo2_menu,'Value'); 2781 % FieldName=histo_menu{histo_value}; 2782 % update_histo(handles.histo_v,handles.uvmat,FieldName) 2783 % 2784 % %------------------------------------------------------------------------ 2785 % %read the field .Fieldname stored in UvData and plot its histogram 2786 % function update_histo(haxes,huvmat,FieldName) 2787 %------------------------------------------------------------------------ 2788 UvData=get(handles.uvmat,'UserData'); 2789 Field=UvData.Field; 2790 r=regexp(FieldName,'(?<var1>.*)(?<sep>,)(?<var2>.*)','names'); 2791 FieldName_2=''; 2792 if ~isempty(r) 2793 FieldName=r.var1; 2794 FieldName_2=r.var2; 2795 end 2796 if ~isfield(UvData.Field,FieldName) 2797 msgbox_uvmat('ERROR',['no field ' FieldName ' for histogram']) 2798 return 2799 end 2800 FieldHisto=Field.(FieldName); 2801 if isfield(Field,'FF') && ~isempty(Field.FF) && isequal(size(Field.FF),size(FieldHisto)) 2802 indsel=find(Field.FF==0);%find values marked as false 2803 if ~isempty(indsel) 2804 FieldHisto=FieldHisto(indsel); 2805 if ~isempty(FieldName_2) 2806 FieldHisto(:,:,2)=Field.(FieldName_2)(indsel); 2807 end 2808 end 2809 end 2810 if isempty(Field) 2811 msgbox_uvmat('ERROR',['empty field ' FieldName]) 2812 else 2813 nxy=size(FieldHisto); 2814 Amin=double(min(min(min(FieldHisto))));%min of field value 2815 Amax=double(max(max(max(FieldHisto))));%max of field value 2816 if isequal(Amin,Amax) 2817 cla(handles.histo_u) 2818 else 2819 Histo.ListVarName={FieldName,'histo'}; 2820 if isfield(Field,'NbDim') && isequal(Field.NbDim,3) 2821 Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram 2822 else 2823 if numel(nxy)==2 2824 Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram 2825 else 2826 Histo.VarDimName={FieldName,{FieldName,'component'}}; %dimensions for the histogram 2827 end 2828 end 2829 %unit 2830 units=[]; %default 2831 for ivar=1:numel(Field.ListVarName) 2832 if strcmp(Field.ListVarName{ivar},FieldName) 2833 if isfield(Field,'VarAttribute') && numel(Field.VarAttribute)>=ivar && isfield(Field.VarAttribute{ivar},'units') 2834 units=Field.VarAttribute{ivar}.units; 2835 break 2836 end 2837 end 2838 end 2839 if ~isempty(units) 2840 Histo.VarAttribute{1}.units=units; 2841 end 2842 eval(['Histo.' FieldName '=linspace(Amin,Amax,50);'])%absissa values for histo 2843 if isfield(Field,'NbDim') && isequal(Field.NbDim,3) 2844 C=reshape(double(FieldHisto),1,[]);% reshape in a vector 2845 Histo.histo(:,1)=hist(C, Histo.(FieldName)); %calculate histogram 2846 else 2847 for col=1:size(FieldHisto,3) 2848 B=FieldHisto(:,:,col); 2849 C=reshape(double(B),1,nxy(1)*nxy(2));% reshape in a vector 2850 Histo.histo(:,col)=hist(C, Histo.(FieldName)); %calculate histogram 2851 end 2852 end 2853 plot_field(Histo,handles.histo_u); 2854 end 2855 end 2747 2856 2748 2857 %------------------------------------------------------------------- … … 3492 3601 run0_Callback(hObject, eventdata, handles) 3493 3602 3494 %------------------------------------------------------------------------ 3495 function histo1_menu_Callback(hObject, eventdata, handles) 3496 %-------------------------------------------- 3497 %plot first histo 3498 %huvmat=get(handles.histo1_menu,'parent'); 3499 histo_menu=get(handles.histo1_menu,'String'); 3500 histo_value=get(handles.histo1_menu,'Value'); 3501 FieldName=histo_menu{histo_value}; 3502 update_histo(handles.histo_u,handles.uvmat,FieldName) 3503 3504 %------------------------------------------------------------------------ 3505 function histo2_menu_Callback(hObject, eventdata, handles) 3506 %------------------------------------------------------------------------ 3507 %plot second histo 3508 %huvmat=get(handles.histo2_menu,'parent'); 3509 histo_menu=get(handles.histo2_menu,'String'); 3510 histo_value=get(handles.histo2_menu,'Value'); 3511 FieldName=histo_menu{histo_value}; 3512 update_histo(handles.histo_v,handles.uvmat,FieldName) 3513 3514 %------------------------------------------------------------------------ 3515 %read the field .Fieldname stored in UvData and plot its histogram 3516 function update_histo(haxes,huvmat,FieldName) 3517 %------------------------------------------------------------------------ 3518 UvData=get(huvmat,'UserData'); 3519 if ~isfield(UvData.Field,FieldName) 3520 msgbox_uvmat('ERROR',['no field ' FieldName ' for histogram']) 3521 return 3522 end 3523 Field=UvData.Field; 3524 FieldHisto=eval(['Field.' FieldName]); 3525 if isfield(Field,'FF') && ~isempty(Field.FF) && isequal(size(Field.FF),size(FieldHisto)) 3526 indsel=find(Field.FF==0);%find values marked as false 3527 if ~isempty(indsel) 3528 FieldHisto=FieldHisto(indsel); 3529 end 3530 end 3531 if isempty(Field) 3532 msgbox_uvmat('ERROR',['empty field ' FieldName]) 3533 else 3534 nxy=size(FieldHisto); 3535 Amin=double(min(min(min(FieldHisto))));%min of image 3536 Amax=double(max(max(max(FieldHisto))));%max of image 3537 if isequal(Amin,Amax) 3538 %msgbox_uvmat('WARNING',['uniform field =' num2str(Amin)]); 3539 cla(haxes) 3540 else 3541 Histo.ListVarName={FieldName,'histo'}; 3542 if isfield(Field,'NbDim') && isequal(Field.NbDim,3) 3543 Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram 3544 else 3545 if numel(nxy)==2 3546 Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram 3547 else 3548 Histo.VarDimName={FieldName,{FieldName,'rgb'}}; %dimensions for the histogram 3549 end 3550 end 3551 %unit 3552 units=[]; %default 3553 for ivar=1:numel(Field.ListVarName) 3554 if strcmp(Field.ListVarName{ivar},FieldName) 3555 if isfield(Field,'VarAttribute') && numel(Field.VarAttribute)>=ivar && isfield(Field.VarAttribute{ivar},'units') 3556 units=Field.VarAttribute{ivar}.units; 3557 break 3558 end 3559 end 3560 end 3561 if ~isempty(units) 3562 Histo.VarAttribute{1}.units=units; 3563 end 3564 eval(['Histo.' FieldName '=linspace(Amin,Amax,50);'])%absissa values for histo 3565 if isfield(Field,'NbDim') && isequal(Field.NbDim,3) 3566 C=reshape(double(FieldHisto),1,[]);% reshape in a vector 3567 eval(['Histo.histo(:,1)=hist(C, Histo.' FieldName ');']); %calculate histogram 3568 else 3569 for col=1:size(FieldHisto,3) 3570 B=FieldHisto(:,:,col); 3571 C=reshape(double(B),1,nxy(1)*nxy(2));% reshape in a vector 3572 eval(['Histo.histo(:,col)=hist(C, Histo.' FieldName ');']); %calculate histogram 3573 end 3574 end 3575 plot_field(Histo,haxes); 3576 end 3577 end 3603 3578 3604 3579 3605 %------------------------------------------------ … … 3935 3961 ObjectData.Name=list_str{IndexObj}; 3936 3962 set_object(ObjectData,[],ZBounds); 3937 set(handles.ViewObject _1,'Value',1)% show that the selected object in ListObject_1 is currently visualised3963 set(handles.ViewObject,'Value',1)% show that the selected object in ListObject_1 is currently visualised 3938 3964 end 3939 3965 % desactivate the edit object mode … … 3962 3988 ObjectData.Name=list_str{IndexObj}; 3963 3989 set_object(ObjectData,[],ZBounds); 3964 set(handles.View Object,'Value',1)% show that the selected object in ListObject is currently visualised3990 set(handles.ViewField,'Value',1)% show that the selected object in ListObject is currently visualised 3965 3991 end 3966 3992 % desactivate the edit object mode … … 4038 4064 4039 4065 %------------------------------------------------------------------------ 4040 % --- Executes on button press in ViewObject _1.4041 function ViewObject_ 1_Callback(hObject, eventdata, handles)4042 %------------------------------------------------------------------------ 4043 check_view=get(handles.ViewObject _1,'Value');4066 % --- Executes on button press in ViewObject. 4067 function ViewObject_Callback(hObject, eventdata, handles) 4068 %------------------------------------------------------------------------ 4069 check_view=get(handles.ViewObject,'Value'); 4044 4070 4045 4071 if check_view %activate set_object 4046 set(handles.ViewObject,'Value',0)% deselect ViewObject 4047 IndexObj=get(handles.ListObject_1,'Value'); 4048 list_object=get(handles.ListObject_1,'String'); 4072 IndexObj=get(handles.ListObject,'Value'); 4073 list_object=get(handles.ListObject,'String'); 4049 4074 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4050 4075 UvData.Object{IndexObj}.Name=list_object{IndexObj}; … … 4058 4083 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider 4059 4084 end 4060 set(handles.ListObject_1,'Value',IndexObj);%restore ListObject selection after set_object deletion4085 % set(handles.ListObject_1,'Value',IndexObj);%restore ListObject selection after set_object deletion 4061 4086 data=UvData.Object{IndexObj}; 4062 4087 if ~isfield(data,'Type')% default plane … … 4086 4111 if get(handles.edit_object,'Value')% edit mode 4087 4112 set(hhset_object.PLOT,'Enable','on') 4113 set(get(hset_object,'children'),'enable','on') 4088 4114 else 4089 4115 set(hhset_object.PLOT,'Enable','off') 4116 set(get(hset_object,'children'),'enable','off') 4090 4117 end 4091 4118 else … … 4096 4123 end 4097 4124 4098 %------------------------------------------------------------------------4099 % --- Executes on button press in ViewObject.4100 function ViewObject_Callback(hObject, eventdata, handles)4101 %------------------------------------------------------------------------4102 check_view=get(handles.ViewObject,'Value');4103 4104 if check_view4105 set(handles.ViewObject_1,'Value',0)% unselect ViewObject_14106 IndexObj=get(handles.ListObject,'Value');4107 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface4108 if numel(UvData.Object)<IndexObj(end);% error in UvData4109 msgbox_uvmat('ERROR','invalid object list')4110 return4111 end4112 ZBounds=0; % default4113 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax')4114 ZBounds(1)=UvData.Field.ZMin; %minimum for the Z slider4115 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider4116 end4117 set(handles.ListObject,'Value',IndexObj);%restore ListObject selection after set_object deletion4118 if ~isfield(UvData.Object{IndexObj(1)},'Type')% default plane4119 UvData.Object{IndexObj(1)}.Type='plane';4120 end4121 list_object=get(handles.ListObject,'String');4122 UvData.Object{IndexObj(end)}.Name=list_object{IndexObj(end)};4123 hset_object=set_object(UvData.Object{IndexObj(end)},[],ZBounds);4124 hhset_object=guidata(hset_object);4125 if get(handles.edit_object,'Value')% edit mode4126 set(hhset_object.PLOT,'Enable','on')4127 else4128 set(hhset_object.PLOT,'Enable','off')4129 end4130 4131 %% show the second plot (on view_field)4132 ProjData= proj_field(UvData.Field,UvData.Object{IndexObj});%project the current field on ObjectData4133 hview_field=findobj(allchild(0),'tag','view_field');4134 if isempty(hview_field)4135 hview_field=view_field;4136 end4137 PlotHandles=guidata(hview_field);4138 plot_field(ProjData,PlotHandles.axes3,read_GUI(hview_field));%read plotting parameters on the uvmat interfacPlotHandles);4139 else4140 hset_object=findobj(allchild(0),'tag','set_object');4141 if ~isempty(hset_object)4142 delete(hset_object)% delete existing version of set_object4143 end4144 end4145 4125 %------------------------------------------------------------------- 4146 4126 % --- Executes on selection change in edit_object. … … 4148 4128 %------------------------------------------------------------------- 4149 4129 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4130 hset_object=findobj(allchild(0),'Tag','set_object'); 4150 4131 if get(handles.edit_object,'Value') 4151 4132 set(handles.edit_object,'BackgroundColor',[1,1,0]) … … 4159 4140 set(hhgeometry_calib.edit_append,'BackgroundColor',[0.7 0.7 0.7]) 4160 4141 end 4161 hset_object=findobj(allchild(0),'Tag','set_object'); 4162 if isempty(hset_object)% open the GUI set_object with data of the currently selected object 4163 ViewObject_Callback(hObject, eventdata, handles) 4164 hset_object=findobj(allchild(0),'Tag','set_object'); 4165 end 4166 hhset_object=guidata(hset_object); 4167 set(hhset_object.PLOT,'enable','on'); 4168 else 4142 set(handles.ViewObject,'value',1) 4143 ViewObject_Callback(hObject, eventdata, handles) 4144 % if isempty(hset_object)% open the GUI set_object with data of the currently selected object 4145 % ViewObject_Callback(hObject, eventdata, handles) 4146 % % hset_object=findobj(allchild(0),'Tag','set_object'); 4147 % else 4148 % hhset_object=guidata(hset_object); 4149 % set(hhset_object.PLOT,'enable','on'); 4150 % set(get(hset_object,'children'),'enable','on') 4151 % end 4152 else % desctivate object edit mode 4169 4153 set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 4170 hset_object=findobj(allchild(0),'Tag','set_object');4171 4154 if ~isempty(hset_object)% open the 4172 4155 hhset_object=guidata(hset_object); 4173 4156 set(hhset_object.PLOT,'enable','off'); 4174 end 4175 end 4157 set(get(hset_object,'children'),'enable','inactive') 4158 end 4159 end 4160 4161 %------------------------------------------------------------------------ 4162 % --- Executes on button press in ViewField. 4163 function ViewField_Callback(hObject, eventdata, handles) 4164 %------------------------------------------------------------------------ 4165 check_view=get(handles.ViewField,'Value'); 4166 4167 if check_view 4168 % set(handles.ViewObject,'Value',0)% unselect ViewObject_1 4169 IndexObj=get(handles.ListObject,'Value'); 4170 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4171 if numel(UvData.Object)<IndexObj(end);% error in UvData 4172 msgbox_uvmat('ERROR','invalid object list') 4173 return 4174 end 4175 ZBounds=0; % default 4176 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax') 4177 ZBounds(1)=UvData.Field.ZMin; %minimum for the Z slider 4178 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider 4179 end 4180 set(handles.ListObject,'Value',IndexObj);%restore ListObject selection after set_object deletion 4181 if ~isfield(UvData.Object{IndexObj(1)},'Type')% default plane 4182 UvData.Object{IndexObj(1)}.Type='plane'; 4183 end 4184 list_object=get(handles.ListObject,'String'); 4185 UvData.Object{IndexObj(end)}.Name=list_object{IndexObj(end)}; 4186 % hset_object=set_object(UvData.Object{IndexObj(end)},[],ZBounds); 4187 % hhset_object=guidata(hset_object); 4188 % if get(handles.edit_object,'Value')% edit mode 4189 % set(hhset_object.PLOT,'Enable','on') 4190 % set(get(hset_object,'children'),'enable','on') 4191 % else 4192 % set(hhset_object.PLOT,'Enable','off') 4193 % set(get(hset_object,'children'),'enable','inactive') 4194 % end 4195 4196 %% show the second plot (on view_field) 4197 ProjData= proj_field(UvData.Field,UvData.Object{IndexObj});%project the current field on ObjectData 4198 hview_field=findobj(allchild(0),'tag','view_field'); 4199 if isempty(hview_field) 4200 hview_field=view_field; 4201 end 4202 PlotHandles=guidata(hview_field); 4203 plot_field(ProjData,PlotHandles.axes3,read_GUI(hview_field));%read plotting parameters on the uvmat interfacPlotHandles); 4204 else 4205 hview_field=findobj(allchild(0),'tag','view_field'); 4206 if ~isempty(hview_field) 4207 delete(hview_field)% delete existing version of set_object 4208 end 4209 end 4210 4176 4211 4177 4212 %------------------------------------------------------------------------ … … 4439 4474 end 4440 4475 set(handles.ListObject,'Visible','on') 4441 set(handles.View Object,'Visible','on')4442 set(handles.View Object,'Value',1) % indicate that the object selected in ListObject (projection oin view_field) is visualised4443 set(handles.ViewObject _1,'Value',0)% then the object selected in ListObject_1 is not visualised4476 set(handles.ViewField,'Visible','on') 4477 set(handles.ViewField,'Value',1) % indicate that the object selected in ListObject (projection oin view_field) is visualised 4478 set(handles.ViewObject,'Value',0)% then the object selected in ListObject_1 is not visualised 4444 4479 hset_object=set_object(data,handles);% call the set_object interface 4445 4480 hhset_object=guidata(hset_object); … … 4753 4788 % Hints: get(hObject,'Value') returns position of slider 4754 4789 % get(hObject,'Min') and get(hObject,'Max') to determine range of slider 4755
Note: See TracChangeset
for help on using the changeset viewer.