Changeset 61
- Timestamp:
- Mar 24, 2010, 12:51:51 AM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r60 r61 43 43 % Edit the above text to modify the response to help geometry_calib 44 44 45 % Last Modified by GUIDE v2.5 23-Mar-2010 06:22:3345 % Last Modified by GUIDE v2.5 23-Mar-2010 16:19:01 46 46 47 47 % Begin initialization code - DO NOT edit … … 148 148 %case of calibration (ImaDoc) input file 149 149 % hcalib=get(handles.calib_type,'parent'); 150 CalibData=get(handles. figure1,'UserData');150 CalibData=get(handles.geometry_calib,'UserData'); 151 151 CalibData.XmlInput=fileinput; 152 152 if isfield(s,'Heading') … … 154 154 end 155 155 156 set(handles. figure1,'UserData',CalibData);%store the heading in the interface 'UserData'156 set(handles.geometry_calib,'UserData',CalibData);%store the heading in the interface 'UserData' 157 157 if isfield(s,'GeometryCalib') 158 158 Calib=s.GeometryCalib; … … 312 312 delete(h_dataview) 313 313 end 314 CalibData=get(handles. figure1,'UserData');%read the calibration image source on the interface userdata314 CalibData=get(handles.geometry_calib,'UserData');%read the calibration image source on the interface userdata 315 315 316 316 if isfield(CalibData,'XmlInput') … … 791 791 set(hh,'YData',ObjectData.Coord(:,2)) 792 792 end 793 pause(.1) 794 figure(handles.geometry_calib) 793 795 794 796 % -------------------------------------------------------------------- … … 807 809 %------------------------------------------------------------------------ 808 810 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib 809 CalibData=get(handles. figure1,'UserData');811 CalibData=get(handles.geometry_calib,'UserData'); 810 812 Tinput=[];%default 811 813 if isfield(CalibData,'grid') … … 813 815 end 814 816 [T,CalibData.grid]=create_grid(grid_input);%display the GUI create_grid 815 set(handles. figure1,'UserData',CalibData)817 set(handles.geometry_calib,'UserData',CalibData) 816 818 817 819 %grid in phys space … … 844 846 %----------------------------------------------------------------------- 845 847 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib 846 CalibData=get(handles. figure1,'UserData');848 CalibData=get(handles.geometry_calib,'UserData'); 847 849 Tinput=[];%default 848 850 if isfield(CalibData,'translate') … … 851 853 T=translate_points(Tinput);%display translate_points GUI and get shift parameters 852 854 CalibData.translate=T; 853 set(handles. figure1,'UserData',CalibData)855 set(handles.geometry_calib,'UserData',CalibData) 854 856 %translation 855 857 Coord_cell=get(handles.ListCoord,'String'); … … 872 874 function MenuRotatePoints_Callback(hObject, eventdata, handles) 873 875 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib 874 CalibData=get(handles. figure1,'UserData');876 CalibData=get(handles.geometry_calib,'UserData'); 875 877 Tinput=[];%default 876 878 if isfield(CalibData,'rotate') … … 879 881 T=rotate_points(Tinput);%display translate_points GUI and get shift parameters 880 882 CalibData.rotate=T; 881 set(handles. figure1,'UserData',CalibData)883 set(handles.geometry_calib,'UserData',CalibData) 882 884 %----------------------------------------------------- 883 885 %rotation … … 915 917 function MenuDetectGrid_Callback(hObject, eventdata, handles) 916 918 917 CalibData=get(handles. figure1,'UserData');919 CalibData=get(handles.geometry_calib,'UserData'); 918 920 grid_input=[];%default 919 921 if isfield(CalibData,'grid') … … 921 923 end 922 924 [T,CalibData.grid]=create_grid(grid_input);%display the GUI create_grid 923 set(handles. figure1,'UserData',CalibData)%store the phys grid for later use925 set(handles.geometry_calib,'UserData',CalibData)%store the phys grid for later use 924 926 925 927 %read the four last point coordiantes in pixels … … 978 980 [Amax,ind_x_max]=max(x_profile); 979 981 [Amax,ind_y_max]=max(y_profile); 980 Delta(ipoint,1)=(ind_x_max-ind_range-1)*Dx;%shift from the initial guess 981 Delta(ipoint,2)=(ind_y_max-ind_range-1)*Dy; 982 %sub-pixel improvement using moments 983 x_shift=0; 984 y_shift=0; 985 if ind_x_max+2<=2*ind_range+1 && ind_x_max-2>=1 986 Atop=x_profile(ind_x_max-2:ind_x_max+2); 987 x_shift=sum(Atop.*[-2 -1 0 1 2])/sum(Atop); 988 end 989 if ind_y_max+2<=2*ind_range+1 && ind_y_max-2>=1 990 Atop=y_profile(ind_y_max-2:ind_y_max+2); 991 y_shift=sum(Atop.*[-2 -1 0 1 2]')/sum(Atop); 992 end 993 Delta(ipoint,1)=(x_shift+ind_x_max-ind_range-1)*Dx;%shift from the initial guess 994 Delta(ipoint,2)=(y_shift+ind_y_max-ind_range-1)*Dy; 982 995 end 983 996 Tmod=T(:,(1:2))+Delta; -
trunk/src/get_plot_handles.m
r40 r61 11 11 function PlotHandles=get_plot_handles(handles) 12 12 PlotHandles.auto_xy=handles.auto_xy; 13 PlotHandles.FixedLimits=handles.FixedLimits; 13 14 %For scalar field representation 14 15 PlotHandles.MaxA=handles.MaxA; … … 62 63 % PlotHandles.PLANE=handles.PLANE; 63 64 % PlotHandles.PATCH=handles.PATCH; 64 PlotHandles.cal=handles.cal;65 %PlotHandles.cal=handles.cal; 65 66 %PlotHandles.makemask=handles.makemask; 66 67 PlotHandles.edit=handles.edit; -
trunk/src/imadoc2struct.m
r60 r61 64 64 end 65 65 s.Heading.ImageName=get(t,children(t,uid_FirstImage),'value'); 66 % FirstImage=s.Heading.ImageName;67 % if ~isempty(FirstImage)68 % [Pathsub,RootFile,field_count,str2,str_a,str_b,ext,nom_type_ima]=name2display(FirstImage);69 % end70 66 end 71 67 … … 78 74 xindex=findstr(ImageSize,'x'); 79 75 if length(xindex)>=2 80 % npx=str2num(ImageSize(1:xindex(1)-1)); 81 % npy=str2num(ImageSize(xindex(1)+1:xindex(2)-1)); 82 end 83 end 84 % uid_NbSlice=find(t,'/ImaDoc/Camera/NbSlice'); 85 % if ~isempty(uid_NbSlice) 86 % NbSlice=str2num(get(t,children(t,uid_NbSlice),'value')); 87 % % if isempty(NbSlice),NbSlice=1;end; %default 88 % end 76 npx=str2double(ImageSize(1:xindex(1)-1)); 77 npy=str2double(ImageSize(xindex(1)+1:xindex(2)-1)); 78 end 79 end 89 80 uid_TimeUnit=find(t,'/ImaDoc/Camera/TimeUnit'); 90 81 if ~isempty(uid_TimeUnit) … … 94 85 if ~isempty(uid_BurstTiming) 95 86 for k=1:length(uid_BurstTiming) 96 % Dtj=[];%default97 % NbDtj=1;%default98 87 subt=branch(t,uid_BurstTiming(k));%subtree under BurstTiming 99 88 % reading Dtk -
trunk/src/mouse_down.m
r60 r61 162 162 end 163 163 IndexObj=ObjectData.IndexObj; 164 hlist_object=findobj(huvmat,'Tag','list_object');165 set(h list_object,'Value',IndexObj);164 set(hhuvmat.list_object_1,'Value',IndexObj); 165 set(hhuvmat.list_object_2,'Value',IndexObj); 166 166 testdeform=0; 167 167 set(gcbo,'Pointer','circle'); … … 205 205 UvData.Object{IndexObj}.HandlesDisplay(1)=AxeData.CurrentObject; 206 206 set(huvmat,'UserData',UvData) 207 list_str=get(hhuvmat.list_object ,'String');207 list_str=get(hhuvmat.list_object_1,'String'); 208 208 list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style]; 209 209 if ~isequal(list_str{end},'...') 210 210 list_str{end+1}='...'; 211 211 end 212 set(hhuvmat.list_object,'String',list_str) 213 set(hhuvmat.list_object,'Value',IndexObj) 212 set(hhuvmat.list_object_1,'String',list_str) 213 set(hhuvmat.list_object_1,'Value',IndexObj) 214 set(hhuvmat.list_object_2,'String',list_str) 215 set(hhuvmat.list_object_2,'Value',IndexObj) 214 216 PlotData=get(AxeData.CurrentObject,'UserData'); 215 217 PlotData.IndexObj=IndexObj; … … 295 297 UvData.RulerCoord(1,1)=xy(1,1); 296 298 UvData.RulerCoord(1,2)=xy(1,2); 297 UvData.RulerHandle=line([xy(1,1) xy(1,1)],[xy(1,2) xy(1,2)],'Color','m','Tag',' proj_object');299 UvData.RulerHandle=line([xy(1,1) xy(1,1)],[xy(1,2) xy(1,2)],'Color','m','Tag','ruler'); 298 300 set(huvmat,'UserData',UvData) 299 301 end -
trunk/src/mouse_motion.m
r60 r61 39 39 test_create=0;%default 40 40 test_edit=0;%default 41 if isfield(handles,'VOLUME') % mouse_motion not applied to the uvmat figure, no object creation42 test_create=get(handles.create,'Value');43 end41 % if isfield(handles,'VOLUME') % mouse_motion not applied to the uvmat figure, no object creation 42 % test_create=get(handles.create,'Value'); 43 % end 44 44 test_edit=isfield(handles,'edit') & get(handles.edit,'Value');% edit test for mouse shap: an arrow 45 45 test_zoom=isfield(handles,'zoom')& get(handles.zoom,'Value');% edit test for mouse shap: an arrow … … 92 92 if ~test_create 93 93 pointershape='arrow'; %mouse indicates the detection of a vector 94 hhh=findobj(haxes,'Tag','vector_marker'); 95 if isempty(hhh) 96 line(AxeData.X(ivec),AxeData.Y(ivec),'Color','m','Tag','vector_marker','LineStyle','.','Marker','o','MarkerSize',AxeData.Mesh); 97 else 98 set(hhh,'XData',AxeData.X(ivec)) 99 set(hhh,'YData',AxeData.Y(ivec)) 100 end 94 101 end 95 102 ivec=ivec(1);%choice the first selected vector if several are selected … … 194 201 %%%%%%%%%%%%%%%%% 195 202 %create or modify an object 196 if isfield(AxeData,'CurrentObject') & ishandle(AxeData.CurrentObject) & isfield(AxeData,'Drawing') & ~isequal(AxeData.Drawing,'off') 203 huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle 204 if ~isempty(huvmat) 205 UvData=get(huvmat,'UserData'); 206 end 207 if ~isempty(huvmat) & isfield(AxeData,'CurrentObject') & ishandle(AxeData.CurrentObject) & isfield(AxeData,'Drawing') & ~isequal(AxeData.Drawing,'off') 197 208 PlotData=get(AxeData.CurrentObject,'UserData'); 198 209 huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle … … 268 279 269 280 %draw ruler 270 UvData=get(handles.uvmat,'UserData'); 271 if isfield(UvData,'MouseAction') && isequal(UvData.MouseAction,'ruler') 272 if isfield(UvData,'RulerHandle') 273 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]; 274 set(UvData.RulerHandle,'XData',RulerCoord(:,1)); 275 set(UvData.RulerHandle,'YData',RulerCoord(:,2)); 276 end 281 if ~isempty(huvmat) 282 UvData=get(huvmat,'UserData'); 283 if isfield(UvData,'MouseAction') && isequal(UvData.MouseAction,'ruler') 284 if isfield(UvData,'RulerHandle') 285 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]; 286 set(UvData.RulerHandle,'XData',RulerCoord(:,1)); 287 set(UvData.RulerHandle,'YData',RulerCoord(:,2)); 288 end 289 end 277 290 end 278 291 set(currentfig,'Pointer',pointershape); -
trunk/src/mouse_up.m
r60 r61 133 133 write_plot_param(PlotHandles,UvData.Object{IndexObj}.PlotParam); %update the display of plotting parameters for the current object 134 134 end 135 set(hhuvmat.create,'Value',0);% set to 'off' the button for object creation136 set(hhuvmat.create,'BackgroundColor',[0 1 0]);% paint the creation button in green135 % set(hhuvmat.create,'Value',0);% set to 'off' the button for object creation 136 % set(hhuvmat.create,'BackgroundColor',[0 1 0]);% paint the creation button in green 137 137 set(hhuvmat.edit,'BackgroundColor',[1 1 0]);% paint the edit text in yellow 138 138 set(hhuvmat.edit,'Value',1);% … … 166 166 delete(AxeData.CurrentVec) 167 167 end 168 %update the axes UvData.Plane2 if it exists, else create it 169 % if isfield (UvData,'Plane2') & ishandle(UvData.Plane2.Fig)%if the second plan plotting axis already exists 170 % hfig2=UvData.Plane2.Fig; 171 % if isequal(gcf,hfig2)%if we are already on the secondary figure 172 % test_replot=1; 173 % else 174 % figure(hfig2)%set hfig2 as the current figure 175 % clf; %erase axes 176 % end 177 % else 178 hfig2=figure;%create new figure 179 set(hfig2,'name','zoom') 180 set(hfig2,'Units','normalized') 181 set(hfig2,'Position',[0.2 0.33 0.6 0.6]); 182 % UvData.Plane2.Fig=hfig2; 183 map=colormap(currentaxes); 184 colormap(map);%transmit the current colormap to the zoom fig 185 get(handles.RootFile,'String') 186 % end 168 hfig2=figure;%create new figure 169 set(hfig2,'name','zoom') 170 set(hfig2,'Units','normalized') 171 set(hfig2,'Position',[0.2 0.33 0.6 0.6]); 172 map=colormap(currentaxes); 173 colormap(map);%transmit the current colormap to the zoom fig 174 get(handles.RootFile,'String') 187 175 set(hfig2,'Position',[0.2 0.33 0.6 0.6]); 188 176 if test_replot==0 … … 219 207 ChildAxeData.ParentRect=AxeData.CurrentRectZoom;%set the rectangle as a 'parent' associated to the new axes 220 208 set(AxeData.ZoomAxes,'UserData',ChildAxeData);%update the AxeData of the new axes 221 % UvData.TopFig=hfig2;%put the new fig to the top of the stack for uvmat222 % set(huvmat,'UserData',UvData)223 209 set(AxeData.ZoomAxes,'Xlim',[PosRect(1) PosRect(1)+PosRect(3)]) 224 210 set(AxeData.ZoomAxes,'Ylim',[PosRect(2) PosRect(2)+PosRect(4)]) … … 277 263 if isequal(MouseAction,'ruler') 278 264 UvData.MouseAction='none'; 279 UvData=rmfield(UvData,'RulerHandle') 265 UvData=rmfield(UvData,'RulerHandle'); 280 266 xy=get(currentaxes,'CurrentPoint'); 281 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)] 267 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]; 282 268 set(huvmat,'UserData',UvData) 283 RulerCoord=diff(RulerCoord,1) 269 RulerCoord=diff(RulerCoord,1); 284 270 RulerCoord=RulerCoord(1)+i*RulerCoord(2); 285 distance=abs(RulerCoord) 286 azimuth=(180/pi)*angle(RulerCoord) 271 distance=abs(RulerCoord); 272 azimuth=(180/pi)*angle(RulerCoord); 287 273 msgbox_uvmat('RULER','',['length: ' num2str(distance,3) ', angle(degrees): ' num2str(azimuth,3)]) 274 hruler=findobj(currentaxes,'Tag','ruler'); 275 delete(hruler) 288 276 end 289 277 -
trunk/src/plot_field.m
r55 r61 121 121 if ishandle(haxes) 122 122 if isequal(get(haxes,'Type'),'axes') 123 % hfig=get(haxes,'Parent');124 123 axes(haxes) 125 124 testnewfig=0; … … 204 203 msgbox_uvmat('ERROR','volume plot not implemented yet') 205 204 return 206 %plot_volume(haxes,Data,PlotParam)% A FAIRE207 %PlotType='volume';208 205 else 209 206 testnbdim=0; … … 309 306 function [AxeData,haxes]=plot_profile(data,CellVarIndex,VarType,haxes,PlotParam) 310 307 %----------------------------------------------------------- 311 axes(haxes)308 %axes(haxes) 312 309 hfig=get(haxes,'parent'); 313 310 AxeData=data; … … 316 313 if isfield(PlotParam,'NextPlot') 317 314 set(haxes,'NextPlot',PlotParam.NextPlot) 315 end 316 % adjust the size of the plot to include the whole field, except if KeepLim=1 317 if isfield(PlotParam,'FixedLimits') && isequal(PlotParam.FixedLimits,1) %adjust the graph limits* 318 set(haxes,'XLimMode', 'manual') 319 set(haxes,'YLimMode', 'manual') 320 else 321 set(haxes,'XLimMode', 'auto') 322 set(haxes,'YLimMode', 'auto') 318 323 end 319 324 legend_str={}; … … 372 377 charplot_0='''-'''; 373 378 end 374 % if testcoordvar==0375 % coord_x{icell}=[1:data.DimValue(DimIndices(1))];%abscissa by default if no coordinate variable376 % % charplot_0='''-''';377 % end378 379 if isfield(data,'VarAttribute') 379 380 VarAttribute=data.VarAttribute; … … 415 416 if ~isequal(plotstr,'plot(') 416 417 plotstr(end)=')'; 417 %execute plot (instruction plotstr) 418 %execute plot (instruction plotstr) 418 419 eval(plotstr) 419 420 %%%%% -
trunk/src/read_plot_param.m
r19 r61 14 14 15 15 PlotParam.Auto_xy=get(handles.auto_xy,'Value'); 16 PlotParam.FixedLimits=get(handles.FixedLimits,'Value'); 16 17 17 18 % scalars -
trunk/src/set_object.m
r55 r61 709 709 if ~isempty(huvmat) 710 710 hhuvmat=guidata(huvmat); 711 set(hhuvmat.create,'Value',0)712 set(hhuvmat.create,'BackgroundColor',[0 1 0])%put unactivated buttons to green711 % set(hhuvmat.create,'Value',0) 712 % set(hhuvmat.create,'BackgroundColor',[0 1 0])%put unactivated buttons to green 713 713 % set(hhuvmat.LINE,'Value',0) 714 714 % set(hhuvmat.LINE,'BackgroundColor',[0 1 0])%put unactivated buttons to green … … 733 733 function PLOT_Callback(hObject, eventdata, handles) 734 734 735 hsetobject=get(handles.PLOT,'parent'); 736 SetData=get(hsetobject,'UserData');%get the hidden interface data 735 SetData=get(handles.set_object,'UserData');%get the hidden interface data 737 736 huvmat=findobj('Name','uvmat');%find the current uvmat interface handle 738 hlist_object=findobj(huvmat,'Tag','list_object ');%handles of the object list in the GUI uvmat737 hlist_object=findobj(huvmat,'Tag','list_object_1');%handles of the object list in the GUI uvmat 739 738 IndexObj=get(hlist_object,'Value');%position in the objet list 740 739 UvData=get(huvmat,'UserData');%Data associated to the GUI uvmat … … 767 766 UvData.Object{IndexObj}=update_obj(UvData,IndexObj,ObjectData,SetData.PlotHandles); 768 767 768 769 769 set(huvmat,'UserData',UvData)%update the data in the uvmat interface 770 770 list_str=get(hlist_object,'String'); … … 772 772 % list_str{IndexObj}=[num2str(IndexObj) '-' TITLE]; 773 773 list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style]; 774 if isequal(length(list_str),IndexObj)775 list_str{IndexObj+1}='more...';776 end777 set(hlist_object ,'String',list_str)778 set(hlist_object ,'Value',IndexObj)774 % if isequal(length(list_str),IndexObj) 775 % list_str{IndexObj+1}='more...'; 776 % end 777 set(hlist_object_1,'String',list_str) 778 set(hlist_object_1,'Value',IndexObj) 779 779 780 780 %update create buttons on the GUI uvmat: set to object edit mode after object plotting … … 782 782 %desactivate all create buttons in mode edit 783 783 % if isequal(get(hhuvmat.edit,'Value'),0) 784 set(hhuvmat.create,'Value',0)785 set(hhuvmat.create,'BackgroundColor',[0 1 0])%put unactivated buttons to green784 % set(hhuvmat.create,'Value',0) 785 % set(hhuvmat.create,'BackgroundColor',[0 1 0])%put unactivated buttons to green 786 786 % set(hhuvmat.LINE,'Value',0) 787 787 % set(hhuvmat.LINE,'BackgroundColor',[0 1 0])%put unactivated buttons to green -
trunk/src/update_obj.m
r60 r61 54 54 end 55 55 end 56 57 56 % plot the field projected on the object 58 57 if ~isempty(PlotHandles) %&& ~testmask … … 66 65 [plotaxes]=view_field(ProjData); 67 66 end 68 69 67 % [PlotType,Object_out.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotHandles); 70 68 Object_out.plotaxes=plotaxes; -
trunk/src/uvmat.m
r60 r61 246 246 if ~isfield(UvData.Object{1},'plotaxes') 247 247 UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 248 set(handles.list_object ,'String',{'1-PLANE'});249 set(handles.list_object ,'Value',1);248 set(handles.list_object_1,'String',{'1-PLANE'}); 249 set(handles.list_object_1,'Value',1); 250 250 end 251 251 … … 379 379 set(handles.OBJECT_txt,'Visible','on') 380 380 set(handles.edit,'Visible','on') 381 set(handles.list_object ,'Visible','on')381 set(handles.list_object_1,'Visible','on') 382 382 set(handles.frame_object,'Visible','on') 383 383 else … … 598 598 set(handles.OBJECT_txt,'Visible','on') 599 599 set(handles.edit,'Visible','on') 600 set(handles.list_object ,'Visible','on')600 set(handles.list_object_1,'Visible','on') 601 601 set(handles.frame_object,'Visible','on') 602 602 % initiate input file: … … 647 647 drawnow 648 648 set(handles.Fields,'UserData',[])% reinialize data from uvmat opening 649 %huvmat=get(handles.RootPath,'parent');650 649 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface 651 650 UvData.NewSeries=1; %flag for run0: begin a new series … … 920 919 function MenuBrowse_1_Callback(hObject, eventdata, handles) 921 920 %------------------------------------------------------------------- 922 huvmat=get(handles.run0,'parent');923 UvData=get(h uvmat,'UserData');921 % huvmat=get(handles.run0,'parent'); 922 UvData=get(handles.uvmat,'UserData'); 924 923 925 924 RootPath=get(handles.RootPath,'String'); … … 1142 1141 set(handles.RootPath_1,'BackgroundColor',[1 1 0])% indicate active program by yellow color 1143 1142 drawnow 1144 huvmat=get(handles.RootPath,'parent');1145 UvData=get(h uvmat,'UserData');%huvmat=handles of the uvmat interface1143 %huvmat=get(handles.RootPath,'parent'); 1144 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface 1146 1145 UvData.NewSeries=1; %flag for run0: begin a new series 1147 1146 … … 1279 1278 end 1280 1279 UvData.XmlData_1=XmlData; 1281 set(h uvmat,'UserData',UvData)%update the data attached to the uvmat interface1280 set(handles.uvmat,'UserData',UvData)%update the data attached to the uvmat interface 1282 1281 1283 1282 if ~isequal(warntext,'') … … 1476 1475 end 1477 1476 set(handles.mask_test,'UserData',[]) 1478 huvmat=get(handles.mask_test,'parent');1479 UvData=get(h uvmat,'UserData');1477 %huvmat=get(handles.mask_test,'parent'); 1478 UvData=get(handles.uvmat,'UserData'); 1480 1479 if isfield(UvData,'MaskName') 1481 1480 UvData=rmfield(UvData,'MaskName'); 1482 set(h uvmat,'UserData',UvData)1481 set(handles.uvmat,'UserData',UvData) 1483 1482 end 1484 1483 set(handles.mask_test,'BackgroundColor',[0.7 0.7 0.7]) … … 2455 2454 if ~isfield(UvData.Object{1},'plotaxes') 2456 2455 UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 2457 set(handles.list_object ,'String',{'1-PLANE'});2458 set(handles.list_object ,'Value',1);2456 set(handles.list_object_1,'String',{'1-PLANE'}); 2457 set(handles.list_object_1,'Value',1); 2459 2458 end 2460 2459 … … 2472 2471 ZBounds(2)=UvData.ZMax;%maximum for the Z slider 2473 2472 set_object(UvData.Object{1},PlotHandles,ZBounds); 2474 set(handles.list_object ,'Value',1);2473 set(handles.list_object_1,'Value',1); 2475 2474 %multilevel case (single menuplane in a 3D space) 2476 2475 elseif isfield(UvData,'Z') … … 2499 2498 set(handles.MaxA,'String','255') 2500 2499 end 2501 IndexObj=get(handles.list_object ,'Value');2500 IndexObj=get(handles.list_object_1,'Value'); 2502 2501 Object=UvData.Object; 2503 2502 IndexObj=min(IndexObj,numel(Object)); … … 3412 3411 % set(handles.edit,'Value',0) 3413 3412 % set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 3414 % list_object =get(handles.list_object,'String');3415 % if ~isempty(list_object )3416 % set(handles.list_object ,'Value',length(list_object))3413 % list_object_1=get(handles.list_object_1,'String'); 3414 % if ~isempty(list_object_1) 3415 % set(handles.list_object_1,'Value',length(list_object_1)) 3417 3416 % end 3418 3417 % MouseAction='create_object'; … … 3471 3470 % end 3472 3471 % %set(hset_object,'Position',[pos_uvmat(1) pos_uvmat(2)-0.05*pos_uvmat(4) 0.2*pos_uvmat(3) 0.5*pos_uvmat(4)]); 3473 % list_object =get(handles.list_object,'String');3474 % if ~isempty(list_object )3475 % set(handles.list_object ,'Value',length(list_object))3472 % list_object_1=get(handles.list_object_1,'String'); 3473 % if ~isempty(list_object_1) 3474 % set(handles.list_object_1,'Value',length(list_object_1)) 3476 3475 % end 3477 3476 % MouseAction='create_object'; … … 3503 3502 % set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 3504 3503 % set(handles.edit,'Value',0) 3505 % set(handles.list_object ,'Value',1);3504 % set(handles.list_object_1,'Value',1); 3506 3505 % edit_vect_Callback(hObject, eventdata, handles) 3507 3506 % set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) … … 3541 3540 % set(hset_object,'Position',pos_set_object) 3542 3541 % end 3543 % list_object =get(handles.list_object,'String');3544 % if ~isempty(list_object )3545 % set(handles.list_object ,'Value',length(list_object))3542 % list_object_1=get(handles.list_object_1,'String'); 3543 % if ~isempty(list_object_1) 3544 % set(handles.list_object_1,'Value',length(list_object_1)) 3546 3545 % end 3547 3546 % MouseAction='create_object'; … … 3606 3605 % set(hset_object,'Position',pos_set_object) 3607 3606 % end 3608 % list_object =get(handles.list_object,'String');3609 % if ~isempty(list_object )3610 % set(handles.list_object ,'Value',length(list_object))3607 % list_object_1=get(handles.list_object_1,'String'); 3608 % if ~isempty(list_object_1) 3609 % set(handles.list_object_1,'Value',length(list_object_1)) 3611 3610 % end 3612 3611 % UvData.MouseAction='create_object'; … … 3677 3676 % set(hset_object,'Position',pos_set_object) 3678 3677 % end 3679 % list_object =get(handles.list_object,'String');3680 % nbobject=length(list_object );3681 % set(handles.list_object ,'Value',nbobject)3678 % list_object_1=get(handles.list_object_1,'String'); 3679 % nbobject=length(list_object_1); 3680 % set(handles.list_object_1,'Value',nbobject) 3682 3681 % UvData.MouseAction='create_object'; 3683 3682 % set(huvmat,'UserData',UvData) … … 3691 3690 delete(handles.UVMAT_title) 3692 3691 end 3693 huvmat=get(handles.create,'parent'); 3694 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface 3692 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 3695 3693 if isequal(get(handles.VOLUME,'Value'),1) 3696 3694 set(handles.zoom,'Value',0) … … 3700 3698 set(handles.edit,'Value',0) 3701 3699 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 3702 set(handles.cal,'Value',0)3703 set(handles.cal,'BackgroundColor',[0 1 0])3700 % set(handles.cal,'Value',0) 3701 % set(handles.cal,'BackgroundColor',[0 1 0]) 3704 3702 set(handles.edit_vect,'Value',0) 3705 3703 edit_vect_Callback(hObject, eventdata, handles) … … 3753 3751 set(handles.edit_vect,'BackgroundColor',[1 1 0]) 3754 3752 set(handles.edit,'Value',0) 3755 set(handles.create,'Value',0) 3756 set(handles.create,'BackgroundColor',[0 1 0]) 3753 set(handles.zoom,'Value',0) 3754 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7]) 3755 % set(handles.create,'Value',0) 3756 % set(handles.create,'BackgroundColor',[0 1 0]) 3757 3757 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 3758 3758 set(gcf,'Pointer','arrow') … … 4020 4020 function cal_Callback(hObject, eventdata, handles) 4021 4021 4022 huvmat=get(handles.cal,'parent');%handles of the uvmat interface 4023 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface 4024 %reinitialize the edit interface associated with uvmat 4025 value=get(handles.cal,'Value'); 4026 if value 4027 set(handles.cal,'BackgroundColor',[1 1 0]) 4028 %suppress the other options if MENULINE is chosen 4029 set(handles.zoom,'Value',0) 4030 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7]) 4031 set(handles.create,'Value',0) 4032 set(handles.create,'BackgroundColor',[0 1 0]) 4033 set(handles.create,'enable','off') 4034 set(handles.edit_vect,'Value',0) 4035 set(handles.edit_vect,'enable','off') 4036 edit_vect_Callback(hObject, eventdata, handles) 4037 set(handles.edit,'Value',0) 4038 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 4039 set(handles.edit,'enable','off') 4040 set(handles.list_object,'Value',1) 4041 % initiate display of GUI geometry_calib 4042 data=[]; %default 4043 if isfield(UvData,'CoordType') 4044 data.CoordType=UvData.CoordType; 4045 end 4046 %data.ParentButton=handles.cal; % transmit the handles of the calling button to the GUI geometry_calib 4047 pos=get(huvmat,'Position'); 4048 pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen) 4049 pos(2)=pos(2)-0.02; 4050 [FileName,RootPath,FileBase,FileIndices,FileExt,SubDir]=read_file_boxes(handles); 4051 % [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles); 4052 % [inputfile,idetect]=name_generator(filebase,num_i1,num_j1,Ext,NomType,1,num_i2,num_j2,SubDir); 4053 [UvData.hset_object,UvData.sethandles]=geometry_calib(handles,pos,FileName);% call the set_object interface 4054 pos_uvmat=get(huvmat,'Position'); 4055 %pos_cal(1:2)=UvData.CalOrigin + pos_uvmat(1:2); 4056 if isfield(UvData,'CalOrigin') 4057 pos_cal(1)=pos_uvmat(1)+UvData.CalOrigin(1)*pos_uvmat(3); 4058 pos_cal(2)=pos_uvmat(2)+UvData.CalOrigin(2)*pos_uvmat(4); 4059 pos_cal(3:4)=UvData.CalSize .* pos_uvmat(3:4); 4060 set(UvData.hset_object,'Position',pos_cal) 4061 end 4062 UvData.MouseAction='calib'; 4063 else 4064 UvData.MouseAction='none'; 4065 hgeometry_calib=findobj(allchild(0),'Name','geometry_calib'); 4066 % if ~isempty(hgeometry_calib) 4067 % answer=questdlg('close the GUI geometry-calib?'); 4068 % if isequal(answer,'Yes') 4069 % delete(hgeometry_calib) 4070 % set(handles.cal,'BackgroundColor',[0 1 0]) 4071 % else 4072 % set(handles.cal,'Value',1)% keep the calibration function active 4073 % end 4074 % end 4075 set(handles.edit_vect,'enable','on') 4076 set(handles.edit,'enable','on') 4077 set(handles.create,'enable','on') 4078 % set(handles.LINE,'enable','on') 4079 % set(handles.PATCH,'enable','on') 4080 % set(handles.PLANE,'enable','on') 4081 % set(handles.VOLUME,'enable','on') 4082 %set(handles.makemask,'enable','on') 4083 hh=findobj(handles.axes3,'Tag','calib_points'); 4084 if ~isempty(hh) 4085 delete(hh) 4086 end 4087 hhh=findobj(handles.axes3,'Tag','calib_marker'); 4088 if ~isempty(hhh) 4089 delete(hhh) 4090 end 4091 end 4092 set(huvmat,'UserData',UvData); 4022 4093 4023 4094 4024 %------------------------------------------------------------- … … 4466 4396 function grid_Callback(hObject, eventdata, handles) 4467 4397 %------------------------------------------------------------------- 4468 huvmat=get(handles.create,'parent'); 4469 UvData=get(h uvmat,'UserData');%read UvData properties stored on the uvmat interface4398 4399 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4470 4400 4471 4401 %suppress the other options if grid is chosen 4472 set(handles.create,'Value',0)4473 set(handles.create,'BackgroundColor',[0 1 0])4402 % set(handles.create,'Value',0) 4403 % set(handles.create,'BackgroundColor',[0 1 0]) 4474 4404 set(handles.edit_vect,'Value',0) 4475 4405 edit_vect_Callback(hObject, eventdata, handles) … … 4478 4408 edit_vect_Callback(hObject, eventdata, handles) 4479 4409 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 4480 set(handles.list_object ,'Value',1)4410 set(handles.list_object_1,'Value',1) 4481 4411 set(handles.cal,'Value',0) 4482 4412 set(handles.cal,'BackgroundColor',[0 1 0]) … … 4493 4423 function edit_Callback(hObject, eventdata, handles) 4494 4424 %------------------------------------------------------------------- 4495 huvmat=get(handles.list_object,'parent'); 4496 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface 4425 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4497 4426 test=get(handles.edit,'Value'); 4498 4427 if test … … 4502 4431 set(handles.zoom,'Value',0) 4503 4432 zoom_Callback(hObject, eventdata, handles) 4504 set(handles.create,'Value',0)4505 set(handles.create,'BackgroundColor',[0 1 0])4506 % set(handles.LINE,'Value',0)4507 % set(handles.LINE,'BackgroundColor',[0 1 0])4508 % set(handles.PATCH,'Value',0)4509 % set(handles.PATCH,'BackgroundColor',[0 1 0])4510 % set(handles.PLANE,'Value',0)4511 % set(handles.PLANE,'BackgroundColor',[0 1 0])%put activated buttons to yellow4512 % set(handles.VOLUME,'Value',0)4513 % set(handles.VOLUME,'BackgroundColor',[0 1 0])4514 4433 set(handles.edit_vect,'Value',0) 4515 4434 edit_vect_Callback(hObject, eventdata, handles) 4516 set(handles.cal,'Value',0) 4517 set(handles.cal,'BackgroundColor',[0 1 0]) 4518 %set(handles.grid,'Value',0) 4519 %set(handles.grid,'BackgroundColor',[0 1 0]) 4520 list_object_Callback(hObject, eventdata, handles) 4435 %list_object_Callback(hObject, eventdata, handles) 4521 4436 else 4522 4437 UvData.MouseAction='none'; 4523 4438 set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 4524 4439 end 4525 set(huvmat,'UserData',UvData); 4526 4527 %-------------------------------------------------------- 4528 % --- Executes on selection change in list_object. 4529 %-------------------------------------------------------- 4530 function list_object_Callback(hObject, eventdata, handles) 4440 set(handles.uvmat,'UserData',UvData); 4441 hset_object=findobj(allchild(0),'Tag','set_object'); 4442 if ~isempty(hset_object) 4443 hhset_object=guidata(hset_object); 4444 if test 4445 set(hhset_object.PLOT,'Visible','on'); 4446 else 4447 set(hhset_object.PLOT,'Visible','off'); 4448 end 4449 end 4450 4451 %------------------------------------------------------------------------ 4452 % --- Executes on selection change in list_object_1. 4453 function list_object_1_Callback(hObject, eventdata, handles) 4454 %------------------------------------------------------------------------ 4455 list_str=get(handles.list_object_1,'String'); 4456 IndexObj=get(handles.list_object_1,'Value'); 4457 str_1=list_str{IndexObj}; 4458 set(handles.list_object_1,'BackgroundColor',[1 1 0]) 4459 set(handles.list_object_2,'BackgroundColor',[1 1 1]) 4460 val_2=get(handles.list_object_2,'Value'); 4461 str_2=get(handles.list_object_2,'String'); 4462 if isequal(val_2,IndexObj) 4463 set(handles.list_object_2,'Value',numel(str_2)) 4464 list_object_2_Callback(hObject, eventdata, handles) 4465 end 4466 hset_object=findobj(allchild(0),'Tag','set_object'); 4467 if ~isempty(hset_object) 4468 set(hset_object,'name',str_1); 4469 end 4470 update_object(handles,IndexObj,1) 4471 4472 %------------------------------------------------------------------------ 4473 % --- Executes on selection change in list_object_1. 4474 function list_object_2_Callback(hObject, eventdata, handles) 4475 %------------------------------------------------------------------------ 4476 list_str=get(handles.list_object_2,'String'); 4477 IndexObj=get(handles.list_object_2,'Value'); 4478 if isequal(list_str{IndexObj},'...') 4479 hview_field=findobj(allchild(0),'Tag','view_field') 4480 if ~isempty(hview_field) 4481 delete(hview_field) 4482 end 4483 set(handles.list_object_2,'BackgroundColor',[1 1 1]) 4484 else 4485 hset_object=findobj(allchild(0),'Tag','set_object'); 4486 if ~isempty(hset_object) 4487 set(hset_object,'name',list_str{IndexObj}); 4488 end 4489 set(handles.list_object_2,'BackgroundColor',[1 1 0]) 4490 set(handles.list_object_1,'BackgroundColor',[1 1 1]) 4491 update_object(handles,IndexObj,2) 4492 end 4493 4494 %------------------------------------------------------------------------ 4495 function update_object(handles,IndexObj,option) 4496 %------------------------------------------------------------------------ 4531 4497 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4532 list_str=get(handles.list_object,'String');4533 IndexObj=get(handles.list_object,'Value');4534 4535 4498 if ~(length(UvData.Object)>=IndexObj); 4536 4499 return 4537 4500 end 4538 4501 ObjectData=UvData.Object{IndexObj}; 4539 ObjectData.desable_open=1; % desable the OPEN option in the set_object GUI (editing mode)4540 4502 if isequal(get(handles.edit,'Value'),0) 4541 4503 ObjectData.desable_plot=1; % desable the PLOT option in the set_object GUI (editing mode … … 4547 4509 ZBounds(2)=UvData.ZMax;%maximum for the Z slider 4548 4510 end 4549 AxeData.hset_object=set_object(ObjectData,PlotHandles,ZBounds);% call the set_object interface, 4511 hset_object=findobj(allchild(0),'Name','set_object'); 4512 if ~isempty(hset_object) 4513 delete(hset_object)% delete existing version of set_object 4514 end 4515 hset_object=set_object(ObjectData,PlotHandles,ZBounds);% call the set_object interface, 4550 4516 pos_uvmat=get(handles.uvmat,'Position'); 4517 %position the set_object GUI with respect to uvmat 4551 4518 if isfield(UvData,'SetObjectOrigin') 4552 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);4553 pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);4554 set(AxeData.hset_object,'Position',pos_set_object)4519 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2); 4520 pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4); 4521 set(hset_object,'Position',pos_set_object) 4555 4522 end 4556 4523 4557 4524 %project the current field on the object and plot it 4558 4525 ProjData= proj_field(UvData.Field,ObjectData,IndexObj);%project the current interface field on ObjectData 4559 if length(UvData.Object)>= IndexObj && isfield(UvData.Object{IndexObj},'plotaxes')&& ishandle(UvData.Object{IndexObj}.plotaxes)4560 plot_field(ProjData, UvData.Object{IndexObj}.plotaxes,PlotHandles);4561 else 4562 UvData.Object{IndexObj}.plotaxes=view_field(ProjData); 4563 set(handles.uvmat,'UserData',UvData)4526 if option==1%length(UvData.Object)>= IndexObj && isfield(UvData.Object{IndexObj},'plotaxes')&& ishandle(UvData.Object{IndexObj}.plotaxes) 4527 plot_field(ProjData,handles.axes3,PlotHandles); 4528 UvData.Object{IndexObj}.plotaxes=handles.axes3; 4529 else 4530 UvData.Object{IndexObj}.plotaxes=view_field(ProjData); 4564 4531 end 4565 4532 … … 4617 4584 end 4618 4585 end 4586 pause(0.1) 4587 figure(hset_object)%put set_object in front 4619 4588 4620 4589 %------------------------------------------------------ … … 4758 4727 % ------------------------------------------------------------------ 4759 4728 function MenuCalib_Callback(hObject, eventdata, handles) 4760 set(handles.TOOLS_txt,'Visible','on') 4761 set(handles.frame_tools,'Visible','on') 4762 set(handles.cal,'Visible','on') 4763 set(handles.cal,'Value',1) 4764 cal_Callback(hObject,eventdata,handles) 4729 % set(handles.TOOLS_txt,'Visible','on') 4730 % set(handles.frame_tools,'Visible','on') 4731 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4732 %reinitialize the edit interface associated with uvmat 4733 %suppress the other options if MENULINE is chosen 4734 set(handles.zoom,'Value',0) 4735 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7]) 4736 % set(handles.create,'Value',0) 4737 % set(handles.create,'BackgroundColor',[0 1 0]) 4738 % set(handles.create,'enable','off') 4739 set(handles.edit_vect,'Value',0) 4740 set(handles.edit_vect,'enable','off') 4741 edit_vect_Callback(hObject, eventdata, handles) 4742 set(handles.edit,'Value',0) 4743 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 4744 set(handles.edit,'enable','off') 4745 set(handles.list_object_1,'Value',1) 4746 % initiate display of GUI geometry_calib 4747 data=[]; %default 4748 if isfield(UvData,'CoordType') 4749 data.CoordType=UvData.CoordType; 4750 end 4751 pos=get(handles.uvmat,'Position'); 4752 pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen) 4753 pos(2)=pos(2)-0.02; 4754 [FileName,RootPath,FileBase,FileIndices,FileExt,SubDir]=read_file_boxes(handles); 4755 [UvData.hset_object,UvData.sethandles]=geometry_calib(handles,pos,FileName);% call the set_object interface 4756 pos_uvmat=get(handles.uvmat,'Position'); 4757 %pos_cal(1:2)=UvData.CalOrigin + pos_uvmat(1:2); 4758 if isfield(UvData,'CalOrigin') 4759 pos_cal(1)=pos_uvmat(1)+UvData.CalOrigin(1)*pos_uvmat(3); 4760 pos_cal(2)=pos_uvmat(2)+UvData.CalOrigin(2)*pos_uvmat(4); 4761 pos_cal(3:4)=UvData.CalSize .* pos_uvmat(3:4); 4762 set(UvData.hset_object,'Position',pos_cal) 4763 end 4764 UvData.MouseAction='calib'; 4765 set(handles.uvmat,'UserData',UvData); 4766 4765 4767 4766 4768 % ------------------------------------------------------------------ … … 4768 4770 set(handles.TOOLS_txt,'Visible','on') 4769 4771 set(handles.frame_tools,'Visible','on') 4770 set(handles.create,'Visible','on')4771 set(handles.create,'Value',1)4772 set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow4772 % set(handles.create,'Visible','on') 4773 % set(handles.create,'Value',1) 4774 % set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow 4773 4775 set(handles.save_mask,'Visible','on') 4774 4776 set(handles.masklevel,'Visible','on') … … 4790 4792 delete(handles.UVMAT_title) 4791 4793 end 4792 huvmat=get(handles.create,'parent');4793 UvData=get(h uvmat,'UserData');%read UvData properties stored on the uvmat interface4794 % huvmat=get(handles.create,'parent'); 4795 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4794 4796 set(handles.zoom,'Value',0) 4795 4797 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7]) … … 4800 4802 set(handles.edit_vect,'Value',0) 4801 4803 edit_vect_Callback(hObject, eventdata, handles) 4802 set(handles.cal,'Value',0)4803 set(handles.cal,'BackgroundColor',[0 1 0])4804 % set(handles.cal,'Value',0) 4805 % set(handles.cal,'BackgroundColor',[0 1 0]) 4804 4806 4805 4807 %initiate the GUI set_object … … 4820 4822 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters 4821 4823 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface 4822 pos_uvmat=get(h uvmat,'Position');4824 pos_uvmat=get(handles.huvmat,'Position'); 4823 4825 if isfield(UvData,'SetObjectOrigin') 4824 4826 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2); … … 4826 4828 set(hset_object,'Position',pos_set_object) 4827 4829 end 4828 list_object=get(handles.list_object ,'String');4830 list_object=get(handles.list_object_1,'String'); 4829 4831 if ~isempty(list_object) 4830 set(handles.list_object ,'Value',length(list_object))4832 set(handles.list_object_1,'Value',length(list_object)) 4831 4833 end 4832 4834 UvData.MouseAction='create_object'; 4833 set(h uvmat,'UserData',UvData);4835 set(handles.uvmat,'UserData',UvData); 4834 4836 4835 4837 % ------------------------------------------------------------------ … … 5008 5010 % ------------------------------------------------------------------ 5009 5011 function Menuvolume_Callback(hObject, eventdata, handles) 5010 set(handles.create,'Visible','on')5011 set(handles.create,'Value',1)5012 % set(handles.create,'Visible','on') 5013 % set(handles.create,'Value',1) 5012 5014 VOLUME_Callback(hObject,eventdata,handles) 5013 5015 … … 5039 5041 end 5040 5042 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface 5043 %position the set_object GUI with respect to uvmat 5044 pos_uvmat=get(handles.uvmat,'Position'); 5045 if isfield(UvData,'SetObjectOrigin') 5046 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2); 5047 pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4); 5048 set(hset_object,'Position',pos_set_object) 5049 end 5050 set(handles.edit,'Value',0); %suppress the object edit mode 5051 set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 5041 5052 UvData.MouseAction='create_object'; 5042 5053 set(handles.uvmat,'UserData',UvData) … … 5050 5061 end 5051 5062 UvData=get(handles.uvmat,'UserData'); 5063 set(handles.edit,'Value',0); %suppress the object edit mode 5064 set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 5052 5065 if isfield(UvData,'CoordType') 5053 5066 data.CoordType=UvData.CoordType; … … 5080 5093 PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters 5081 5094 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface 5095 5096 pos_uvmat=get(handles.uvmat,'Position'); 5097 %position the set_object GUI with respect to uvmat 5098 if isfield(UvData,'SetObjectOrigin') 5099 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2); 5100 pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4); 5101 set(hset_object,'Position',pos_set_object) 5102 end 5103 5082 5104 UvData.MouseAction='create_object'; 5083 5105 set(handles.uvmat,'UserData',UvData) … … 5095 5117 set(handles.uvmat,'UserData',UvData); 5096 5118 5097 -
trunk/src/view_field.m
r60 r61 70 70 % set the position of colorbar and ancillary GUIs: 71 71 set(hObject,'Units','Normalized') 72 movegui(hObject,'center')73 UvData.PosColorbar=[0.805 0.022 0.019 0.445];74 UvData.SetObjectOrigin=[-0.05 -0.03]; %position for set_object75 UvData.SetObjectSize=[0.3 0.7];76 UvData.CalOrigin=[0.95 -0.03];%position for geometry_calib (TO IMPROVE)77 UvData.CalSize=[0.28 1];78 72 handles_mouse=handles; 79 73 huvmat=findobj(allchild(0),'Name','uvmat'); 80 74 hhuvmat=guidata(huvmat); 81 handles_mouse.create=hhuvmat.create; 75 set(hhuvmat.list_object_2,'Visible','on') 76 % handles_mouse.create=hhuvmat.create; 82 77 handles_mouse.edit=hhuvmat.edit; 78 pos_uvmat=get(huvmat,'Position'); 79 pos_view_field(1)=pos_uvmat(1)+pos_uvmat(3)/2; 80 pos_view_field(2)=pos_uvmat(2)-pos_uvmat(3)/4; 81 pos_view_field(3:4)=pos_uvmat(3:4); 82 set(hObject,'Position',pos_view_field) 83 84 83 85 84 86 %functions for the mouse and keyboard … … 87 89 set(hObject,'WindowButtonDownFcn',{'mouse_down'})%set mouse click action function 88 90 set(hObject,'WindowButtonUpFcn',{'mouse_up',handles_mouse}) 89 91 % set(hObject,'CloseRequestFcn ',{'close_fcn'}) 90 92 91 93 [PlotType,PlotParamOut,haxes]= plot_field(Field,handles.axes3)%,PlotParam,KeepLim,PosColorbar) … … 94 96 function varargout = view_field_OutputFcn(hObject, eventdata, handles) 95 97 varargout{1} = handles.output;% the only output argument is the handle to the GUI figure 98 96 99 97 100 %------------------------------------------------------------------- … … 1988 1991 end 1989 1992 1990 %------------------------------------------------1991 function create_Callback(hObject,eventdata,handles)1992 %------------------------------------------------1993 if ishandle(handles.VIEW_FIELD_title)1994 delete(handles.VIEW_FIELD_title)1995 end1996 huvmat=get(handles.create,'parent');1997 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface (handles huvmat)1998 if isequal(get(handles.create,'Value'),1)1999 set(handles.zoom,'Value',0)2000 zoom_Callback(hObject, eventdata, handles)2001 set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow2002 set(handles.edit_vect,'Value',0)2003 edit_vect_Callback(hObject, eventdata, handles)2004 set(handles.edit,'Value',0)2005 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2006 list_object=get(handles.list_object,'String');2007 if ~isempty(list_object)2008 set(handles.list_object,'Value',length(list_object))2009 end2010 MouseAction='create_object';2011 hset_object=findobj(allchild(0),'Name','set_object');2012 uistack(hset_object,'top')2013 else2014 set(handles.create,'BackgroundColor',[0 1 0])2015 set(handles.edit,'Value',1)2016 set(handles.edit,'BackgroundColor',[1 1 0])2017 MouseAction='none';2018 end2019 2020 UvData.MouseAction=MouseAction;2021 set(huvmat,'UserData',UvData);2022 2023 %------------------------------------------------2024 function POINTS_Callback(hObject,eventdata,handles)2025 %------------------------------------------------2026 if ishandle(handles.VIEW_FIELD_title)2027 delete(handles.VIEW_FIELD_title)2028 end2029 huvmat=get(handles.create,'parent');2030 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface (handles huvmat)2031 if isequal(get(handles.create,'Value'),1)2032 set(handles.zoom,'Value',0)2033 zoom_Callback(hObject, eventdata, handles)2034 set(handles.edit_vect,'Value',0)2035 edit_vect_Callback(hObject, eventdata, handles)2036 set(handles.edit,'Value',0)2037 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2038 %set(handles.grid,'Value',0)2039 %set(handles.grid,'BackgroundColor',[0 1 0])2040 % initiate set_object GUI2041 data.TITLE='POINTS';2042 if isfield(UvData,'CoordType')2043 data.CoordType=UvData.CoordType;2044 end2045 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)2046 data.RangeY=UvData.Mesh;2047 elseif isfield(UvData,'AX')&isfield(UvData,'AY')& isfield(UvData,'A')%only image2048 np=size(UvData.Field.A);2049 meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/np(2);2050 meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/np(1);2051 data.RangeY=max(meshx,meshy);2052 data.DX=max(meshx,meshy);2053 end2054 data.Coord=[0 0 0]; %default2055 data.ParentButton=handles.create;2056 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters2057 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface2058 if isfield(UvData,'SetObjectOrigin')2059 pos_view_field=get(huvmat,'Position');2060 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);2061 pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);2062 set(hset_object,'Position',pos_set_object)2063 end2064 %set(hset_object,'Position',[pos_view_field(1) pos_view_field(2)-0.05*pos_view_field(4) 0.2*pos_view_field(3) 0.5*pos_view_field(4)]);2065 list_object=get(handles.list_object,'String');2066 if ~isempty(list_object)2067 set(handles.list_object,'Value',length(list_object))2068 end2069 MouseAction='create_object';2070 %UvData.ZoomOn=0;2071 else2072 set(handles.create,'BackgroundColor',[0 1 0])2073 set(handles.edit,'Value',1)2074 set(handles.edit,'BackgroundColor',[1 1 0])2075 MouseAction='none';2076 end2077 2078 UvData.MouseAction=MouseAction;2079 set(huvmat,'UserData',UvData);2080 2081 %-----------------------------------------------------------2082 function LINE_Callback(hObject, eventdata, handles)2083 %-------------------------------------------------2084 if ishandle(handles.VIEW_FIELD_title)2085 delete(handles.VIEW_FIELD_title)2086 end2087 % handles.view_field2088 huvmat=get(handles.create,'parent');2089 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface2090 set(handles.zoom,'Value',0)2091 zoom_Callback(hObject, eventdata, handles)2092 set(handles.edit_vect,'BackgroundColor',[0.7 0.7 0.7])2093 set(handles.edit_vect,'Value',0)2094 edit_vect_Callback(hObject, eventdata, handles)2095 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2096 set(handles.edit,'Value',0)2097 set(handles.list_object,'Value',1);2098 edit_vect_Callback(hObject, eventdata, handles)2099 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2100 set(handles.cal,'Value',0)2101 set(handles.cal,'BackgroundColor',[0 1 0])2102 % initiate the set_object GUI2103 data.TITLE='LINE';2104 if isfield(UvData,'CoordType')2105 data.CoordType=UvData.CoordType;2106 end2107 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)2108 data.RangeX=UvData.Mesh;2109 data.RangeY=UvData.Mesh;2110 data.DX=UvData.Mesh;2111 data.DY=UvData.Mesh;2112 elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image2113 np=size(UvData.Field.A);2114 meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/np(2);2115 meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/np(1);2116 data.RangeY=max(meshx,meshy);2117 data.RangeX=max(meshx,meshy);2118 data.DX=max(meshx,meshy);2119 end2120 if isfield(data,'DX')2121 data.Coord=[[0 0 0];[data.DX 0 0]]; %default2122 else2123 data.Coord=[[0 0 0];[1 0 0]]; %default2124 end2125 data.ParentButton=handles.create;2126 PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters2127 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface with action on haxes,2128 % associate the set_edit interface handle to the plotting axes2129 pos_view_field=get(huvmat,'Position');2130 if isfield(UvData,'SetObjectOrigin')2131 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);2132 pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);2133 set(hset_object,'Position',pos_set_object)2134 end2135 list_object=get(handles.list_object,'String');2136 if ~isempty(list_object)2137 set(handles.list_object,'Value',length(list_object))2138 end2139 MouseAction='create_object';2140 UvData.MouseAction=MouseAction;2141 set(huvmat,'UserData',UvData)2142 2143 %-----------------------------------------------------------2144 function PATCH_Callback(hObject, eventdata, handles)2145 %-----------------------------------------------------------2146 if ishandle(handles.VIEW_FIELD_title)2147 delete(handles.VIEW_FIELD_title)2148 end2149 huvmat=get(handles.create,'parent');2150 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface2151 % if isequal(get(handles.PATCH,'Value'),1)2152 set(handles.zoom,'Value',0)2153 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])2154 % set(handles.create,'Value',0)%suppress the other options if LINE is chosen2155 % set(handles.create,'BackgroundColor',[0 1 0])2156 % set(handles.LINE,'Value',0)2157 % set(handles.LINE,'BackgroundColor',[0 1 0])2158 % set(handles.PATCH,'Value',1)2159 % set(handles.PATCH,'BackgroundColor',[1 1 0])2160 % set(handles.PLANE,'Value',0)2161 % set(handles.PLANE,'BackgroundColor',[0 1 0])%put activated buttons to yellow2162 % set(handles.VOLUME,'Value',0)2163 % set(handles.VOLUME,'BackgroundColor',[0 1 0])2164 %set(handles.makemask,'Value',0)2165 %makemask_Callback(hObject, eventdata, handles)2166 set(handles.edit_vect,'Value',0)2167 edit_vect_Callback(hObject, eventdata, handles)2168 set(handles.edit,'Value',0)2169 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2170 set(handles.edit_vect,'Value',0)2171 edit_vect_Callback(hObject, eventdata, handles)2172 set(handles.cal,'Value',0)2173 set(handles.cal,'BackgroundColor',[0 1 0])2174 %set(handles.grid,'Value',0)2175 %set(handles.grid,'BackgroundColor',[0 1 0])2176 %initiate set_object GUI2177 data.TITLE='PATCH';2178 if isfield(UvData,'CoordType')2179 data.CoordType=UvData.CoordType;2180 end2181 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)2182 data.YMax=UvData.Mesh;2183 elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image2184 np=size(UvData.Field.A);2185 meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/(np(2)-1);2186 meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/(np(1)-1);2187 data.YMax=max(meshx,meshy);2188 data.DX=max(meshx,meshy);2189 end2190 data.Coord=[0 0 0]; %default2191 data.ParentButton=handles.create;2192 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters2193 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface2194 pos_view_field=get(huvmat,'Position');2195 if isfield(UvData,'SetObjectOrigin')2196 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);2197 pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);2198 set(hset_object,'Position',pos_set_object)2199 end2200 list_object=get(handles.list_object,'String');2201 if ~isempty(list_object)2202 set(handles.list_object,'Value',length(list_object))2203 end2204 UvData.MouseAction='create_object';2205 set(huvmat,'UserData',UvData);2206 %-------------------------------------------------------2207 function PLANE_Callback(hObject, eventdata, handles)2208 %-------------------------------------------------------2209 if ishandle(handles.VIEW_FIELD_title)2210 delete(handles.VIEW_FIELD_title)2211 end2212 huvmat=get(handles.create,'parent');2213 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface2214 set(handles.zoom,'Value',0)2215 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])2216 set(handles.edit_vect,'Value',0)2217 edit_vect_Callback(hObject, eventdata, handles)2218 set(handles.edit,'Value',0)2219 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2220 set(handles.cal,'Value',0)2221 set(handles.cal,'BackgroundColor',[0 1 0])2222 %set(handles.grid,'Value',0)2223 %set(handles.grid,'BackgroundColor',[0 1 0])2224 %initiate set_object GUI2225 data.TITLE='PLANE';2226 if isfield(UvData,'CoordType')2227 data.CoordType=UvData.CoordType;2228 end2229 %Si 3D data.nbdim=3;2230 %Si 2D2231 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)2232 data.ZMax=UvData.Mesh;2233 data.DX=UvData.Mesh;2234 data.DY=UvData.Mesh;2235 elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image2236 np=size(UvData.Field.A);2237 meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/(np(2)-1);2238 meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/(np(1)-1);2239 data.DX=max(meshx,meshy);2240 end2241 if isfield(UvData,'DX')2242 data.DX=UvData.DX;2243 end2244 if isfield(UvData,'DY')2245 data.DY=UvData.DY;2246 elseif isfield(UvData,'Mesh')2247 data.DY=UvData.Mesh;2248 end2249 if isfield(UvData.Field,'X')& isfield(UvData.Field,'Y')2250 data.Coord=[0 0 0];2251 data.Style='plane';2252 data.Phi=0;2253 data.IndexObj=1; %act on the first reference plane by default2254 haxes= handles.axes3;%GENERALISER2255 plot_object(data,[],haxes,'m'); %plot the axes of the default plane2256 end2257 data.ParentButton=handles.create;2258 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters2259 ZBounds=0; % default2260 if isfield(UvData,'ZMin') && isfield(UvData,'ZMax')2261 ZBounds(1)=UvData.ZMin; %minimum for the Z slider2262 ZBounds(2)=UvData.ZMax;%maximum for the Z slider2263 end2264 [hset_object,UvData.sethandles]=set_object(data,PlotHandles,ZBounds);% call the set_object interface with action on haxes,2265 if isfield(UvData,'SetObjectOrigin')2266 pos_view_field=get(huvmat,'Position');2267 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);2268 pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);2269 set(hset_object,'Position',pos_set_object)2270 end2271 list_object=get(handles.list_object,'String');2272 nbobject=length(list_object);2273 set(handles.list_object,'Value',nbobject)2274 UvData.MouseAction='create_object';2275 set(huvmat,'UserData',UvData)2276 2277 %-------------------------------------------------------2278 % --- Executes on button press in MENUVOLUME.2279 %-------------------------------------------------------2280 function VOLUME_Callback(hObject, eventdata, handles)2281 %errordlg('command VOL not implemented yet')2282 if ishandle(handles.VIEW_FIELD_title)2283 delete(handles.VIEW_FIELD_title)2284 end2285 huvmat=get(handles.create,'parent');2286 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface2287 if isequal(get(handles.VOLUME,'Value'),1)2288 set(handles.zoom,'Value',0)2289 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])2290 set(handles.edit_vect,'Value',0)2291 edit_vect_Callback(hObject, eventdata, handles)2292 set(handles.edit,'Value',0)2293 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2294 set(handles.cal,'Value',0)2295 set(handles.cal,'BackgroundColor',[0 1 0])2296 set(handles.edit_vect,'Value',0)2297 edit_vect_Callback(hObject, eventdata, handles)2298 %initiate set_object GUI2299 data.TITLE='VOLUME';2300 if isfield(UvData,'CoordType')2301 data.CoordType=UvData.CoordType;2302 end2303 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)2304 data.RangeY=UvData.Mesh;2305 data.RangeX=UvData.Mesh;2306 data.DX=UvData.Mesh;2307 data.DY=UvData.Mesh;2308 elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image2309 np=size(UvData.Field.A);2310 meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/np(2);2311 meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/np(1);2312 data.RangeY=max(meshx,meshy);2313 data.RangeX=max(meshx,meshy);2314 data.DX=max(meshx,meshy);2315 end2316 data.ParentButton=handles.VOLUME;2317 PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters2318 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface with action on haxes,2319 % associate the set_edit interface handle to the plotting axes2320 if isfield(UvData,'SetObjectOrigin')2321 pos_view_field=get(huvmat,'Position');2322 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);2323 pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);2324 set(hset_object,'Position',pos_set_object)2325 end2326 UvData.MouseAction='create_object';2327 else2328 set(handles.VOLUME,'BackgroundColor',[0 1 0])2329 UvData.MouseAction='none';2330 end2331 set(huvmat,'UserData',UvData)2332 2333 %-------------------------------------------------------2334 function edit_vect_Callback(hObject, eventdata, handles)2335 %-------------------------------------------------------2336 2337 UvData=get(handles.view_field,'UserData');%read UvData properties stored on the view_field interface2338 if isequal(get(handles.edit_vect,'Value'),1)2339 test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]);2340 test_civ1=isequal(get(handles.civ1,'BackgroundColor'),[1 1 0]);2341 if ~test_civ2 && ~test_civ12342 msgbox_view_field('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')2343 end2344 set(handles.record,'Visible','on')2345 set(handles.edit_vect,'BackgroundColor',[1 1 0])2346 set(handles.edit,'Value',0)2347 set(handles.create,'Value',0)2348 set(handles.create,'BackgroundColor',[0 1 0])2349 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2350 set(gcf,'Pointer','arrow')2351 UvData.MouseAction='edit_vect';2352 else2353 set(handles.record,'Visible','off')2354 set(handles.edit_vect,'BackgroundColor',[0.7 0.7 0.7])2355 UvData.MouseAction='none';2356 end2357 set(handles.view_field,'UserData',UvData)2358 2359 %----------------------------------------------2360 function save_mask_Callback(hObject, eventdata, handles)2361 %-----------------------------------------------------------------------2362 huvmat=get(handles.save_mask,'parent');2363 UvData=get(huvmat,'UserData');2364 2365 hpatch=findobj(huvmat,'Type','patch');2366 flag=1;2367 npx=size(UvData.Field.A,2);2368 npy=size(UvData.Field.A,1);2369 xi=[0.5:npx-0.5];2370 yi=[0.5:npy-0.5];2371 [Xi,Yi]=meshgrid(xi,yi);2372 if isfield(UvData,'Object')2373 for iobj=1:length(UvData.Object)2374 ObjectData=UvData.Object{iobj};2375 if isfield(ObjectData,'ProjMode') &&(isequal(ObjectData.ProjMode,'mask_inside')||isequal(ObjectData.ProjMode,'mask_outside'));2376 flagobj=1;2377 testphys=0; %coordinates in pixels by default2378 if isfield(ObjectData,'CoordType') && isequal(ObjectData.CoordType,'phys')2379 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData,'GeometryCalib')2380 Calib=UvData.XmlData.GeometryCalib;2381 testphys=1;2382 end2383 end2384 if isfield(ObjectData,'Coord')& isfield(ObjectData,'Style')2385 if isequal(ObjectData.Style,'polygon')2386 X=ObjectData.Coord(:,1);2387 Y=ObjectData.Coord(:,2);2388 if testphys2389 [X,Y]=px_XYZ(Calib,X,Y,0);% to generalise with 3D cases2390 end2391 flagobj=~inpolygon(Xi,Yi,X,Y);%=0 inside the polygon, 1 outside2392 elseif isequal(ObjectData.Style,'ellipse')2393 if testphys2394 %[X,Y]=px_XYZ(Calib,X,Y,0);% TODO:create a polygon boundary and transform to phys2395 end2396 RangeX=max(ObjectData.RangeX);2397 RangeY=max(ObjectData.RangeY);2398 X2Max=RangeX*RangeX;2399 Y2Max=RangeY*RangeY;2400 distX=(Xi-ObjectData.Coord(1,1));2401 distY=(Yi-ObjectData.Coord(1,2));2402 flagobj=(distX.*distX/X2Max+distY.*distY/Y2Max)>1;2403 elseif isequal(ObjectData.Style,'rectangle')2404 if testphys2405 %[X,Y]=px_XYZ(Calib,X,Y,0);% TODO:create a polygon boundary and transform to phys2406 end2407 distX=abs(Xi-ObjectData.Coord(1,1));2408 distY=abs(Yi-ObjectData.Coord(1,2));2409 flagobj=distX>max(ObjectData.RangeX) | distY>max(ObjectData.RangeY);2410 end2411 if isequal(ObjectData.ProjMode,'mask_outside')2412 flagobj=~flagobj;2413 end2414 flag=flag & flagobj;2415 end2416 end2417 end2418 end2419 % flag=~flag;2420 %mask name2421 RootPath=get(handles.RootPath,'String');2422 RootFile=get(handles.RootFile,'String');2423 if ~isempty(RootFile)&(isequal(RootFile(1),'/')| isequal(RootFile(1),'\'))2424 RootFile(1)=[];2425 end2426 filebase=fullfile(RootPath,RootFile);2427 list=get(handles.masklevel,'String');2428 masknumber=num2str(length(list));2429 maskindex=get(handles.masklevel,'Value');2430 mask_name=name_generator([filebase '_' masknumber 'mask'],maskindex,1,'.png','_i');2431 imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (vectors not computed when 20<imflag<200)2432 imflag=flipdim(imflag,1);2433 % imflag=uint8(255*flag);% =0 for flag=0 (vectors=0 when 20<imflag<200)2434 msgbox_view_field('CONFIRMATION',[mask_name ' saved'])2435 imwrite(imflag,mask_name,'BitDepth',8);2436 2437 %display the mask2438 %update_mask(handles,num_i1,num_j1)2439 figure;2440 vec=linspace(0,1,256);%define a linear greyscale colormap2441 map=[vec' vec' vec'];2442 colormap(map)2443 2444 image(imflag);2445 1993 2446 1994 %------------------------------------------------------------------- … … 2608 2156 % set(handles.vec_col_bar,'Cdata',A) 2609 2157 2610 %--------------------------------------------------------2611 % --- Executes on button press in cal.2612 function cal_Callback(hObject, eventdata, handles)2613 2614 huvmat=get(handles.cal,'parent');%handles of the view_field interface2615 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface2616 %reinitialize the edit interface associated with view_field2617 value=get(handles.cal,'Value');2618 if value2619 set(handles.cal,'BackgroundColor',[1 1 0])2620 %suppress the other options if MENULINE is chosen2621 set(handles.zoom,'Value',0)2622 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])2623 set(handles.create,'Value',0)2624 set(handles.create,'BackgroundColor',[0 1 0])2625 set(handles.create,'enable','off')2626 set(handles.edit_vect,'Value',0)2627 set(handles.edit_vect,'enable','off')2628 edit_vect_Callback(hObject, eventdata, handles)2629 set(handles.edit,'Value',0)2630 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])2631 set(handles.edit,'enable','off')2632 set(handles.list_object,'Value',1)2633 % initiate display of GUI geometry_calib2634 data=[]; %default2635 if isfield(UvData,'CoordType')2636 data.CoordType=UvData.CoordType;2637 end2638 %data.ParentButton=handles.cal; % transmit the handles of the calling button to the GUI geometry_calib2639 pos=get(huvmat,'Position');2640 pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen)2641 pos(2)=pos(2)-0.02;2642 [FileName,RootPath,FileBase,FileIndices,FileExt,SubDir]=read_file_boxes(handles);2643 % [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles);2644 % [inputfile,idetect]=name_generator(filebase,num_i1,num_j1,Ext,NomType,1,num_i2,num_j2,SubDir);2645 [UvData.hset_object,UvData.sethandles]=geometry_calib(handles,pos,FileName);% call the set_object interface2646 pos_view_field=get(huvmat,'Position');2647 %pos_cal(1:2)=UvData.CalOrigin + pos_view_field(1:2);2648 if isfield(UvData,'CalOrigin')2649 pos_cal(1)=pos_view_field(1)+UvData.CalOrigin(1)*pos_view_field(3);2650 pos_cal(2)=pos_view_field(2)+UvData.CalOrigin(2)*pos_view_field(4);2651 pos_cal(3:4)=UvData.CalSize .* pos_view_field(3:4);2652 set(UvData.hset_object,'Position',pos_cal)2653 end2654 UvData.MouseAction='calib';2655 else2656 UvData.MouseAction='none';2657 hgeometry_calib=findobj(allchild(0),'Name','geometry_calib');2658 % if ~isempty(hgeometry_calib)2659 % answer=questdlg('close the GUI geometry-calib?');2660 % if isequal(answer,'Yes')2661 % delete(hgeometry_calib)2662 % set(handles.cal,'BackgroundColor',[0 1 0])2663 % else2664 % set(handles.cal,'Value',1)% keep the calibration function active2665 % end2666 % end2667 set(handles.edit_vect,'enable','on')2668 set(handles.edit,'enable','on')2669 set(handles.create,'enable','on')2670 % set(handles.LINE,'enable','on')2671 % set(handles.PATCH,'enable','on')2672 % set(handles.PLANE,'enable','on')2673 % set(handles.VOLUME,'enable','on')2674 %set(handles.makemask,'enable','on')2675 hh=findobj(handles.axes3,'Tag','calib_points');2676 if ~isempty(hh)2677 delete(hh)2678 end2679 hhh=findobj(handles.axes3,'Tag','calib_marker');2680 if ~isempty(hhh)2681 delete(hhh)2682 end2683 end2684 set(huvmat,'UserData',UvData);2685 2686 %-------------------------------------------------------------2687 % --- Executes on selection change in transform_fct.2688 function transform_fct_Callback(hObject, eventdata, handles)2689 %-------------------------------------------------------------2690 global nb_builtin2691 2692 huvmat=get(handles.transform_fct,'parent');2693 menu=get(handles.transform_fct,'String');2694 ind_coord=get(handles.transform_fct,'Value');2695 coord_option=menu{ind_coord};2696 list_transform=get(handles.transform_fct,'UserData');2697 ff=functions(list_transform{end});2698 if isequal(coord_option,'more...');2699 coord_fct='';2700 2701 % if exist(profil_perso,'file')2702 % h=load (profil_perso);2703 % if isfield(h,'transform_fct')2704 % transform_fct=h.transform_fct;2705 % end2706 % end2707 prompt = {'Enter the name of the transform function'};2708 dlg_title = 'user defined transform';2709 num_lines= 1;2710 [FileName, PathName, filterindex] = uigetfile( ...2711 {'*.m', ' (*.m)';2712 '*.m', '.m files '; ...2713 '*.*', 'All Files (*.*)'}, ...2714 'Pick a file', ff.file);2715 if isequal(PathName(end),'/')||isequal(PathName(end),'\')2716 PathName(end)=[];2717 end2718 transform_selected =fullfile(PathName,FileName);2719 if ~exist(transform_selected,'file')2720 % msgbox_view_field('ERROR',['procesing fct ' transform_selected ' not found'])2721 return2722 end2723 [ppp,transform,ext_fct]=fileparts(FileName);% removes extension .m2724 if ~isequal(ext_fct,'.m')2725 msgbox_view_field('ERROR','a Matlab function .m must be introduced');2726 return2727 end2728 menu=update_menu(handles.transform_fct,transform);%add the selected fct to the menu2729 ind_coord=get(handles.transform_fct,'Value');2730 addpath(PathName)2731 list_transform{ind_coord}=str2func(transform);% create the function handle corresponding to the newly seleced function2732 set(handles.transform_fct,'UserData',list_transform)2733 rmpath(PathName)2734 % save the new menu in the personal file 'view_field_perso.mat'2735 dir_perso=prefdir;%personal Matalb directory2736 profil_perso=fullfile(dir_perso,'view_field_perso.mat');2737 if exist(profil_perso,'file')2738 for ilist=nb_builtin+1:numel(list_transform)2739 ff=functions(list_transform{ilist});2740 transform_fct{ilist-nb_builtin}=ff.file;2741 end2742 save (profil_perso,'transform_fct','-append'); %store the root name for future opening of view_field2743 end2744 end2745 2746 %check the current path to the selected function2747 if isa(list_transform{ind_coord},'function_handle')2748 func=functions(list_transform{ind_coord});2749 set(handles.path_transform,'String',fileparts(func.file)); %show the path to the senlected function2750 else2751 set(handles.path_transform,'String','')2752 end2753 %CurrentPath=fileparts(which(coord_option));2754 % if ~isequal(PathName,CurrentPath)2755 % addpath(PathName)2756 % errormsg=check_functions;2757 % msgbox_view_field('WARNING',[['path ' PathName ' added to the current Matlab pathes'];errormsg])2758 % end2759 %set(handles.path_transform,'String',fullfile(PathName,' ')); %show the path to the senlected function2760 set(handles.FixedLimits,'Value',0)2761 set(handles.FixedLimits,'BackgroundColor',[0.7 0.7 0.7])2762 2763 UvData=get(huvmat,'UserData');2764 2765 %delete drawn objects2766 hother=findobj('Tag','proj_object');%find all the proj objects2767 for iobj=1:length(hother)2768 delete_object(hother(iobj))2769 end2770 hother=findobj('Tag','DeformPoint');%find all the proj objects2771 for iobj=1:length(hother)2772 delete_object(hother(iobj))2773 end2774 hh=findobj('Tag','calib_points');2775 if ~isempty(hh)2776 delete(hh)2777 end2778 hhh=findobj('Tag','calib_marker');2779 if ~isempty(hhh)2780 delete(hhh)2781 end2782 if isfield(UvData,'Object')2783 nbobject=length(UvData.Object);2784 UvData.Object([2:nbobject])=[];2785 end2786 2787 %delete mask if it is displayed2788 if isequal(get(handles.mask_test,'Value'),1)%if the mask option is on2789 UvData=rmfield(UvData,'MaskName'); %will impose mask refresh2790 end2791 set(huvmat,'UserData',UvData)2792 run0_Callback(hObject, eventdata, handles)2793 2794 %--------------------------------------------2795 function histo1_menu_Callback(hObject, eventdata, handles)2796 %--------------------------------------------2797 %plot first histo2798 huvmat=get(handles.histo1_menu,'parent');2799 histo_menu=get(handles.histo1_menu,'String');2800 histo_value=get(handles.histo1_menu,'Value');2801 FieldName=histo_menu{histo_value};2802 UvData=get(huvmat,'UserData');2803 update_histo(handles.histo_u,huvmat,FieldName)2804 2805 %----------------------------------------------2806 function histo2_menu_Callback(hObject, eventdata, handles)2807 %----------------------------------------------2808 %plot second histo2809 huvmat=get(handles.histo2_menu,'parent');2810 histo_menu=get(handles.histo2_menu,'String');2811 histo_value=get(handles.histo2_menu,'Value');2812 FieldName=histo_menu{histo_value};2813 UvData=get(huvmat,'UserData');2814 update_histo(handles.histo_v,huvmat,FieldName)2815 2816 2817 %--------------------------------------------2818 %read the field .Fieldname stored in UvData and plot its histogram2819 function update_histo(haxes,huvmat,FieldName)2820 UvData=get(huvmat,'UserData');2821 2822 if ~isfield(UvData.Field,FieldName)2823 msgbox_view_field('ERROR',['no field ' FieldName ' for histogram'])2824 return2825 end2826 Field=UvData.Field;2827 FieldHisto=eval(['Field.' FieldName]);2828 if isfield(Field,'FF') & ~isempty(Field.FF) & isequal(size(Field.FF),size(FieldHisto))2829 indsel=find(Field.FF==0);%find values marked as false2830 if ~isempty(indsel)2831 FieldHisto=FieldHisto(indsel);2832 end2833 end2834 if isempty(Field)2835 msgbox_view_field('ERROR',['empty field ' FieldName])2836 else2837 nxy=size(FieldHisto);2838 Amin=double(min(min(min(FieldHisto))));%min of image2839 Amax=double(max(max(max(FieldHisto))));%max of image2840 if isequal(Amin,Amax)2841 Histo.Txt=['uniform field =' num2str(Amin)];2842 else2843 Histo.ListVarName={FieldName,'histo'};2844 if numel(nxy)==22845 Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram2846 else %color images2847 Histo.VarDimName={FieldName,{FieldName,'rgb'}}; %dimensions for the histogram2848 end2849 %unit2850 units=[]; %default2851 for ivar=1:numel(Field.ListVarName)2852 if strcmp(Field.ListVarName{ivar},FieldName)2853 if isfield(Field,'VarAttribute') && numel(Field.VarAttribute)>=ivar && isfield(Field.VarAttribute{ivar},'units')2854 units=Field.VarAttribute{ivar}.units;2855 break2856 end2857 end2858 end2859 if ~isempty(units)2860 Histo.VarAttribute{1}.units=units;2861 end2862 eval(['Histo.' FieldName '=linspace(Amin,Amax,50);'])%absissa values for histo2863 for col=1:size(FieldHisto,3)2864 B=FieldHisto(:,:,col);2865 C=reshape(double(B),1,nxy(1)*nxy(2));% reshape in a vector2866 eval(['Histo.histo(:,col)=hist(C, Histo.' FieldName ');']); %calculate histogram2867 end2868 set(haxes,'XLimMode','auto')%reset auto mode (after zoom effect)2869 set(haxes,'YLimMode','auto')2870 plot_field(Histo,haxes);2871 end2872 end2873 2874 2875 2158 2876 2159 %------------------------------------------------ … … 3083 2366 3084 2367 3085 function edit84_Callback(hObject, eventdata, handles)3086 % hObject handle to edit84(see GCBO)2368 function npx_Callback(hObject, eventdata, handles) 2369 % hObject handle to npx (see GCBO) 3087 2370 % eventdata reserved - to be defined in a future version of MATLAB 3088 2371 % handles structure with handles and user data (see GUIDATA) 3089 2372 3090 % Hints: get(hObject,'String') returns contents of edit84as text3091 % str2double(get(hObject,'String')) returns contents of edit84as a double2373 % Hints: get(hObject,'String') returns contents of npx as text 2374 % str2double(get(hObject,'String')) returns contents of npx as a double 3092 2375 3093 2376 3094 2377 % --- Executes during object creation, after setting all properties. 3095 function edit84_CreateFcn(hObject, eventdata, handles)3096 % hObject handle to edit84(see GCBO)2378 function npx_CreateFcn(hObject, eventdata, handles) 2379 % hObject handle to npx (see GCBO) 3097 2380 % eventdata reserved - to be defined in a future version of MATLAB 3098 2381 % handles empty - handles not created until after all CreateFcns called … … 3106 2389 3107 2390 3108 function edit85_Callback(hObject, eventdata, handles)3109 % hObject handle to edit85(see GCBO)2391 function npy_Callback(hObject, eventdata, handles) 2392 % hObject handle to npy (see GCBO) 3110 2393 % eventdata reserved - to be defined in a future version of MATLAB 3111 2394 % handles structure with handles and user data (see GUIDATA) 3112 2395 3113 % Hints: get(hObject,'String') returns contents of edit85as text3114 % str2double(get(hObject,'String')) returns contents of edit85as a double2396 % Hints: get(hObject,'String') returns contents of npy as text 2397 % str2double(get(hObject,'String')) returns contents of npy as a double 3115 2398 3116 2399 3117 2400 % --- Executes during object creation, after setting all properties. 3118 function edit85_CreateFcn(hObject, eventdata, handles)3119 % hObject handle to edit85(see GCBO)2401 function npy_CreateFcn(hObject, eventdata, handles) 2402 % hObject handle to npy (see GCBO) 3120 2403 % eventdata reserved - to be defined in a future version of MATLAB 3121 2404 % handles empty - handles not created until after all CreateFcns called … … 3130 2413 3131 2414 function edit86_Callback(hObject, eventdata, handles) 3132 % hObject handle to edit86(see GCBO)2415 % hObject handle to MaxA (see GCBO) 3133 2416 % eventdata reserved - to be defined in a future version of MATLAB 3134 2417 % handles structure with handles and user data (see GUIDATA) 3135 2418 3136 % Hints: get(hObject,'String') returns contents of edit86as text3137 % str2double(get(hObject,'String')) returns contents of edit86as a double2419 % Hints: get(hObject,'String') returns contents of MaxA as text 2420 % str2double(get(hObject,'String')) returns contents of MaxA as a double 3138 2421 3139 2422 3140 2423 % --- Executes during object creation, after setting all properties. 3141 function edit86_CreateFcn(hObject, eventdata, handles)3142 % hObject handle to edit86(see GCBO)2424 function MaxA_CreateFcn(hObject, eventdata, handles) 2425 % hObject handle to MaxA (see GCBO) 3143 2426 % eventdata reserved - to be defined in a future version of MATLAB 3144 2427 % handles empty - handles not created until after all CreateFcns called … … 3153 2436 3154 2437 function edit87_Callback(hObject, eventdata, handles) 3155 % hObject handle to edit87(see GCBO)2438 % hObject handle to MinA (see GCBO) 3156 2439 % eventdata reserved - to be defined in a future version of MATLAB 3157 2440 % handles structure with handles and user data (see GUIDATA) 3158 2441 3159 % Hints: get(hObject,'String') returns contents of edit87as text3160 % str2double(get(hObject,'String')) returns contents of edit87as a double2442 % Hints: get(hObject,'String') returns contents of MinA as text 2443 % str2double(get(hObject,'String')) returns contents of MinA as a double 3161 2444 3162 2445 3163 2446 % --- Executes during object creation, after setting all properties. 3164 function edit87_CreateFcn(hObject, eventdata, handles)3165 % hObject handle to edit87(see GCBO)2447 function MinA_CreateFcn(hObject, eventdata, handles) 2448 % hObject handle to MinA (see GCBO) 3166 2449 % eventdata reserved - to be defined in a future version of MATLAB 3167 2450 % handles empty - handles not created until after all CreateFcns called … … 3174 2457 3175 2458 3176 % --- Executes on button press in checkbox39.3177 function checkbox39_Callback(hObject, eventdata, handles)3178 % hObject handle to checkbox39(see GCBO)2459 % --- Executes on button press in auto_sclar. 2460 function auto_sclar_Callback(hObject, eventdata, handles) 2461 % hObject handle to auto_sclar (see GCBO) 3179 2462 % eventdata reserved - to be defined in a future version of MATLAB 3180 2463 % handles structure with handles and user data (see GUIDATA) 3181 2464 3182 % Hint: get(hObject,'Value') returns toggle state of checkbox392465 % Hint: get(hObject,'Value') returns toggle state of auto_sclar 3183 2466 3184 2467 3185 2468 3186 2469 function edit88_Callback(hObject, eventdata, handles) 3187 % hObject handle to edit88(see GCBO)2470 % hObject handle to IncrA (see GCBO) 3188 2471 % eventdata reserved - to be defined in a future version of MATLAB 3189 2472 % handles structure with handles and user data (see GUIDATA) 3190 2473 3191 % Hints: get(hObject,'String') returns contents of edit88as text3192 % str2double(get(hObject,'String')) returns contents of edit88as a double2474 % Hints: get(hObject,'String') returns contents of IncrA as text 2475 % str2double(get(hObject,'String')) returns contents of IncrA as a double 3193 2476 3194 2477 3195 2478 % --- Executes during object creation, after setting all properties. 3196 function edit88_CreateFcn(hObject, eventdata, handles)3197 % hObject handle to edit88(see GCBO)2479 function IncrA_CreateFcn(hObject, eventdata, handles) 2480 % hObject handle to IncrA (see GCBO) 3198 2481 % eventdata reserved - to be defined in a future version of MATLAB 3199 2482 % handles empty - handles not created until after all CreateFcns called … … 3206 2489 3207 2490 3208 % --- Executes on button press in checkbox40.2491 % --- Executes on button press in AutoScal. 3209 2492 function checkbox40_Callback(hObject, eventdata, handles) 3210 % hObject handle to checkbox40(see GCBO)2493 % hObject handle to AutoScal (see GCBO) 3211 2494 % eventdata reserved - to be defined in a future version of MATLAB 3212 2495 % handles structure with handles and user data (see GUIDATA) 3213 2496 3214 % Hint: get(hObject,'Value') returns toggle state of checkbox402497 % Hint: get(hObject,'Value') returns toggle state of AutoScal 3215 2498 3216 2499 … … 3240 2523 3241 2524 function edit83_Callback(hObject, eventdata, handles) 3242 % hObject handle to edit83(see GCBO)2525 % hObject handle to min_vec (see GCBO) 3243 2526 % eventdata reserved - to be defined in a future version of MATLAB 3244 2527 % handles structure with handles and user data (see GUIDATA) 3245 2528 3246 % Hints: get(hObject,'String') returns contents of edit83as text3247 % str2double(get(hObject,'String')) returns contents of edit83as a double2529 % Hints: get(hObject,'String') returns contents of min_vec as text 2530 % str2double(get(hObject,'String')) returns contents of min_vec as a double 3248 2531 3249 2532 3250 2533 % --- Executes during object creation, after setting all properties. 3251 function edit83_CreateFcn(hObject, eventdata, handles)3252 % hObject handle to edit83(see GCBO)2534 function min_vec_CreateFcn(hObject, eventdata, handles) 2535 % hObject handle to min_vec (see GCBO) 3253 2536 % eventdata reserved - to be defined in a future version of MATLAB 3254 2537 % handles empty - handles not created until after all CreateFcns called … … 3305 2588 3306 2589 3307 % --- Executes on button press in checkbox41.2590 % --- Executes on button press in AutoVecColor. 3308 2591 function checkbox41_Callback(hObject, eventdata, handles) 3309 % hObject handle to checkbox41(see GCBO)2592 % hObject handle to AutoVecColor (see GCBO) 3310 2593 % eventdata reserved - to be defined in a future version of MATLAB 3311 2594 % handles structure with handles and user data (see GUIDATA) 3312 2595 3313 % Hint: get(hObject,'Value') returns toggle state of checkbox412596 % Hint: get(hObject,'Value') returns toggle state of AutoVecColor 3314 2597 3315 2598 3316 2599 3317 2600 function edit89_Callback(hObject, eventdata, handles) 3318 % hObject handle to edit89(see GCBO)2601 % hObject handle to max_vec (see GCBO) 3319 2602 % eventdata reserved - to be defined in a future version of MATLAB 3320 2603 % handles structure with handles and user data (see GUIDATA) 3321 2604 3322 % Hints: get(hObject,'String') returns contents of edit89as text3323 % str2double(get(hObject,'String')) returns contents of edit89as a double2605 % Hints: get(hObject,'String') returns contents of max_vec as text 2606 % str2double(get(hObject,'String')) returns contents of max_vec as a double 3324 2607 3325 2608 3326 2609 % --- Executes during object creation, after setting all properties. 3327 function edit89_CreateFcn(hObject, eventdata, handles)3328 % hObject handle to edit89(see GCBO)2610 function max_vec_CreateFcn(hObject, eventdata, handles) 2611 % hObject handle to max_vec (see GCBO) 3329 2612 % eventdata reserved - to be defined in a future version of MATLAB 3330 2613 % handles empty - handles not created until after all CreateFcns called … … 3360 2643 3361 2644 3362 % --- Executes on button press in pushbutton35.2645 % --- Executes on button press in vec_col_bar. 3363 2646 function pushbutton35_Callback(hObject, eventdata, handles) 3364 % hObject handle to pushbutton35(see GCBO)2647 % hObject handle to vec_col_bar (see GCBO) 3365 2648 % eventdata reserved - to be defined in a future version of MATLAB 3366 2649 % handles structure with handles and user data (see GUIDATA) 3367 2650 3368 2651 2652 function close_fcn(hObject, eventdata, handles) 2653 huvmat=findobj(allchild(0),'Name','uvmat'); 2654 hhuvmat=guidata(huvmat); 2655 set(hhuvmat.list_object_2,'Visible','off')
Note: See TracChangeset
for help on using the changeset viewer.