1 |
|
---|
2 | %'view_field': function associated with the GUI 'view_field.fig' for images and data field visualization
|
---|
3 | %------------------------------------------------------------------------
|
---|
4 | % function huvmat=view_field(input)
|
---|
5 | %
|
---|
6 | %OUTPUT
|
---|
7 | % huvmat=current handles of the GUI view_field.fig
|
---|
8 | %%
|
---|
9 | %
|
---|
10 | %INPUT:
|
---|
11 | % input: input file name (if character chain), or input image matrix to
|
---|
12 | % visualize, or Matlab structure representing netcdf fields (with fields
|
---|
13 | % ListVarName....)
|
---|
14 | %
|
---|
15 | %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
---|
16 | % Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, joel.sommeria@legi.grenoble-inp.fr.
|
---|
17 | %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
---|
18 | % This open is part of the toolbox VIEW_FIELD.
|
---|
19 | %
|
---|
20 | % VIEW_FIELD is free software; you can redistribute it and/or modify
|
---|
21 | % it under the terms of the GNU General Public License as published by
|
---|
22 | % the Free Software Foundation; either version 2 of the License, or
|
---|
23 | % (at your option) any later version.
|
---|
24 | %
|
---|
25 | % VIEW_FIELD is distributed in the hope that it will be useful,
|
---|
26 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
27 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
28 | % GNU General Public License (open VIEW_FIELD/COPYING.txt) for more details.
|
---|
29 | %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
---|
30 |
|
---|
31 | %-------------------------------------------------------------------
|
---|
32 | % I - MAIN FUNCTION VIEW_FIELD (DO NOT MODIFY)
|
---|
33 | %-------------------------------------------------------------------
|
---|
34 | %-------------------------------------------------------------------
|
---|
35 | function varargout = view_field(varargin)
|
---|
36 |
|
---|
37 | % Begin initialization code - DO NOT EDIT
|
---|
38 | gui_Singleton = 1;
|
---|
39 | gui_State = struct('gui_Name', mfilename, ...
|
---|
40 | 'gui_Singleton', gui_Singleton, ...
|
---|
41 | 'gui_OpeningFcn', @view_field_OpeningFcn, ...
|
---|
42 | 'gui_OutputFcn', @view_field_OutputFcn, ...
|
---|
43 | 'gui_LayoutFcn', [], ...
|
---|
44 | 'gui_Callback', []);
|
---|
45 | if nargin && ischar(varargin{1})
|
---|
46 | gui_State.gui_Callback = str2func(varargin{1});
|
---|
47 | end
|
---|
48 |
|
---|
49 | if nargout
|
---|
50 | varargout{1:nargout} = gui_mainfcn(gui_State, varargin{:});
|
---|
51 | else
|
---|
52 | gui_mainfcn(gui_State, varargin{:});
|
---|
53 | end
|
---|
54 | % End initialization code - DO NOT EDIT
|
---|
55 |
|
---|
56 | %-------------------------------------------------------------------
|
---|
57 | % --- Executes just before view_field is made visible.
|
---|
58 | function view_field_OpeningFcn(hObject, eventdata, handles, Field )
|
---|
59 | %-------------------------------------------------------------------
|
---|
60 |
|
---|
61 | % Choose default command menuline output for view_field
|
---|
62 | handles.output = handles.axes3;
|
---|
63 |
|
---|
64 | % Update handles structure
|
---|
65 | guidata(hObject, handles);
|
---|
66 |
|
---|
67 | dircur=pwd; %current working directory
|
---|
68 | dir_opening=dircur;
|
---|
69 |
|
---|
70 | % set the position of colorbar and ancillary GUIs:
|
---|
71 | set(hObject,'Units','Normalized')
|
---|
72 | handles_mouse=handles;
|
---|
73 | huvmat=findobj(allchild(0),'Name','uvmat');
|
---|
74 | if ~isempty(huvmat)
|
---|
75 | hhuvmat=guidata(huvmat);
|
---|
76 | set(hhuvmat.list_object_2,'Visible','on')
|
---|
77 | % handles_mouse.create=hhuvmat.create;
|
---|
78 | handles_mouse.edit=hhuvmat.edit;
|
---|
79 | pos_uvmat=get(huvmat,'Position');
|
---|
80 | pos_view_field(1)=pos_uvmat(1)+pos_uvmat(3)/2;
|
---|
81 | pos_view_field(2)=pos_uvmat(2)-pos_uvmat(3)/4;
|
---|
82 | pos_view_field(3:4)=pos_uvmat(3:4);
|
---|
83 | set(hObject,'Position',pos_view_field)
|
---|
84 | end
|
---|
85 |
|
---|
86 | %functions for the mouse and keyboard
|
---|
87 | set(hObject,'KeyPressFcn',{'keyboard_callback',handles_mouse})%set keyboard action function
|
---|
88 | set(hObject,'WindowButtonMotionFcn',{'mouse_motion',handles_mouse})%set mouse action functio
|
---|
89 | set(hObject,'WindowButtonDownFcn',{'mouse_down'})%set mouse click action function
|
---|
90 | set(hObject,'WindowButtonUpFcn',{'mouse_up',handles_mouse})
|
---|
91 | set(hObject,'CloseRequestFcn',{@closefcn})%
|
---|
92 |
|
---|
93 | [PlotType,PlotParamOut]= plot_field(Field,handles.axes3);%,PlotParam,KeepLim,PosColorbar)
|
---|
94 | set(handles.axes3,'UserData',Field);%store the current field
|
---|
95 | if isfield(PlotParamOut,'Vectors')
|
---|
96 | set(handles.VECT_title,'Visible','on')
|
---|
97 | end
|
---|
98 | write_plot_param(handles,PlotParamOut);% update the display of the plotting parameters
|
---|
99 |
|
---|
100 | %-------------------------------------------------------------------
|
---|
101 | % --- Outputs from this function are returned to the command menuline.
|
---|
102 | function varargout = view_field_OutputFcn(hObject, eventdata, handles)
|
---|
103 | varargout{1} = handles.output;% the only output argument is the handle to the GUI figure
|
---|
104 |
|
---|
105 |
|
---|
106 | %-------------------------------------------------------------------
|
---|
107 | %-------------------------------------------------------------------
|
---|
108 | % II - FUNCTIONS FOR INTRODUCING THE INPUT FILES
|
---|
109 | % automatically sets the global properties when the rootfile name is introduced
|
---|
110 | % then activate the view-field action if selected
|
---|
111 | % it is activated either by clicking on the RootPath window or by the
|
---|
112 | % browser
|
---|
113 | %------------------------------------------------------------------
|
---|
114 | %------------------------------------------------------------------
|
---|
115 |
|
---|
116 | %-------------------------------------------------------------------
|
---|
117 | function update_mask(handles,num_i1,num_j1)
|
---|
118 | %-------------------------------------------------------------------
|
---|
119 |
|
---|
120 | MaskData=get(handles.mask_test,'UserData');
|
---|
121 | if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
|
---|
122 | uistack(MaskData.maskhandle,'top');
|
---|
123 | end
|
---|
124 | num_i1_mask=mod(num_i1-1,MaskData.NbSlice)+1;
|
---|
125 | [MaskName,mdetect]=name_generator(MaskData.Base,num_i1_mask,num_j1,'.png',MaskData.NomType);
|
---|
126 | huvmat=get(handles.mask_test,'parent');
|
---|
127 | UvData=get(huvmat,'UserData');
|
---|
128 |
|
---|
129 | %update mask image if the mask is new
|
---|
130 | if ~ (isfield(UvData,'MaskName') && isequal(UvData.MaskName,MaskName))
|
---|
131 | UvData.MaskName=MaskName; %update the recorded name on UvData
|
---|
132 | set(huvmat,'UserData',UvData);
|
---|
133 | if mdetect==0
|
---|
134 | if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
|
---|
135 | delete(MaskData.maskhandle)
|
---|
136 | end
|
---|
137 | else
|
---|
138 | %read mask image
|
---|
139 | Mask.AName='image';
|
---|
140 | Mask.A=imread(MaskName);
|
---|
141 | npxy=size(Mask.A);
|
---|
142 | Mask.AX=[0.5 npxy(2)-0.5];
|
---|
143 | Mask.AY=[npxy(1)-0.5 0.5 ];
|
---|
144 | Mask.CoordType='px';
|
---|
145 | if isequal(get(handles.slices,'Value'),1)
|
---|
146 | NbSlice=str2num(get(handles.nb_slice,'String'));
|
---|
147 | num_i1=str2num(get(handles.i1,'String'));
|
---|
148 | Mask.ZIndex=mod(num_i1-1,NbSlice)+1;
|
---|
149 | end
|
---|
150 | %px to phys or other transform on field
|
---|
151 | menu_transform=get(handles.transform_fct,'String');
|
---|
152 | choice_value=get(handles.transform_fct,'Value');
|
---|
153 | transform_name=menu_transform{choice_value};%name of the transform fct given by the menu 'transform_fct'
|
---|
154 | transform_list=get(handles.transform_fct,'UserData');
|
---|
155 | transform=transform_list{choice_value};
|
---|
156 | if ~isequal(transform_name,'') && ~isequal(transform_name,'px')
|
---|
157 | if isfield(UvData,'XmlData') && isfield(UvData.XmlData,'GeometryCalib')%use geometry calib recorded from the ImaDoc xml file as first priority
|
---|
158 | Calib=UvData.XmlData.GeometryCalib;
|
---|
159 | Mask=transform(Mask,UvData.XmlData);
|
---|
160 | end
|
---|
161 | end
|
---|
162 | flagmask=Mask.A < 200;
|
---|
163 |
|
---|
164 | %make brown color image
|
---|
165 | imflag(:,:,1)=0.9*flagmask;
|
---|
166 | imflag(:,:,2)=0.7*flagmask;
|
---|
167 | imflag(:,:,3)=zeros(size(flagmask));
|
---|
168 |
|
---|
169 | %update mask image
|
---|
170 | hmask=[]; %default
|
---|
171 | if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
|
---|
172 | hmask=MaskData.maskhandle;
|
---|
173 | end
|
---|
174 | if ~isempty(hmask)
|
---|
175 | set(hmask,'CData',imflag)
|
---|
176 | set(hmask,'AlphaData',flagmask*0.6)
|
---|
177 | set(hmask,'XData',Mask.AX);
|
---|
178 | set(hmask,'YData',Mask.AY);
|
---|
179 | % uistack(hmask,'top')
|
---|
180 | else
|
---|
181 | axes(handles.axes3)
|
---|
182 | hold on
|
---|
183 | MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*flagmask);
|
---|
184 | % set(MaskData.maskhandle,'AlphaData',0.6*flagmask)
|
---|
185 | set(handles.mask_test,'UserData',MaskData)
|
---|
186 | end
|
---|
187 | end
|
---|
188 | end
|
---|
189 |
|
---|
190 |
|
---|
191 | %-------------------------------------------------------------------
|
---|
192 | function MenuExportFigure_Callback(hObject, eventdata, handles)
|
---|
193 | %-------------------------------------------------------------------
|
---|
194 | huvmat=get(handles.MenuExport,'parent');
|
---|
195 | UvData=get(huvmat,'UserData');
|
---|
196 | hfig=figure;
|
---|
197 | newaxes=copyobj(handles.axes3,hfig);
|
---|
198 | map=colormap(handles.axes3);
|
---|
199 | colormap(map);%transmit the current colormap to the zoom fig
|
---|
200 | colorbar
|
---|
201 |
|
---|
202 | %-------------------------------------------------------------------
|
---|
203 | %-------------------------------------------------------------------
|
---|
204 | % III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT'
|
---|
205 | %-------------------------------------------------------------------
|
---|
206 | %-------------------------------------------------------------------
|
---|
207 |
|
---|
208 | %Executes on button press in runplus: make one step forward and call
|
---|
209 | %run0. The step forward is along the fields series 1 or 2 depending on
|
---|
210 | %the scan_i and scan_j check box (exclusive each other)
|
---|
211 | %-------------------------------------------------------------------
|
---|
212 | function runplus_Callback(hObject, eventdata, handles)
|
---|
213 | increment=str2num(get(handles.increment_scan,'String')); %get the field increment d
|
---|
214 | runpm(hObject,eventdata,handles,increment)
|
---|
215 |
|
---|
216 | %-------------------------------------------------------------------
|
---|
217 | %Executes on button press in runmin: make one step backward and call
|
---|
218 | %run0. The step backward is along the fields series 1 or 2 depending on
|
---|
219 | %the scan_i and scan_j check box (exclusive each other)
|
---|
220 | %-------------------------------------------------------------------
|
---|
221 | function runmin_Callback(hObject, eventdata, handles)
|
---|
222 | increment=-str2num(get(handles.increment_scan,'String')); %get the field increment d
|
---|
223 | runpm(hObject,eventdata,handles,increment)
|
---|
224 |
|
---|
225 | %-------------------------------------------------------------------
|
---|
226 | %Executes on button press in runmin: make one step backward and call
|
---|
227 | %run0. The step backward is along the fields series 1 or 2 depending on
|
---|
228 | %the scan_i and scan_j check box (exclusive each other)
|
---|
229 | %-------------------------------------------------------------------
|
---|
230 | function RunMovie_Callback(hObject, eventdata, handles)
|
---|
231 | %------------------------------------------------------------------
|
---|
232 | set(handles.RunMovie,'BackgroundColor',[1 1 0])%paint the command button in yellow
|
---|
233 | drawnow
|
---|
234 | increment=str2num(get(handles.increment_scan,'String')); %get the field increment d
|
---|
235 | set(handles.STOP,'Visible','on')
|
---|
236 | set(handles.speed,'Visible','on')
|
---|
237 | set(handles.speed_txt,'Visible','on')
|
---|
238 | set(handles.RunMovie,'BusyAction','queue')
|
---|
239 | testavi=0;
|
---|
240 | UvData=get(handles.view_field,'UserData');
|
---|
241 |
|
---|
242 | while get(handles.speed,'Value')~=0 & isequal(get(handles.RunMovie,'BusyAction'),'queue') % enable STOP command
|
---|
243 | runpm(hObject,eventdata,handles,increment)
|
---|
244 | pause(1.02-get(handles.speed,'Value'))% wait for next image
|
---|
245 | end
|
---|
246 | if isfield(UvData,'aviobj') && ~isempty( UvData.aviobj),
|
---|
247 | UvData.aviobj=close(UvData.aviobj);
|
---|
248 | set(handles.view_field,'UserData',UvData);
|
---|
249 | end
|
---|
250 | set(handles.RunMovie,'BackgroundColor',[1 0 0])%paint the command buttonback to red
|
---|
251 |
|
---|
252 |
|
---|
253 |
|
---|
254 | %-------------------------------------------------------------------
|
---|
255 | % --- translate coordinate to matrix index
|
---|
256 | %-------------------------------------------------------------------
|
---|
257 | function [indx,indy]=pos2ind(x0,rangx0,nxy)
|
---|
258 | indx=1+round((nxy(2)-1)*(x0-rangx0(1))/(rangx0(2)-rangx0(1)));% index x of pixel
|
---|
259 | indy=1+round((nxy(1)-1)*(y12-rangy0(1))/(rangy0(2)-rangy0(1)));% index y of pixel
|
---|
260 |
|
---|
261 | %-------------------------------------------------------------------
|
---|
262 | % --- Executes on button press in 'FixedLimits'.
|
---|
263 | %-------------------------------------------------------------------
|
---|
264 | function FixedLimits_Callback(hObject, eventdata, handles)
|
---|
265 | test=get(handles.FixedLimits,'Value');
|
---|
266 | if test
|
---|
267 | set(handles.FixedLimits,'BackgroundColor',[1 1 0])
|
---|
268 | else
|
---|
269 | set(handles.FixedLimits,'BackgroundColor',[0.7 0.7 0.7])
|
---|
270 | end
|
---|
271 |
|
---|
272 | %-------------------------------------------------------------------
|
---|
273 | % --- Executes on button press in auto_xy.
|
---|
274 | function auto_xy_Callback(hObject, eventdata, handles)
|
---|
275 | test=get(handles.auto_xy,'Value');
|
---|
276 | if test
|
---|
277 | set(handles.auto_xy,'BackgroundColor',[1 1 0])
|
---|
278 | cla(handles.axes3)
|
---|
279 | update_plot(handles)
|
---|
280 | else
|
---|
281 | set(handles.auto_xy,'BackgroundColor',[0.7 0.7 0.7])
|
---|
282 | update_plot(handles)
|
---|
283 | % axis(handles.axes3,'image')
|
---|
284 | end
|
---|
285 |
|
---|
286 |
|
---|
287 | %-------------------------------------------------------------------
|
---|
288 |
|
---|
289 | %-------------------------------------------------------------------
|
---|
290 | % --- Executes on button press in 'zoom'.
|
---|
291 | %-------------------------------------------------------------------
|
---|
292 | function zoom_Callback(hObject, eventdata, handles)
|
---|
293 | if (get(handles.zoom,'Value') == 1);
|
---|
294 | set(handles.zoom,'BackgroundColor',[1 1 0])
|
---|
295 | set(handles.FixedLimits,'Value',1)% propose by default fixed limits for the plotting axes
|
---|
296 | set(handles.FixedLimits,'BackgroundColor',[1 1 0])
|
---|
297 | else
|
---|
298 | set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
|
---|
299 | end
|
---|
300 |
|
---|
301 | %-------------------------------------------------------------------
|
---|
302 | %----Executes on button press in 'record': records the current flags of manual correction.
|
---|
303 | %-------------------------------------------------------------------
|
---|
304 | function record_Callback(hObject, eventdata, handles)
|
---|
305 | % [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles);
|
---|
306 | filename=read_file_boxes(handles);
|
---|
307 | AxeData=get(gca,'UserData');
|
---|
308 | [erread,message]=fileattrib(filename);
|
---|
309 | if ~isempty(message) && ~isequal(message.UserWrite,1)
|
---|
310 | msgbox_view_field('ERROR',['no writting access to ' filename])
|
---|
311 | return
|
---|
312 | end
|
---|
313 | test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]);
|
---|
314 | test_civ1=isequal(get(handles.civ1,'BackgroundColor'),[1 1 0]);
|
---|
315 | if ~test_civ2 && ~test_civ1
|
---|
316 | msgbox_view_field('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')
|
---|
317 | end
|
---|
318 | if test_civ2
|
---|
319 | nbname='nb_vectors2';
|
---|
320 | flagname='vec2_FixFlag';
|
---|
321 | attrname='fix2';
|
---|
322 | end
|
---|
323 | if test_civ1
|
---|
324 | nbname='nb_vectors';
|
---|
325 | flagname='vec_FixFlag';
|
---|
326 | attrname='fix';
|
---|
327 | end
|
---|
328 | %write fix flags in the netcdf file
|
---|
329 | hhh=which('netcdf.open');% look for built-in matlab netcdf library
|
---|
330 | if ~isequal(hhh,'')% case of new builtin Matlab netcdf library
|
---|
331 | nc=netcdf.open(filename,'NC_WRITE');
|
---|
332 | netcdf.reDef(nc)
|
---|
333 | netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),attrname,1)
|
---|
334 | dimid = netcdf.inqDimID(nc,nbname);
|
---|
335 | try
|
---|
336 | varid = netcdf.inqVarID(nc,flagname);% look for already existing fixflag variable
|
---|
337 | catch
|
---|
338 | varid=netcdf.defVar(nc,flagname,'double',dimid);%create fixflag variable if it does not exist
|
---|
339 | end
|
---|
340 | netcdf.endDef(nc)
|
---|
341 | netcdf.putVar(nc,varid,AxeData.FF);
|
---|
342 | netcdf.close(nc)
|
---|
343 | else %old netcdf library
|
---|
344 | netcdf_toolbox(filename,AxeData,attrname,nbname,flagname)
|
---|
345 | end
|
---|
346 |
|
---|
347 | function netcdf_toolbox(filename,AxeData,attrname,nbname,flagname)
|
---|
348 | nc=netcdf(filename,'write'); %open netcdf file
|
---|
349 | result=redef(nc);
|
---|
350 | eval(['nc.' attrname '=1;']);
|
---|
351 | theDim=nc(nbname) ;% get the number of velocity vectors
|
---|
352 | nb_vectors=size(theDim);
|
---|
353 | var_FixFlag=ncvar(flagname,nc);% var_FixFlag will be written as the netcdf variable vec_FixFlag
|
---|
354 | var_FixFlag(1:nb_vectors)=AxeData.FF;%
|
---|
355 | fin=close(nc);
|
---|
356 |
|
---|
357 |
|
---|
358 | %-------------------------------------------------------------------
|
---|
359 | %-------------------------------------------------------------------
|
---|
360 | % - FUNCTIONS FOR SETTING PLOTTING PARAMETERS
|
---|
361 |
|
---|
362 | %------------------------------------------------------------------
|
---|
363 |
|
---|
364 |
|
---|
365 | %------------------------------------------------------------------
|
---|
366 | % --- Executes on selection change in col_vec: choice of the color code.
|
---|
367 | %
|
---|
368 | function col_vec_Callback(hObject, eventdata, handles)
|
---|
369 | %------------------------------------------------------------------
|
---|
370 | % edit the choice for color code
|
---|
371 | list_code=get(handles.col_vec,'String');% list menu fields
|
---|
372 | index_code=get(handles.col_vec,'Value');% selected string index
|
---|
373 | col_code= list_code{index_code(1)}; % selected field
|
---|
374 | if isequal(col_code,'black') | isequal(col_code,'white')
|
---|
375 | set(handles.slider1,'Visible','off')
|
---|
376 | set(handles.slider2,'Visible','off')
|
---|
377 | set(handles.colcode1,'Visible','off')
|
---|
378 | set(handles.colcode2,'Visible','off')
|
---|
379 | set(handles.AutoVecColor,'Visible','off')
|
---|
380 | set_vec_col_bar(handles)
|
---|
381 | else
|
---|
382 | set(handles.slider1,'Visible','on')
|
---|
383 | set(handles.slider2,'Visible','on')
|
---|
384 | set(handles.colcode1,'Visible','on')
|
---|
385 | set(handles.colcode2,'Visible','on')
|
---|
386 | set(handles.AutoVecColor,'Visible','on')
|
---|
387 | if isequal(col_code,'ima_cor')
|
---|
388 | set(handles.AutoVecColor,'Value',0)%fixed scale by default
|
---|
389 | set(handles.vec_col_bar,'Value',0)% 3 colors r,g,b by default
|
---|
390 | set(handles.slider1,'Min',0);
|
---|
391 | set(handles.slider1,'Max',1);
|
---|
392 | set(handles.slider2,'Min',0);
|
---|
393 | set(handles.slider2,'Max',1);
|
---|
394 | % set(handles.min_C_title_vec,'String','0')
|
---|
395 | set(handles.max_vec,'String','1')
|
---|
396 | set(handles.colcode1,'String','0.333')
|
---|
397 | colcode1_Callback(hObject, eventdata, handles)
|
---|
398 | set(handles.colcode2,'String','0.666')
|
---|
399 | colcode2_Callback(hObject, eventdata, handles)
|
---|
400 | else
|
---|
401 | set(handles.AutoVecColor,'Value',1)%auto scale between min,max by default
|
---|
402 | set(handles.vec_col_bar,'Value',1)% colormap 'jet' by default
|
---|
403 | minval=get(handles.slider1,'Min');
|
---|
404 | maxval=get(handles.slider1,'Max');
|
---|
405 | set(handles.slider1,'Value',minval)
|
---|
406 | set(handles.slider2,'Value',maxval)
|
---|
407 | set_vec_col_bar(handles)
|
---|
408 | end
|
---|
409 | % slider_update(handles)
|
---|
410 | end
|
---|
411 | %replot the current graph
|
---|
412 | run0_Callback(hObject, eventdata, handles)
|
---|
413 |
|
---|
414 |
|
---|
415 | %----------------------------------------------------------------
|
---|
416 | % -- Executes on slider movement to set the color code
|
---|
417 | %
|
---|
418 | function slider1_Callback(hObject, eventdata, handles)
|
---|
419 | %------------------------------------------------------------------
|
---|
420 | slider1=get(handles.slider1,'Value');
|
---|
421 | min_val=str2num(get(handles.min_vec,'String'));
|
---|
422 | max_val=str2num(get(handles.max_vec,'String'));
|
---|
423 | col=min_val+(max_val-min_val)*slider1;
|
---|
424 | set(handles.colcode1,'String',num2str(col))
|
---|
425 | if(get(handles.slider2,'Value') < col)%move also the second slider at the same value if needed
|
---|
426 | set(handles.slider2,'Value',col)
|
---|
427 | set(handles.colcode2,'String',num2str(col))
|
---|
428 | end
|
---|
429 | colcode1_Callback(hObject, eventdata, handles)
|
---|
430 |
|
---|
431 | %----------------------------------------------------------------
|
---|
432 | % Executes on slider movement to set the color code
|
---|
433 | %----------------------------------------------------------------
|
---|
434 | function slider2_Callback(hObject, eventdata, handles)
|
---|
435 | slider2=get(handles.slider2,'Value');
|
---|
436 | min_val=str2num(get(handles.min_vec,'String'));
|
---|
437 | max_val=str2num(get(handles.max_vec,'String'));
|
---|
438 | col=min_val+(max_val-min_val)*slider2;
|
---|
439 | set(handles.colcode2,'String',num2str(col))
|
---|
440 | if(get(handles.slider1,'Value') > col)%move also the first slider at the same value if needed
|
---|
441 | set(handles.slider1,'Value',col)
|
---|
442 | set(handles.colcode1,'String',num2str(col))
|
---|
443 | end
|
---|
444 | colcode2_Callback(hObject, eventdata, handles)
|
---|
445 |
|
---|
446 | %----------------------------------------------------------------
|
---|
447 | %execute on return carriage on the edit box corresponding to slider 1
|
---|
448 | %----------------------------------------------------------------
|
---|
449 | function colcode1_Callback(hObject, eventdata, handles)
|
---|
450 | % col=str2num(get(handles.colcode1,'String'));
|
---|
451 | % set(handles.slider1,'Value',col)
|
---|
452 | set_vec_col_bar(handles)
|
---|
453 | update_plot(handles)
|
---|
454 |
|
---|
455 | %----------------------------------------------------------------
|
---|
456 | %execute on return carriage on the edit box corresponding to slider 2
|
---|
457 | %----------------------------------------------------------------
|
---|
458 | function colcode2_Callback(hObject, eventdata, handles)
|
---|
459 | % col=str2num(get(handles.colcode2,'String'));
|
---|
460 | % set(handles.slider2,'Value',col)
|
---|
461 | % slider2_Callback(hObject, eventdata, handles)
|
---|
462 | set_vec_col_bar(handles)
|
---|
463 | update_plot(handles)
|
---|
464 | %------------------------------------------------------------
|
---|
465 | %update the slider values after displaying vectors
|
---|
466 | %--------------------------------------------------------
|
---|
467 | % function slider_update(handles,auto,minC,colcode1,colcode2,maxC)
|
---|
468 | % set(handles.slider1,'Min',minC)
|
---|
469 | % set(handles.slider1,'Max',maxC)
|
---|
470 | % set(handles.slider2,'Min',minC)
|
---|
471 | % set(handles.slider2,'Max',maxC)
|
---|
472 | % set(handles.min_C_title_vec,'String',num2str(minC))
|
---|
473 | % set(handles.max_vec,'String',num2str(maxC))
|
---|
474 | % if auto
|
---|
475 | % set(handles.colcode1,'String',num2str(colcode1,3))%update display
|
---|
476 | % set(handles.colcode2,'String',num2str(colcode2,3))
|
---|
477 | % end
|
---|
478 | % set(handles.slider1,'Value',colcode1)%update slider with constant display
|
---|
479 | % set(handles.slider2,'Value',colcode2)
|
---|
480 | % set_vec_col_bar(handles)
|
---|
481 |
|
---|
482 |
|
---|
483 | %-------------------------------------------------------
|
---|
484 | % --- Executes on button press in AutoVecColor.
|
---|
485 | %-------------------------------------------------------
|
---|
486 | function vec_col_bar_Callback(hObject, eventdata, handles)
|
---|
487 | set_vec_col_bar(handles)
|
---|
488 |
|
---|
489 | % %--------------------------------------------
|
---|
490 | % %update the display of color code for vectors
|
---|
491 | % %--------------------------------------------
|
---|
492 | % function set_vec_col_bar(handles)
|
---|
493 | % %get the image of the color display button 'vec_col_bar' in pixels
|
---|
494 | % uni=get(handles.vec_col_bar,'Unit');
|
---|
495 | % set(handles.vec_col_bar,'Unit','pixel')
|
---|
496 | % pos_vert=get(handles.vec_col_bar,'Position');
|
---|
497 | % set(handles.vec_col_bar,'Unit','Normalized')
|
---|
498 | % width=ceil(pos_vert(3));
|
---|
499 | % height=ceil(pos_vert(4));
|
---|
500 | % %get slider indications
|
---|
501 | % colcode.min=get(handles.slider1,'Min');
|
---|
502 | % colcode.max=get(handles.slider1,'Max');
|
---|
503 | % colcode.colcode1=get(handles.slider1,'Value');
|
---|
504 | % colcode.colcode2=get(handles.slider2,'Value');
|
---|
505 | % colcode.option=get(handles.vec_col_bar,'Value');
|
---|
506 | % colcode.auto=1;
|
---|
507 | % list_code=get(handles.col_vec,'String');% list menu fields
|
---|
508 | % index_code=get(handles.col_vec,'Value');% selected string index
|
---|
509 | % colcode.CName= list_code{index_code(1)}; % selected field used for vector color
|
---|
510 | % vec_C=colcode.min+(colcode.max-colcode.min)*[0.5:width-0.5]/width;%sample of vec_C values from min to max
|
---|
511 | % [colorlist,col_vec]=set_col_vec(colcode,vec_C);
|
---|
512 | % oneheight=ones(1,height);
|
---|
513 | % A1=colorlist(col_vec,1)*oneheight;
|
---|
514 | % A2=colorlist(col_vec,2)*oneheight;
|
---|
515 | % A3=colorlist(col_vec,3)*oneheight;
|
---|
516 | % A(:,:,1)=A1';
|
---|
517 | % A(:,:,2)=A2';
|
---|
518 | % A(:,:,3)=A3';
|
---|
519 | % set(handles.vec_col_bar,'Cdata',A)
|
---|
520 |
|
---|
521 |
|
---|
522 | %------------------------------------------------
|
---|
523 | %CALLBACKS FOR PLOTTING PARAMETERS
|
---|
524 | %-------------------------------------------------
|
---|
525 |
|
---|
526 | %-----------------------------------------------------------------
|
---|
527 | function MinA_Callback(hObject, eventdata, handles)
|
---|
528 | %------------------------------------------
|
---|
529 | set(handles.AutoScal,'Value',1) %suppress auto mode
|
---|
530 | set(handles.AutoScal,'BackgroundColor',[1 1 0])
|
---|
531 | update_plot(handles)
|
---|
532 |
|
---|
533 | %-----------------------------------------------------------------
|
---|
534 | function MaxA_Callback(hObject, eventdata, handles)
|
---|
535 | %--------------------------------------------
|
---|
536 | set(handles.AutoScal,'Value',1) %suppress auto mode
|
---|
537 | set(handles.AutoScal,'BackgroundColor',[1 1 0])
|
---|
538 | update_plot(handles)
|
---|
539 |
|
---|
540 | %-----------------------------------------------
|
---|
541 | function AutoScal_Callback(hObject, eventdata, handles)
|
---|
542 | %--------------------------------------------
|
---|
543 | test=get(handles.AutoScal,'Value');
|
---|
544 | if test
|
---|
545 | set(handles.AutoScal,'BackgroundColor',[1 1 0])
|
---|
546 | else
|
---|
547 | set(handles.AutoScal,'BackgroundColor',[0.7 0.7 0.7])
|
---|
548 | update_plot(handles);
|
---|
549 | % set(handles.MinA,'String',num2str(ScalOut.MinA,3))
|
---|
550 | % set(handles.MaxA,'String',num2str(ScalOut.MaxA,3))
|
---|
551 | end
|
---|
552 |
|
---|
553 | %-------------------------------------------------------------------
|
---|
554 | function BW_Callback(hObject, eventdata, handles)
|
---|
555 | %-------------------------------------------------------------------
|
---|
556 | update_plot(handles)
|
---|
557 |
|
---|
558 | %-------------------------------------------------------------------
|
---|
559 | function Contours_Callback(hObject, eventdata, handles)
|
---|
560 | %-------------------------------------------------------------------
|
---|
561 | val=get(handles.Contours,'Value');
|
---|
562 | if val==2
|
---|
563 | set(handles.interval_txt,'Visible','on')
|
---|
564 | set(handles.IncrA,'Visible','on')
|
---|
565 | else
|
---|
566 | set(handles.interval_txt,'Visible','off')
|
---|
567 | set(handles.IncrA,'Visible','off')
|
---|
568 | end
|
---|
569 | update_plot(handles)
|
---|
570 |
|
---|
571 | %-------------------------------------------------------------------
|
---|
572 | function IncrA_Callback(hObject, eventdata, handles)
|
---|
573 | %-------------------------------------------------------------------
|
---|
574 | update_plot(handles)
|
---|
575 |
|
---|
576 | %-------------------------------------------------------------------
|
---|
577 | function HideWarning_Callback(hObject, eventdata, handles)
|
---|
578 | %-------------------------------------------------------------------
|
---|
579 | update_plot(handles)
|
---|
580 |
|
---|
581 | %-------------------------------------------------------------------
|
---|
582 | function HideFalse_Callback(hObject, eventdata, handles)
|
---|
583 | %-------------------------------------------------------------------
|
---|
584 | update_plot(handles)
|
---|
585 |
|
---|
586 | %-------------------------------------------------------------------
|
---|
587 | function VecScale_Callback(hObject, eventdata, handles)
|
---|
588 | %-------------------------------------------------------------------
|
---|
589 | set(handles.AutoVec,'Value',1);
|
---|
590 | set(handles.AutoVec,'BackgroundColor',[1 1 0])
|
---|
591 | update_plot(handles)
|
---|
592 |
|
---|
593 | %-------------------------------------------------------------------
|
---|
594 | function AutoVec_Callback(hObject, eventdata, handles)
|
---|
595 | %-------------------------------------------------------------------
|
---|
596 | test=get(handles.AutoVec,'Value');
|
---|
597 | if test
|
---|
598 | set(handles.AutoVec,'BackgroundColor',[1 1 0])
|
---|
599 | else
|
---|
600 | update_plot(handles);
|
---|
601 | %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3))
|
---|
602 | set(handles.AutoVec,'BackgroundColor',[0.7 0.7 0.7])
|
---|
603 | end
|
---|
604 |
|
---|
605 | %-------------------------------------------------------
|
---|
606 | % --- Executes on selection change in decimate4 (nb_vec/4).
|
---|
607 | %-------------------------------------------------------
|
---|
608 | function decimate4_Callback(hObject, eventdata, handles)
|
---|
609 | 'TEST'
|
---|
610 | update_plot(handles)
|
---|
611 |
|
---|
612 |
|
---|
613 | %-------------------------------------------------------
|
---|
614 | % --- Executes on selection change in color_code menu
|
---|
615 | %-------------------------------------------------------
|
---|
616 | function color_code_Callback(hObject, eventdata, handles)
|
---|
617 | set_vec_col_bar(handles)
|
---|
618 | update_plot(handles);
|
---|
619 |
|
---|
620 | %-------------------------------------------------------
|
---|
621 | % --- Executes on button press in AutoVecColor.
|
---|
622 | %-------------------------------------------------------
|
---|
623 | function AutoVecColor_Callback(hObject, eventdata, handles)
|
---|
624 | test=get(handles.AutoVecColor,'Value');
|
---|
625 | if test
|
---|
626 | set(handles.AutoVecColor,'BackgroundColor',[1 1 0])
|
---|
627 | else
|
---|
628 | update_plot(handles);
|
---|
629 | %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3))
|
---|
630 | set(handles.AutoVecColor,'BackgroundColor',[0.7 0.7 0.7])
|
---|
631 | end
|
---|
632 | %set_vec_col_bar(handles)
|
---|
633 |
|
---|
634 | %-------------------------------------------------------
|
---|
635 | % --- Executes on selection change in max_vec.
|
---|
636 | %-------------------------------------------------------
|
---|
637 | function min_vec_Callback(hObject, eventdata, handles)
|
---|
638 | max_vec_Callback(hObject, eventdata, handles)
|
---|
639 |
|
---|
640 | % --- Executes on selection change in max_vec.
|
---|
641 | function max_vec_Callback(hObject, eventdata, handles)
|
---|
642 | set(handles.AutoVecColor,'Value',1)
|
---|
643 | AutoVecColor_Callback(hObject, eventdata, handles)
|
---|
644 | min_val=str2num(get(handles.min_vec,'String'));
|
---|
645 | max_val=str2num(get(handles.max_vec,'String'));
|
---|
646 | slider1=get(handles.slider1,'Value');
|
---|
647 | slider2=get(handles.slider2,'Value');
|
---|
648 | colcode1=min_val+(max_val-min_val)*slider1;
|
---|
649 | colcode2=min_val+(max_val-min_val)*slider2;
|
---|
650 | set(handles.colcode1,'String',num2str(colcode1))
|
---|
651 | set(handles.colcode2,'String',num2str(colcode2))
|
---|
652 | update_plot(handles);
|
---|
653 |
|
---|
654 | %-------------------------------------------------------------------
|
---|
655 | %update the display of color code for vectors
|
---|
656 | function set_vec_col_bar(handles)
|
---|
657 | %-------------------------------------------------------------------
|
---|
658 | %get the image of the color display button 'vec_col_bar' in pixels
|
---|
659 | set(handles.vec_col_bar,'Unit','pixel');
|
---|
660 | pos_vert=get(handles.vec_col_bar,'Position');
|
---|
661 | set(handles.vec_col_bar,'Unit','Normalized');
|
---|
662 | width=ceil(pos_vert(3));
|
---|
663 | height=ceil(pos_vert(4));
|
---|
664 |
|
---|
665 | %get slider indications
|
---|
666 | list=get(handles.color_code,'String');
|
---|
667 | ichoice=get(handles.color_code,'Value');
|
---|
668 | colcode.ColorCode=list{ichoice};
|
---|
669 | colcode.MinC=str2num(get(handles.min_vec,'String'));
|
---|
670 | colcode.MaxC=str2num(get(handles.max_vec,'String'));
|
---|
671 | test3color=strcmp(colcode.ColorCode,'rgb') || strcmp(colcode.ColorCode,'bgr');
|
---|
672 | if test3color
|
---|
673 | colcode.colcode1=str2num(get(handles.colcode1,'String'));
|
---|
674 | colcode.colcode2=str2num(get(handles.colcode2,'String'));
|
---|
675 | end
|
---|
676 | % colcode.option=get(handles.vec_col_bar,'Value');
|
---|
677 | colcode.FixedCbounds=0;
|
---|
678 | % list_code=get(handles.col_vec,'String');% list menu fields
|
---|
679 | % index_code=get(handles.col_vec,'Value');% selected string index
|
---|
680 | % colcode.CName= list_code{index_code(1)}; % selected field used for vector color
|
---|
681 | colcode.FixedCbounds=1;
|
---|
682 | vec_C=colcode.MinC+(colcode.MaxC-colcode.MinC)*[0.5:width-0.5]/width;%sample of vec_C values from min to max
|
---|
683 | [colorlist,col_vec]=set_col_vec(colcode,vec_C);
|
---|
684 | oneheight=ones(1,height);
|
---|
685 | A1=colorlist(col_vec,1)*oneheight;
|
---|
686 | A2=colorlist(col_vec,2)*oneheight;
|
---|
687 | A3=colorlist(col_vec,3)*oneheight;
|
---|
688 | A(:,:,1)=A1';
|
---|
689 | A(:,:,2)=A2';
|
---|
690 | A(:,:,3)=A3';
|
---|
691 | set(handles.vec_col_bar,'Cdata',A)
|
---|
692 |
|
---|
693 | %-------------------------------------------------------------------
|
---|
694 | function [PlotType,ScalOut]=update_plot(handles)
|
---|
695 | %-------------------------------------------------------------------
|
---|
696 | haxes= handles.axes3;
|
---|
697 | %huvmat=findobj(allchild(0),'tag','uvmat');
|
---|
698 | ProjField=get(haxes,'UserData');
|
---|
699 | PlotParam=read_plot_param(handles);
|
---|
700 | [PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1);
|
---|
701 | write_plot_param(handles,PlotParamOut); %update the auto plot parameters
|
---|
702 |
|
---|
703 | %------------------------------------------------------
|
---|
704 | % --- Executes on button press in Menu/Export/field in workspace.
|
---|
705 | %------------------------------------------------------
|
---|
706 | function MenuExportField_Callback(hObject, eventdata, handles)
|
---|
707 |
|
---|
708 | global Data_view_field
|
---|
709 | % huvmat=findobj(allchild(0),'Name','uvmat');
|
---|
710 | Data_view_field=get(handles.axes3,'UserData');
|
---|
711 | % Data_view_field=UvData.ProjField_2;
|
---|
712 | evalin('base','global Data_view_field')%make CurData global in the workspace
|
---|
713 | display(['UserData of view_field :'])
|
---|
714 | evalin('base','Data_view_field') %display CurData in the workspace
|
---|
715 | commandwindow;
|
---|
716 |
|
---|
717 | %------------------------------------------------------
|
---|
718 | % --- Executes on button press in Menu/Export/extract figure.
|
---|
719 | %------------------------------------------------------
|
---|
720 | function MenuExport_plot_Callback(hObject, eventdata, handles)
|
---|
721 | huvmat=get(handles.MenuExport_plot,'parent');
|
---|
722 | UvData=get(huvmat,'UserData');
|
---|
723 | hfig=figure;
|
---|
724 | newaxes=copyobj(handles.axes3,hfig);
|
---|
725 | map=colormap(handles.axes3);
|
---|
726 | colormap(map);%transmit the current colormap to the zoom fig
|
---|
727 | colorbar
|
---|
728 |
|
---|
729 |
|
---|
730 |
|
---|
731 | function npx_Callback(hObject, eventdata, handles)
|
---|
732 |
|
---|
733 |
|
---|
734 |
|
---|
735 | function npy_Callback(hObject, eventdata, handles)
|
---|
736 |
|
---|
737 |
|
---|
738 | function edit86_Callback(hObject, eventdata, handles)
|
---|
739 |
|
---|
740 |
|
---|
741 | function edit87_Callback(hObject, eventdata, handles)
|
---|
742 |
|
---|
743 |
|
---|
744 | % --- Executes on button press in auto_sclar.
|
---|
745 | function auto_sclar_Callback(hObject, eventdata, handles)
|
---|
746 | % hObject handle to auto_sclar (see GCBO)
|
---|
747 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
748 | % handles structure with handles and user data (see GUIDATA)
|
---|
749 |
|
---|
750 | % Hint: get(hObject,'Value') returns toggle state of auto_sclar
|
---|
751 |
|
---|
752 |
|
---|
753 |
|
---|
754 | % --- Executes on slider movement.
|
---|
755 | function slider9_Callback(hObject, eventdata, handles)
|
---|
756 | % hObject handle to slider2 (see GCBO)
|
---|
757 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
758 | % handles structure with handles and user data (see GUIDATA)
|
---|
759 |
|
---|
760 | % Hints: get(hObject,'Value') returns position of slider
|
---|
761 | % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
|
---|
762 |
|
---|
763 |
|
---|
764 | % --- Executes on slider movement.
|
---|
765 | function slider10_Callback(hObject, eventdata, handles)
|
---|
766 | % hObject handle to slider1 (see GCBO)
|
---|
767 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
768 | % handles structure with handles and user data (see GUIDATA)
|
---|
769 |
|
---|
770 | % Hints: get(hObject,'Value') returns position of slider
|
---|
771 | % get(hObject,'Min') and get(hObject,'Max') to determine range of
|
---|
772 | % slider
|
---|
773 |
|
---|
774 |
|
---|
775 | function closefcn(hObject, eventdata, handles)
|
---|
776 | huvmat=findobj(allchild(0),'Name','uvmat');
|
---|
777 | hhuvmat=guidata(huvmat);
|
---|
778 | list_object_2=get(hhuvmat.list_object_2,'String');
|
---|
779 | set(hhuvmat.list_object_2,'Value',numel(list_object_2))%select the last value ('...')
|
---|
780 | delete(hObject)
|
---|
781 |
|
---|
782 |
|
---|
783 |
|
---|
784 | % --- Executes on selection change in popupmenu18.
|
---|
785 | function popupmenu18_Callback(hObject, eventdata, handles)
|
---|
786 |
|
---|
787 |
|
---|
788 | function edit91_Callback(hObject, eventdata, handles)
|
---|
789 | % hObject handle to edit91 (see GCBO)
|
---|
790 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
791 | % handles structure with handles and user data (see GUIDATA)
|
---|
792 |
|
---|
793 | % Hints: get(hObject,'String') returns contents of edit91 as text
|
---|
794 | % str2double(get(hObject,'String')) returns contents of edit91 as a double
|
---|
795 |
|
---|
796 |
|
---|
797 | % --- Executes on button press in checkbox45.
|
---|
798 | function checkbox45_Callback(hObject, eventdata, handles)
|
---|
799 | % hObject handle to checkbox45 (see GCBO)
|
---|
800 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
801 | % handles structure with handles and user data (see GUIDATA)
|
---|
802 |
|
---|
803 | % Hint: get(hObject,'Value') returns toggle state of checkbox45
|
---|
804 |
|
---|
805 |
|
---|
806 | % --- Executes on selection change in popupmenu19.
|
---|
807 | function popupmenu19_Callback(hObject, eventdata, handles)
|
---|
808 | % hObject handle to popupmenu19 (see GCBO)
|
---|
809 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
810 | % handles structure with handles and user data (see GUIDATA)
|
---|
811 |
|
---|
812 | % Hints: contents = get(hObject,'String') returns popupmenu19 contents as cell array
|
---|
813 | % contents{get(hObject,'Value')} returns selected item from popupmenu19
|
---|
814 |
|
---|
815 |
|
---|
816 |
|
---|
817 |
|
---|
818 |
|
---|
819 |
|
---|
820 |
|
---|
821 | function text_display_Callback(hObject, eventdata, handles)
|
---|
822 | % hObject handle to text_display (see GCBO)
|
---|
823 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
824 | % handles structure with handles and user data (see GUIDATA)
|
---|
825 |
|
---|
826 | % Hints: get(hObject,'String') returns contents of text_display as text
|
---|
827 | % str2double(get(hObject,'String')) returns contents of text_display as a double
|
---|
828 |
|
---|
829 |
|
---|
830 | % --- Executes during object creation, after setting all properties.
|
---|
831 | function text_display_CreateFcn(hObject, eventdata, handles)
|
---|
832 | % hObject handle to text_display (see GCBO)
|
---|
833 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
834 | % handles empty - handles not created until after all CreateFcns called
|
---|
835 |
|
---|
836 | % Hint: edit controls usually have a white background on Windows.
|
---|
837 | % See ISPC and COMPUTER.
|
---|
838 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
839 | set(hObject,'BackgroundColor','white');
|
---|
840 | end
|
---|
841 |
|
---|
842 |
|
---|