1 | %'view_field': function associated with the GUI 'view_field.fig' for images and data field visualization
|
---|
2 | %------------------------------------------------------------------------
|
---|
3 | % function huvmat=view_field(input)
|
---|
4 | %
|
---|
5 | %OUTPUT
|
---|
6 | % huvmat=current handles of the GUI view_field.fig
|
---|
7 | %%
|
---|
8 | %
|
---|
9 | %INPUT:
|
---|
10 | % input: input file name (if character chain), or input image matrix to
|
---|
11 | % visualize, or Matlab structure representing netcdf fields (with fields
|
---|
12 | % ListVarName....)
|
---|
13 | %
|
---|
14 | %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
---|
15 | % Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, joel.sommeria@legi.grenoble-inp.fr.
|
---|
16 | %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
---|
17 | % This open is part of the toolbox VIEW_FIELD.
|
---|
18 | %
|
---|
19 | % VIEW_FIELD is free software; you can redistribute it and/or modify
|
---|
20 | % it under the terms of the GNU General Public License as published by
|
---|
21 | % the Free Software Foundation; either version 2 of the License, or
|
---|
22 | % (at your option) any later version.
|
---|
23 | %
|
---|
24 | % VIEW_FIELD is distributed in the hope that it will be useful,
|
---|
25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
27 | % GNU General Public License (open VIEW_FIELD/COPYING.txt) for more details.
|
---|
28 | %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
---|
29 |
|
---|
30 | %-------------------------------------------------------------------
|
---|
31 | % I - MAIN FUNCTION VIEW_FIELD (DO NOT MODIFY)
|
---|
32 | %-------------------------------------------------------------------
|
---|
33 | %-------------------------------------------------------------------
|
---|
34 | function varargout = view_field(varargin)
|
---|
35 |
|
---|
36 | % Begin initialization code - DO NOT EDIT
|
---|
37 | gui_Singleton = 1;
|
---|
38 | gui_State = struct('gui_Name', mfilename, ...
|
---|
39 | 'gui_Singleton', gui_Singleton, ...
|
---|
40 | 'gui_OpeningFcn', @view_field_OpeningFcn, ...
|
---|
41 | 'gui_OutputFcn', @view_field_OutputFcn, ...
|
---|
42 | 'gui_LayoutFcn', [], ...
|
---|
43 | 'gui_Callback', []);
|
---|
44 | if nargin && ischar(varargin{1})
|
---|
45 | gui_State.gui_Callback = str2func(varargin{1});
|
---|
46 | end
|
---|
47 |
|
---|
48 | if nargout
|
---|
49 | varargout{1:nargout} = gui_mainfcn(gui_State, varargin{:});
|
---|
50 | else
|
---|
51 | gui_mainfcn(gui_State, varargin{:});
|
---|
52 | end
|
---|
53 | % End initialization code - DO NOT EDIT
|
---|
54 |
|
---|
55 | %-------------------------------------------------------------------
|
---|
56 | % --- Executes just before view_field is made visible.
|
---|
57 | function view_field_OpeningFcn(hObject, eventdata, handles, Field )
|
---|
58 | %-------------------------------------------------------------------
|
---|
59 |
|
---|
60 | % Choose default command menuline output for view_field
|
---|
61 | handles.output = handles.view_field;
|
---|
62 |
|
---|
63 | % Update handles structure
|
---|
64 | guidata(hObject, handles);
|
---|
65 |
|
---|
66 | dircur=pwd; %current working directory
|
---|
67 | dir_opening=dircur;
|
---|
68 |
|
---|
69 | % set the position of colorbar and ancillary GUIs:
|
---|
70 | set(hObject,'Units','Normalized')
|
---|
71 | handles_mouse=handles;
|
---|
72 | huvmat=findobj(allchild(0),'Name','uvmat');
|
---|
73 | if ~isempty(huvmat)
|
---|
74 | hhuvmat=guidata(huvmat);
|
---|
75 | set(hhuvmat.list_object_2,'Visible','on')
|
---|
76 | set(hhuvmat.view_field_title,'Visible','on')
|
---|
77 | % handles_mouse.create=hhuvmat.create;
|
---|
78 | handles_mouse.edit=hhuvmat.edit_object;
|
---|
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 | ViewFieldData.axes3=[];%initiates the record of the current field (will be updated by plot_field)
|
---|
93 | set(handles.view_field,'UserData',ViewFieldData);%store the current field
|
---|
94 | AxeData.LimEditBox=1; %initialise AxeData, the parent figure sets plot parameters
|
---|
95 | set(handles.axes3,'UserData',AxeData)
|
---|
96 | if ~exist('Field','var')
|
---|
97 | return
|
---|
98 | end
|
---|
99 | [PlotType,PlotParamOut]= plot_field(Field,handles.axes3);%,PlotParam,KeepLim,PosColorbar)
|
---|
100 |
|
---|
101 | if isfield(PlotParamOut,'Vectors')
|
---|
102 | set(handles.Vectors,'Visible','on')
|
---|
103 | end
|
---|
104 | write_plot_param(handles,PlotParamOut);% update the display of the plotting parameters
|
---|
105 |
|
---|
106 | %-------------------------------------------------------------------
|
---|
107 | % --- Outputs from this function are returned to the command menuline.
|
---|
108 | function varargout = view_field_OutputFcn(hObject, eventdata, handles)
|
---|
109 | varargout{1} = handles.output;% the only output argument is the handle to the GUI figure
|
---|
110 |
|
---|
111 |
|
---|
112 | %-------------------------------------------------------------------
|
---|
113 | %-------------------------------------------------------------------
|
---|
114 | % II - FUNCTIONS FOR INTRODUCING THE INPUT FILES
|
---|
115 | % automatically sets the global properties when the rootfile name is introduced
|
---|
116 | % then activate the view-field action if selected
|
---|
117 | % it is activated either by clicking on the RootPath window or by the
|
---|
118 | % browser
|
---|
119 | %------------------------------------------------------------------
|
---|
120 | %------------------------------------------------------------------
|
---|
121 |
|
---|
122 | %-------------------------------------------------------------------
|
---|
123 | function update_mask(handles,num_i1,num_j1)
|
---|
124 | %-------------------------------------------------------------------
|
---|
125 |
|
---|
126 | MaskData=get(handles.mask_test,'UserData');
|
---|
127 | if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
|
---|
128 | uistack(MaskData.maskhandle,'top');
|
---|
129 | end
|
---|
130 | num_i1_mask=mod(num_i1-1,MaskData.NbSlice)+1;
|
---|
131 | [MaskName,mdetect]=name_generator(MaskData.Base,num_i1_mask,num_j1,'.png',MaskData.NomType);
|
---|
132 | huvmat=get(handles.mask_test,'parent');
|
---|
133 | UvData=get(huvmat,'UserData');
|
---|
134 |
|
---|
135 | %update mask image if the mask is new
|
---|
136 | if ~ (isfield(UvData,'MaskName') && isequal(UvData.MaskName,MaskName))
|
---|
137 | UvData.MaskName=MaskName; %update the recorded name on UvData
|
---|
138 | set(huvmat,'UserData',UvData);
|
---|
139 | if mdetect==0
|
---|
140 | if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
|
---|
141 | delete(MaskData.maskhandle)
|
---|
142 | end
|
---|
143 | else
|
---|
144 | %read mask image
|
---|
145 | Mask.AName='image';
|
---|
146 | Mask.A=imread(MaskName);
|
---|
147 | npxy=size(Mask.A);
|
---|
148 | Mask.AX=[0.5 npxy(2)-0.5];
|
---|
149 | Mask.AY=[npxy(1)-0.5 0.5 ];
|
---|
150 | Mask.CoordUnit='pixel';
|
---|
151 | if isequal(get(handles.slices,'Value'),1)
|
---|
152 | NbSlice=str2num(get(handles.nb_slice,'String'));
|
---|
153 | num_i1=str2num(get(handles.i1,'String'));
|
---|
154 | Mask.ZIndex=mod(num_i1-1,NbSlice)+1;
|
---|
155 | end
|
---|
156 | %px to phys or other transform on field
|
---|
157 | menu_transform=get(handles.transform_fct,'String');
|
---|
158 | choice_value=get(handles.transform_fct,'Value');
|
---|
159 | transform_name=menu_transform{choice_value};%name of the transform fct given by the menu 'transform_fct'
|
---|
160 | transform_list=get(handles.transform_fct,'UserData');
|
---|
161 | transform=transform_list{choice_value};
|
---|
162 | if ~isequal(transform_name,'') && ~isequal(transform_name,'px')
|
---|
163 | if isfield(UvData,'XmlData') && isfield(UvData.XmlData,'GeometryCalib')%use geometry calib recorded from the ImaDoc xml file as first priority
|
---|
164 | Calib=UvData.XmlData.GeometryCalib;
|
---|
165 | Mask=transform(Mask,UvData.XmlData);
|
---|
166 | end
|
---|
167 | end
|
---|
168 | flagmask=Mask.A < 200;
|
---|
169 |
|
---|
170 | %make brown color image
|
---|
171 | imflag(:,:,1)=0.9*flagmask;
|
---|
172 | imflag(:,:,2)=0.7*flagmask;
|
---|
173 | imflag(:,:,3)=zeros(size(flagmask));
|
---|
174 |
|
---|
175 | %update mask image
|
---|
176 | hmask=[]; %default
|
---|
177 | if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
|
---|
178 | hmask=MaskData.maskhandle;
|
---|
179 | end
|
---|
180 | if ~isempty(hmask)
|
---|
181 | set(hmask,'CData',imflag)
|
---|
182 | set(hmask,'AlphaData',flagmask*0.6)
|
---|
183 | set(hmask,'XData',Mask.AX);
|
---|
184 | set(hmask,'YData',Mask.AY);
|
---|
185 | % uistack(hmask,'top')
|
---|
186 | else
|
---|
187 | axes(handles.axes3)
|
---|
188 | hold on
|
---|
189 | MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*flagmask);
|
---|
190 | % set(MaskData.maskhandle,'AlphaData',0.6*flagmask)
|
---|
191 | set(handles.mask_test,'UserData',MaskData)
|
---|
192 | end
|
---|
193 | end
|
---|
194 | end
|
---|
195 |
|
---|
196 |
|
---|
197 | %-------------------------------------------------------------------
|
---|
198 | function MenuExportFigure_Callback(hObject, eventdata, handles)
|
---|
199 | %-------------------------------------------------------------------
|
---|
200 | huvmat=get(handles.MenuExport,'parent');
|
---|
201 | UvData=get(huvmat,'UserData');
|
---|
202 | hfig=figure;
|
---|
203 | newaxes=copyobj(handles.axes3,hfig);
|
---|
204 | map=colormap(handles.axes3);
|
---|
205 | colormap(map);%transmit the current colormap to the zoom fig
|
---|
206 | colorbar
|
---|
207 |
|
---|
208 | %-------------------------------------------------------------------
|
---|
209 | %-------------------------------------------------------------------
|
---|
210 | % III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT'
|
---|
211 | %-------------------------------------------------------------------
|
---|
212 | %-------------------------------------------------------------------
|
---|
213 |
|
---|
214 | %Executes on button press in runplus: make one step forward and call
|
---|
215 | %run0. The step forward is along the fields series 1 or 2 depending on
|
---|
216 | %the scan_i and scan_j check box (exclusive each other)
|
---|
217 | %-------------------------------------------------------------------
|
---|
218 | function runplus_Callback(hObject, eventdata, handles)
|
---|
219 | increment=str2num(get(handles.increment_scan,'String')); %get the field increment d
|
---|
220 | runpm(hObject,eventdata,handles,increment)
|
---|
221 |
|
---|
222 | %-------------------------------------------------------------------
|
---|
223 | %Executes on button press in runmin: make one step backward and call
|
---|
224 | %run0. The step backward is along the fields series 1 or 2 depending on
|
---|
225 | %the scan_i and scan_j check box (exclusive each other)
|
---|
226 | %-------------------------------------------------------------------
|
---|
227 | function runmin_Callback(hObject, eventdata, handles)
|
---|
228 | increment=-str2num(get(handles.increment_scan,'String')); %get the field increment d
|
---|
229 | runpm(hObject,eventdata,handles,increment)
|
---|
230 |
|
---|
231 | %-------------------------------------------------------------------
|
---|
232 | %Executes on button press in runmin: make one step backward and call
|
---|
233 | %run0. The step backward is along the fields series 1 or 2 depending on
|
---|
234 | %the scan_i and scan_j check box (exclusive each other)
|
---|
235 | %-------------------------------------------------------------------
|
---|
236 | function RunMovie_Callback(hObject, eventdata, handles)
|
---|
237 | %------------------------------------------------------------------
|
---|
238 | set(handles.RunMovie,'BackgroundColor',[1 1 0])%paint the command button in yellow
|
---|
239 | drawnow
|
---|
240 | increment=str2num(get(handles.increment_scan,'String')); %get the field increment d
|
---|
241 | set(handles.STOP,'Visible','on')
|
---|
242 | set(handles.speed,'Visible','on')
|
---|
243 | set(handles.speed_txt,'Visible','on')
|
---|
244 | set(handles.RunMovie,'BusyAction','queue')
|
---|
245 | testavi=0;
|
---|
246 | UvData=get(handles.view_field,'UserData');
|
---|
247 |
|
---|
248 | while get(handles.speed,'Value')~=0 & isequal(get(handles.RunMovie,'BusyAction'),'queue') % enable STOP command
|
---|
249 | runpm(hObject,eventdata,handles,increment)
|
---|
250 | pause(1.02-get(handles.speed,'Value'))% wait for next image
|
---|
251 | end
|
---|
252 | if isfield(UvData,'aviobj') && ~isempty( UvData.aviobj),
|
---|
253 | UvData.aviobj=close(UvData.aviobj);
|
---|
254 | set(handles.view_field,'UserData',UvData);
|
---|
255 | end
|
---|
256 | set(handles.RunMovie,'BackgroundColor',[1 0 0])%paint the command buttonback to red
|
---|
257 |
|
---|
258 |
|
---|
259 |
|
---|
260 | %-------------------------------------------------------------------
|
---|
261 | % --- translate coordinate to matrix index
|
---|
262 | %-------------------------------------------------------------------
|
---|
263 | function [indx,indy]=pos2ind(x0,rangx0,nxy)
|
---|
264 | indx=1+round((nxy(2)-1)*(x0-rangx0(1))/(rangx0(2)-rangx0(1)));% index x of pixel
|
---|
265 | indy=1+round((nxy(1)-1)*(y12-rangy0(1))/(rangy0(2)-rangy0(1)));% index y of pixel
|
---|
266 |
|
---|
267 | %-------------------------------------------------------------------
|
---|
268 | % --- Executes on button press in 'FixLimits'.
|
---|
269 | %-------------------------------------------------------------------
|
---|
270 | function FixLimits_Callback(hObject, eventdata, handles)
|
---|
271 | test=get(handles.FixLimits,'Value');
|
---|
272 | if test
|
---|
273 | set(handles.FixLimits,'BackgroundColor',[1 1 0])
|
---|
274 | else
|
---|
275 | set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7])
|
---|
276 | end
|
---|
277 |
|
---|
278 | %-------------------------------------------------------------------
|
---|
279 | % --- Executes on button press in FixEqual.
|
---|
280 | function FixEqual_Callback(hObject, eventdata, handles)
|
---|
281 | test=get(handles.FixEqual,'Value');
|
---|
282 | if test
|
---|
283 | set(handles.FixEqual,'BackgroundColor',[1 1 0])
|
---|
284 | cla(handles.axes3)
|
---|
285 | update_plot(handles)
|
---|
286 | else
|
---|
287 | set(handles.FixEqual,'BackgroundColor',[0.7 0.7 0.7])
|
---|
288 | update_plot(handles)
|
---|
289 | end
|
---|
290 |
|
---|
291 |
|
---|
292 | %-------------------------------------------------------------------
|
---|
293 |
|
---|
294 | %-------------------------------------------------------------------
|
---|
295 | % --- Executes on button press in 'zoom'.
|
---|
296 | %-------------------------------------------------------------------
|
---|
297 | function zoom_Callback(hObject, eventdata, handles)
|
---|
298 | if (get(handles.zoom,'Value') == 1);
|
---|
299 | set(handles.zoom,'BackgroundColor',[1 1 0])
|
---|
300 | set(handles.FixLimits,'Value',1)% propose by default fixed limits for the plotting axes
|
---|
301 | set(handles.FixLimits,'BackgroundColor',[1 1 0])
|
---|
302 | else
|
---|
303 | set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
|
---|
304 | end
|
---|
305 |
|
---|
306 | %-------------------------------------------------------------------
|
---|
307 | %----Executes on button press in 'record': records the current flags of manual correction.
|
---|
308 | %-------------------------------------------------------------------
|
---|
309 | function record_Callback(hObject, eventdata, handles)
|
---|
310 | % [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles);
|
---|
311 | filename=read_file_boxes(handles);
|
---|
312 | AxeData=get(gca,'UserData');
|
---|
313 | [erread,message]=fileattrib(filename);
|
---|
314 | if ~isempty(message) && ~isequal(message.UserWrite,1)
|
---|
315 | msgbox_view_field('ERROR',['no writting access to ' filename])
|
---|
316 | return
|
---|
317 | end
|
---|
318 | test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]);
|
---|
319 | test_civ1=isequal(get(handles.civ1,'BackgroundColor'),[1 1 0]);
|
---|
320 | if ~test_civ2 && ~test_civ1
|
---|
321 | msgbox_view_field('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')
|
---|
322 | end
|
---|
323 | if test_civ2
|
---|
324 | nbname='nb_vectors2';
|
---|
325 | flagname='vec2_FixFlag';
|
---|
326 | attrname='fix2';
|
---|
327 | end
|
---|
328 | if test_civ1
|
---|
329 | nbname='nb_vectors';
|
---|
330 | flagname='vec_FixFlag';
|
---|
331 | attrname='fix';
|
---|
332 | end
|
---|
333 | %write fix flags in the netcdf file
|
---|
334 | hhh=which('netcdf.open');% look for built-in matlab netcdf library
|
---|
335 | if ~isequal(hhh,'')% case of new builtin Matlab netcdf library
|
---|
336 | nc=netcdf.open(filename,'NC_WRITE');
|
---|
337 | netcdf.reDef(nc)
|
---|
338 | netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),attrname,1)
|
---|
339 | dimid = netcdf.inqDimID(nc,nbname);
|
---|
340 | try
|
---|
341 | varid = netcdf.inqVarID(nc,flagname);% look for already existing fixflag variable
|
---|
342 | catch
|
---|
343 | varid=netcdf.defVar(nc,flagname,'double',dimid);%create fixflag variable if it does not exist
|
---|
344 | end
|
---|
345 | netcdf.endDef(nc)
|
---|
346 | netcdf.putVar(nc,varid,AxeData.FF);
|
---|
347 | netcdf.close(nc)
|
---|
348 | else %old netcdf library
|
---|
349 | netcdf_toolbox(filename,AxeData,attrname,nbname,flagname)
|
---|
350 | end
|
---|
351 |
|
---|
352 | function netcdf_toolbox(filename,AxeData,attrname,nbname,flagname)
|
---|
353 | nc=netcdf(filename,'write'); %open netcdf file
|
---|
354 | result=redef(nc);
|
---|
355 | eval(['nc.' attrname '=1;']);
|
---|
356 | theDim=nc(nbname) ;% get the number of velocity vectors
|
---|
357 | nb_vectors=size(theDim);
|
---|
358 | var_FixFlag=ncvar(flagname,nc);% var_FixFlag will be written as the netcdf variable vec_FixFlag
|
---|
359 | var_FixFlag(1:nb_vectors)=AxeData.FF;%
|
---|
360 | fin=close(nc);
|
---|
361 |
|
---|
362 |
|
---|
363 | %-------------------------------------------------------------------
|
---|
364 | %-------------------------------------------------------------------
|
---|
365 | % - FUNCTIONS FOR SETTING PLOTTING PARAMETERS
|
---|
366 |
|
---|
367 | %------------------------------------------------------------------
|
---|
368 |
|
---|
369 |
|
---|
370 | %------------------------------------------------------------------
|
---|
371 | % --- Executes on selection change in col_vec: choice of the color code.
|
---|
372 | %
|
---|
373 | function col_vec_Callback(hObject, eventdata, handles)
|
---|
374 | %------------------------------------------------------------------
|
---|
375 | % edit the choice for color code
|
---|
376 | list_code=get(handles.col_vec,'String');% list menu fields
|
---|
377 | index_code=get(handles.col_vec,'Value');% selected string index
|
---|
378 | col_code= list_code{index_code(1)}; % selected field
|
---|
379 | if isequal(col_code,'black') | isequal(col_code,'white')
|
---|
380 | set(handles.slider1,'Visible','off')
|
---|
381 | set(handles.slider2,'Visible','off')
|
---|
382 | set(handles.colcode1,'Visible','off')
|
---|
383 | set(handles.colcode2,'Visible','off')
|
---|
384 | set(handles.AutoVecColor,'Visible','off')
|
---|
385 | set_vec_col_bar(handles)
|
---|
386 | else
|
---|
387 | set(handles.slider1,'Visible','on')
|
---|
388 | set(handles.slider2,'Visible','on')
|
---|
389 | set(handles.colcode1,'Visible','on')
|
---|
390 | set(handles.colcode2,'Visible','on')
|
---|
391 | set(handles.AutoVecColor,'Visible','on')
|
---|
392 | if isequal(col_code,'ima_cor')
|
---|
393 | set(handles.AutoVecColor,'Value',0)%fixed scale by default
|
---|
394 | set(handles.vec_col_bar,'Value',0)% 3 colors r,g,b by default
|
---|
395 | set(handles.slider1,'Min',0);
|
---|
396 | set(handles.slider1,'Max',1);
|
---|
397 | set(handles.slider2,'Min',0);
|
---|
398 | set(handles.slider2,'Max',1);
|
---|
399 | % set(handles.min_C_title_vec,'String','0')
|
---|
400 | set(handles.max_vec,'String','1')
|
---|
401 | set(handles.colcode1,'String','0.333')
|
---|
402 | colcode1_Callback(hObject, eventdata, handles)
|
---|
403 | set(handles.colcode2,'String','0.666')
|
---|
404 | colcode2_Callback(hObject, eventdata, handles)
|
---|
405 | else
|
---|
406 | set(handles.AutoVecColor,'Value',1)%auto scale between min,max by default
|
---|
407 | set(handles.vec_col_bar,'Value',1)% colormap 'jet' by default
|
---|
408 | minval=get(handles.slider1,'Min');
|
---|
409 | maxval=get(handles.slider1,'Max');
|
---|
410 | set(handles.slider1,'Value',minval)
|
---|
411 | set(handles.slider2,'Value',maxval)
|
---|
412 | set_vec_col_bar(handles)
|
---|
413 | end
|
---|
414 | % slider_update(handles)
|
---|
415 | end
|
---|
416 | %replot the current graph
|
---|
417 | run0_Callback(hObject, eventdata, handles)
|
---|
418 |
|
---|
419 |
|
---|
420 | %----------------------------------------------------------------
|
---|
421 | % -- Executes on slider movement to set the color code
|
---|
422 | %
|
---|
423 | function slider1_Callback(hObject, eventdata, handles)
|
---|
424 | %------------------------------------------------------------------
|
---|
425 | slider1=get(handles.slider1,'Value');
|
---|
426 | min_val=str2num(get(handles.min_vec,'String'));
|
---|
427 | max_val=str2num(get(handles.max_vec,'String'));
|
---|
428 | col=min_val+(max_val-min_val)*slider1;
|
---|
429 | set(handles.colcode1,'String',num2str(col))
|
---|
430 | if(get(handles.slider2,'Value') < col)%move also the second slider at the same value if needed
|
---|
431 | set(handles.slider2,'Value',col)
|
---|
432 | set(handles.colcode2,'String',num2str(col))
|
---|
433 | end
|
---|
434 | colcode1_Callback(hObject, eventdata, handles)
|
---|
435 |
|
---|
436 | %----------------------------------------------------------------
|
---|
437 | % Executes on slider movement to set the color code
|
---|
438 | %----------------------------------------------------------------
|
---|
439 | function slider2_Callback(hObject, eventdata, handles)
|
---|
440 | slider2=get(handles.slider2,'Value');
|
---|
441 | min_val=str2num(get(handles.min_vec,'String'));
|
---|
442 | max_val=str2num(get(handles.max_vec,'String'));
|
---|
443 | col=min_val+(max_val-min_val)*slider2;
|
---|
444 | set(handles.colcode2,'String',num2str(col))
|
---|
445 | if(get(handles.slider1,'Value') > col)%move also the first slider at the same value if needed
|
---|
446 | set(handles.slider1,'Value',col)
|
---|
447 | set(handles.colcode1,'String',num2str(col))
|
---|
448 | end
|
---|
449 | colcode2_Callback(hObject, eventdata, handles)
|
---|
450 |
|
---|
451 | %----------------------------------------------------------------
|
---|
452 | %execute on return carriage on the edit box corresponding to slider 1
|
---|
453 | %----------------------------------------------------------------
|
---|
454 | function colcode1_Callback(hObject, eventdata, handles)
|
---|
455 | % col=str2num(get(handles.colcode1,'String'));
|
---|
456 | % set(handles.slider1,'Value',col)
|
---|
457 | set_vec_col_bar(handles)
|
---|
458 | update_plot(handles)
|
---|
459 |
|
---|
460 | %----------------------------------------------------------------
|
---|
461 | %execute on return carriage on the edit box corresponding to slider 2
|
---|
462 | %----------------------------------------------------------------
|
---|
463 | function colcode2_Callback(hObject, eventdata, handles)
|
---|
464 | % col=str2num(get(handles.colcode2,'String'));
|
---|
465 | % set(handles.slider2,'Value',col)
|
---|
466 | % slider2_Callback(hObject, eventdata, handles)
|
---|
467 | set_vec_col_bar(handles)
|
---|
468 | update_plot(handles)
|
---|
469 | %------------------------------------------------------------
|
---|
470 | %update the slider values after displaying vectors
|
---|
471 | %--------------------------------------------------------
|
---|
472 | % function slider_update(handles,auto,minC,colcode1,colcode2,maxC)
|
---|
473 | % set(handles.slider1,'Min',minC)
|
---|
474 | % set(handles.slider1,'Max',maxC)
|
---|
475 | % set(handles.slider2,'Min',minC)
|
---|
476 | % set(handles.slider2,'Max',maxC)
|
---|
477 | % set(handles.min_C_title_vec,'String',num2str(minC))
|
---|
478 | % set(handles.max_vec,'String',num2str(maxC))
|
---|
479 | % if auto
|
---|
480 | % set(handles.colcode1,'String',num2str(colcode1,3))%update display
|
---|
481 | % set(handles.colcode2,'String',num2str(colcode2,3))
|
---|
482 | % end
|
---|
483 | % set(handles.slider1,'Value',colcode1)%update slider with constant display
|
---|
484 | % set(handles.slider2,'Value',colcode2)
|
---|
485 | % set_vec_col_bar(handles)
|
---|
486 |
|
---|
487 |
|
---|
488 | %-------------------------------------------------------
|
---|
489 | % --- Executes on button press in AutoVecColor.
|
---|
490 | %-------------------------------------------------------
|
---|
491 | function vec_col_bar_Callback(hObject, eventdata, handles)
|
---|
492 | set_vec_col_bar(handles)
|
---|
493 |
|
---|
494 | %------------------------------------------------
|
---|
495 | %CALLBACKS FOR PLOTTING PARAMETERS
|
---|
496 | %-------------------------------------------------
|
---|
497 |
|
---|
498 | %------------------------------------------------------------------------
|
---|
499 | function MinX_Callback(hObject, eventdata, handles)
|
---|
500 | %------------------------------------------------------------------------
|
---|
501 | set(handles.FixLimits,'Value',1) %suppress auto mode
|
---|
502 | set(handles.FixLimits,'BackgroundColor',[1 1 0])
|
---|
503 | update_plot(handles);
|
---|
504 |
|
---|
505 | %------------------------------------------------------------------------
|
---|
506 | function MaxX_Callback(hObject, eventdata, handles)
|
---|
507 | %------------------------------------------------------------------------
|
---|
508 | set(handles.FixLimits,'Value',1) %suppress auto mode
|
---|
509 | set(handles.FixLimits,'BackgroundColor',[1 1 0])
|
---|
510 | update_plot(handles);
|
---|
511 |
|
---|
512 | %------------------------------------------------------------------------
|
---|
513 | function MinY_Callback(hObject, eventdata, handles)
|
---|
514 | %------------------------------------------
|
---|
515 | set(handles.FixLimits,'Value',1) %suppress auto mode
|
---|
516 | set(handles.FixLimits,'BackgroundColor',[1 1 0])
|
---|
517 | update_plot(handles);
|
---|
518 |
|
---|
519 | %------------------------------------------------------------------------
|
---|
520 | function MaxY_Callback(hObject, eventdata, handles)
|
---|
521 | %------------------------------------------------------------------------
|
---|
522 | set(handles.FixLimits,'Value',1) %suppress auto mode
|
---|
523 | set(handles.FixLimits,'BackgroundColor',[1 1 0])
|
---|
524 | update_plot(handles);
|
---|
525 |
|
---|
526 | %-----------------------------------------------------------------
|
---|
527 | function MinA_Callback(hObject, eventdata, handles)
|
---|
528 | %------------------------------------------
|
---|
529 | set(handles.FixScal,'Value',1) %suppress auto mode
|
---|
530 | set(handles.FixScal,'BackgroundColor',[1 1 0])
|
---|
531 | update_plot(handles)
|
---|
532 |
|
---|
533 | %-----------------------------------------------------------------
|
---|
534 | function MaxA_Callback(hObject, eventdata, handles)
|
---|
535 | %--------------------------------------------
|
---|
536 | set(handles.FixScal,'Value',1) %suppress auto mode
|
---|
537 | set(handles.FixScal,'BackgroundColor',[1 1 0])
|
---|
538 | update_plot(handles)
|
---|
539 |
|
---|
540 | %-----------------------------------------------
|
---|
541 | function FixScal_Callback(hObject, eventdata, handles)
|
---|
542 | %--------------------------------------------
|
---|
543 | test=get(handles.FixScal,'Value');
|
---|
544 | if test
|
---|
545 | set(handles.FixScal,'BackgroundColor',[1 1 0])
|
---|
546 | else
|
---|
547 | set(handles.FixScal,'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.FixVec,'Value',1);
|
---|
590 | set(handles.FixVec,'BackgroundColor',[1 1 0])
|
---|
591 | update_plot(handles)
|
---|
592 |
|
---|
593 | %-------------------------------------------------------------------
|
---|
594 | function FixVec_Callback(hObject, eventdata, handles)
|
---|
595 | %-------------------------------------------------------------------
|
---|
596 | test=get(handles.FixVec,'Value');
|
---|
597 | if test
|
---|
598 | set(handles.FixVec,'BackgroundColor',[1 1 0])
|
---|
599 | else
|
---|
600 | update_plot(handles);
|
---|
601 | %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3))
|
---|
602 | set(handles.FixVec,'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.FixedCbounds=0;
|
---|
677 | colcode.FixedCbounds=1;
|
---|
678 | vec_C=colcode.MinC+(colcode.MaxC-colcode.MinC)*[0.5:width-0.5]/width;%sample of vec_C values from min to max
|
---|
679 | [colorlist,col_vec]=set_col_vec(colcode,vec_C);
|
---|
680 | oneheight=ones(1,height);
|
---|
681 | A1=colorlist(col_vec,1)*oneheight;
|
---|
682 | A2=colorlist(col_vec,2)*oneheight;
|
---|
683 | A3=colorlist(col_vec,3)*oneheight;
|
---|
684 | A(:,:,1)=A1';
|
---|
685 | A(:,:,2)=A2';
|
---|
686 | A(:,:,3)=A3';
|
---|
687 | set(handles.vec_col_bar,'Cdata',A)
|
---|
688 |
|
---|
689 | %------------------------------------------------------------------------
|
---|
690 | function PlotType=update_plot(handles)
|
---|
691 | %------------------------------------------------------------------------
|
---|
692 | haxes= handles.axes3;
|
---|
693 |
|
---|
694 | %ProjField=get(haxes,'UserData');
|
---|
695 | ViewFieldData=get(handles.view_field,'UserData');
|
---|
696 | ProjField=ViewFieldData.axes3;
|
---|
697 | %ProjField=get(haxes,'UserData');
|
---|
698 | PlotParam=read_GUI(handles.view_field);
|
---|
699 | [PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1);
|
---|
700 | write_plot_param(handles,PlotParamOut); %update the auto plot parameters
|
---|
701 |
|
---|
702 | %------------------------------------------------------------------------
|
---|
703 | % --- Executes on button press in Menu/Export/field in workspace.
|
---|
704 | function MenuExportField_Callback(hObject, eventdata, handles)
|
---|
705 | %------------------------------------------------------------------------
|
---|
706 | global Data_view_field
|
---|
707 | % huvmat=findobj(allchild(0),'Name','uvmat');
|
---|
708 | Data_view_field=get(handles.view_field,'UserData');
|
---|
709 | Data_view_field=Data_view_field.axes3;
|
---|
710 | % Data_view_field=UvData.ProjField_2;
|
---|
711 | evalin('base','global Data_view_field')%make CurData global in the workspace
|
---|
712 | display(['UserData of view_field :'])
|
---|
713 | evalin('base','Data_view_field') %display CurData in the workspace
|
---|
714 | commandwindow;
|
---|
715 |
|
---|
716 | %------------------------------------------------------------------------
|
---|
717 | % --- Executes on button press in Menu/Export/extract figure.
|
---|
718 | function MenuExport_plot_Callback(hObject, eventdata, handles)
|
---|
719 | %------------------------------------------------------------------------
|
---|
720 | huvmat=get(handles.MenuExport_plot,'parent');
|
---|
721 | UvData=get(huvmat,'UserData');
|
---|
722 | hfig=figure;
|
---|
723 | newaxes=copyobj(handles.axes3,hfig);
|
---|
724 | map=colormap(handles.axes3);
|
---|
725 | colormap(map);%transmit the current colormap to the zoom fig
|
---|
726 | colorbar
|
---|
727 |
|
---|
728 | %------------------------------------------------------------------------
|
---|
729 | function closefcn(hObject, eventdata, handles)
|
---|
730 | %------------------------------------------------------------------------
|
---|
731 | huvmat=findobj(allchild(0),'Name','uvmat');
|
---|
732 | if ~isempty(huvmat)
|
---|
733 | hhuvmat=guidata(huvmat);
|
---|
734 | list_object_2=get(hhuvmat.list_object_2,'String');
|
---|
735 | set(hhuvmat.list_object_2,'Value',1)%select the last value ('...')
|
---|
736 | end
|
---|
737 | delete(hObject)
|
---|
738 |
|
---|
739 |
|
---|
740 |
|
---|
741 |
|
---|
742 |
|
---|
743 |
|
---|
744 |
|
---|
745 | % --- Executes on button press in CheckZoom.
|
---|
746 | function CheckZoom_Callback(hObject, eventdata, handles)
|
---|
747 | % hObject handle to CheckZoom (see GCBO)
|
---|
748 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
749 | % handles structure with handles and user data (see GUIDATA)
|
---|
750 |
|
---|
751 | % Hint: get(hObject,'Value') returns toggle state of CheckZoom
|
---|
752 |
|
---|
753 |
|
---|
754 | % --- Executes on button press in CheckFixLimits.
|
---|
755 | function CheckFixLimits_Callback(hObject, eventdata, handles)
|
---|
756 | % hObject handle to CheckFixLimits (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 | % Hint: get(hObject,'Value') returns toggle state of CheckFixLimits
|
---|
761 |
|
---|
762 |
|
---|
763 |
|
---|
764 | function num_MinY_Callback(hObject, eventdata, handles)
|
---|
765 | % hObject handle to num_MinY (see GCBO)
|
---|
766 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
767 | % handles structure with handles and user data (see GUIDATA)
|
---|
768 |
|
---|
769 | % Hints: get(hObject,'String') returns contents of num_MinY as text
|
---|
770 | % str2double(get(hObject,'String')) returns contents of num_MinY as a double
|
---|
771 |
|
---|
772 |
|
---|
773 | % --- Executes during object creation, after setting all properties.
|
---|
774 | function num_MinY_CreateFcn(hObject, eventdata, handles)
|
---|
775 | % hObject handle to num_MinY (see GCBO)
|
---|
776 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
777 | % handles empty - handles not created until after all CreateFcns called
|
---|
778 |
|
---|
779 | % Hint: edit controls usually have a white background on Windows.
|
---|
780 | % See ISPC and COMPUTER.
|
---|
781 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
782 | set(hObject,'BackgroundColor','white');
|
---|
783 | end
|
---|
784 |
|
---|
785 |
|
---|
786 |
|
---|
787 | function num_MaxY_Callback(hObject, eventdata, handles)
|
---|
788 | % hObject handle to num_MaxY (see GCBO)
|
---|
789 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
790 | % handles structure with handles and user data (see GUIDATA)
|
---|
791 |
|
---|
792 | % Hints: get(hObject,'String') returns contents of num_MaxY as text
|
---|
793 | % str2double(get(hObject,'String')) returns contents of num_MaxY as a double
|
---|
794 |
|
---|
795 |
|
---|
796 | % --- Executes on button press in CheckFixEqual.
|
---|
797 | function CheckFixEqual_Callback(hObject, eventdata, handles)
|
---|
798 | % hObject handle to CheckFixEqual (see GCBO)
|
---|
799 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
800 | % handles structure with handles and user data (see GUIDATA)
|
---|
801 |
|
---|
802 | % Hint: get(hObject,'Value') returns toggle state of CheckFixEqual
|
---|
803 |
|
---|
804 |
|
---|
805 |
|
---|
806 | function num_MinX_Callback(hObject, eventdata, handles)
|
---|
807 | % hObject handle to num_MinX (see GCBO)
|
---|
808 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
809 | % handles structure with handles and user data (see GUIDATA)
|
---|
810 |
|
---|
811 | % Hints: get(hObject,'String') returns contents of num_MinX as text
|
---|
812 | % str2double(get(hObject,'String')) returns contents of num_MinX as a double
|
---|
813 |
|
---|
814 |
|
---|
815 |
|
---|
816 | function num_MaxX_Callback(hObject, eventdata, handles)
|
---|
817 | % hObject handle to num_MaxX (see GCBO)
|
---|
818 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
819 | % handles structure with handles and user data (see GUIDATA)
|
---|
820 |
|
---|
821 | % Hints: get(hObject,'String') returns contents of num_MaxX as text
|
---|
822 | % str2double(get(hObject,'String')) returns contents of num_MaxX as a double
|
---|
823 |
|
---|
824 |
|
---|
825 | % --- Executes on selection change in ListContour.
|
---|
826 | function ListContour_Callback(hObject, eventdata, handles)
|
---|
827 | % hObject handle to ListContour (see GCBO)
|
---|
828 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
829 | % handles structure with handles and user data (see GUIDATA)
|
---|
830 |
|
---|
831 | % Hints: contents = cellstr(get(hObject,'String')) returns ListContour contents as cell array
|
---|
832 | % contents{get(hObject,'Value')} returns selected item from ListContour
|
---|
833 |
|
---|
834 |
|
---|
835 | % --- Executes on button press in checkbox49.
|
---|
836 | function checkbox49_Callback(hObject, eventdata, handles)
|
---|
837 | % hObject handle to checkbox49 (see GCBO)
|
---|
838 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
839 | % handles structure with handles and user data (see GUIDATA)
|
---|
840 |
|
---|
841 | % Hint: get(hObject,'Value') returns toggle state of checkbox49
|
---|
842 |
|
---|
843 |
|
---|
844 |
|
---|
845 | function num_MaxA_Callback(hObject, eventdata, handles)
|
---|
846 | % hObject handle to num_MaxA (see GCBO)
|
---|
847 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
848 | % handles structure with handles and user data (see GUIDATA)
|
---|
849 |
|
---|
850 | % Hints: get(hObject,'String') returns contents of num_MaxA as text
|
---|
851 | % str2double(get(hObject,'String')) returns contents of num_MaxA as a double
|
---|
852 |
|
---|
853 |
|
---|
854 | % --- Executes during object creation, after setting all properties.
|
---|
855 | function num_MaxA_CreateFcn(hObject, eventdata, handles)
|
---|
856 | % hObject handle to num_MaxA (see GCBO)
|
---|
857 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
858 | % handles empty - handles not created until after all CreateFcns called
|
---|
859 |
|
---|
860 | % Hint: edit controls usually have a white background on Windows.
|
---|
861 | % See ISPC and COMPUTER.
|
---|
862 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
863 | set(hObject,'BackgroundColor','white');
|
---|
864 | end
|
---|
865 |
|
---|
866 |
|
---|
867 |
|
---|
868 | function num_Npy_Callback(hObject, eventdata, handles)
|
---|
869 | % hObject handle to num_Npy (see GCBO)
|
---|
870 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
871 | % handles structure with handles and user data (see GUIDATA)
|
---|
872 |
|
---|
873 | % Hints: get(hObject,'String') returns contents of num_Npy as text
|
---|
874 | % str2double(get(hObject,'String')) returns contents of num_Npy as a double
|
---|
875 |
|
---|
876 |
|
---|
877 | % --- Executes during object creation, after setting all properties.
|
---|
878 | function num_Npy_CreateFcn(hObject, eventdata, handles)
|
---|
879 | % hObject handle to num_Npy (see GCBO)
|
---|
880 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
881 | % handles empty - handles not created until after all CreateFcns called
|
---|
882 |
|
---|
883 | % Hint: edit controls usually have a white background on Windows.
|
---|
884 | % See ISPC and COMPUTER.
|
---|
885 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
886 | set(hObject,'BackgroundColor','white');
|
---|
887 | end
|
---|
888 |
|
---|
889 |
|
---|
890 |
|
---|
891 | function num_IncrA_Callback(hObject, eventdata, handles)
|
---|
892 | % hObject handle to num_IncrA (see GCBO)
|
---|
893 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
894 | % handles structure with handles and user data (see GUIDATA)
|
---|
895 |
|
---|
896 | % Hints: get(hObject,'String') returns contents of num_IncrA as text
|
---|
897 | % str2double(get(hObject,'String')) returns contents of num_IncrA as a double
|
---|
898 |
|
---|
899 |
|
---|
900 | % --- Executes on button press in CheckBW.
|
---|
901 | function CheckBW_Callback(hObject, eventdata, handles)
|
---|
902 | % hObject handle to CheckBW (see GCBO)
|
---|
903 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
904 | % handles structure with handles and user data (see GUIDATA)
|
---|
905 |
|
---|
906 | % Hint: get(hObject,'Value') returns toggle state of CheckBW
|
---|
907 |
|
---|
908 |
|
---|
909 |
|
---|
910 | function num_MinA_Callback(hObject, eventdata, handles)
|
---|
911 | % hObject handle to num_MinA (see GCBO)
|
---|
912 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
913 | % handles structure with handles and user data (see GUIDATA)
|
---|
914 |
|
---|
915 | % Hints: get(hObject,'String') returns contents of num_MinA as text
|
---|
916 | % str2double(get(hObject,'String')) returns contents of num_MinA as a double
|
---|
917 |
|
---|
918 |
|
---|
919 |
|
---|
920 | function num_Npx_Callback(hObject, eventdata, handles)
|
---|
921 | % hObject handle to num_Npx (see GCBO)
|
---|
922 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
923 | % handles structure with handles and user data (see GUIDATA)
|
---|
924 |
|
---|
925 | % Hints: get(hObject,'String') returns contents of num_Npx as text
|
---|
926 | % str2double(get(hObject,'String')) returns contents of num_Npx as a double
|
---|
927 |
|
---|
928 |
|
---|
929 | % --- Executes on button press in CheckFixVectors.
|
---|
930 | function CheckFixVectors_Callback(hObject, eventdata, handles)
|
---|
931 | % hObject handle to CheckFixVectors (see GCBO)
|
---|
932 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
933 | % handles structure with handles and user data (see GUIDATA)
|
---|
934 |
|
---|
935 | % Hint: get(hObject,'Value') returns toggle state of CheckFixVectors
|
---|
936 |
|
---|
937 |
|
---|
938 |
|
---|
939 | function num_VecScale_Callback(hObject, eventdata, handles)
|
---|
940 | % hObject handle to num_VecScale (see GCBO)
|
---|
941 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
942 | % handles structure with handles and user data (see GUIDATA)
|
---|
943 |
|
---|
944 | % Hints: get(hObject,'String') returns contents of num_VecScale as text
|
---|
945 | % str2double(get(hObject,'String')) returns contents of num_VecScale as a double
|
---|
946 |
|
---|
947 |
|
---|
948 | % --- Executes on selection change in ListColorCode.
|
---|
949 | function ListColorCode_Callback(hObject, eventdata, handles)
|
---|
950 | % hObject handle to ListColorCode (see GCBO)
|
---|
951 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
952 | % handles structure with handles and user data (see GUIDATA)
|
---|
953 |
|
---|
954 | % Hints: contents = cellstr(get(hObject,'String')) returns ListColorCode contents as cell array
|
---|
955 | % contents{get(hObject,'Value')} returns selected item from ListColorCode
|
---|
956 |
|
---|
957 |
|
---|
958 | % --- Executes on selection change in ListColorScalar.
|
---|
959 | function ListColorScalar_Callback(hObject, eventdata, handles)
|
---|
960 | % hObject handle to ListColorScalar (see GCBO)
|
---|
961 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
962 | % handles structure with handles and user data (see GUIDATA)
|
---|
963 |
|
---|
964 | % Hints: contents = cellstr(get(hObject,'String')) returns ListColorScalar contents as cell array
|
---|
965 | % contents{get(hObject,'Value')} returns selected item from ListColorScalar
|
---|
966 |
|
---|
967 |
|
---|
968 | % --- Executes on button press in vecColBar.
|
---|
969 | function vecColBar_Callback(hObject, eventdata, handles)
|
---|
970 | % hObject handle to vecColBar (see GCBO)
|
---|
971 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
972 | % handles structure with handles and user data (see GUIDATA)
|
---|
973 |
|
---|
974 |
|
---|
975 | % --- Executes on slider movement.
|
---|
976 | function Slider1_Callback(hObject, eventdata, handles)
|
---|
977 | % hObject handle to Slider1 (see GCBO)
|
---|
978 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
979 | % handles structure with handles and user data (see GUIDATA)
|
---|
980 |
|
---|
981 | % Hints: get(hObject,'Value') returns position of slider
|
---|
982 | % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
|
---|
983 |
|
---|
984 |
|
---|
985 | % --- Executes during object creation, after setting all properties.
|
---|
986 | function Slider1_CreateFcn(hObject, eventdata, handles)
|
---|
987 | % hObject handle to Slider1 (see GCBO)
|
---|
988 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
989 | % handles empty - handles not created until after all CreateFcns called
|
---|
990 |
|
---|
991 | % Hint: slider controls usually have a light gray background.
|
---|
992 | if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
993 | set(hObject,'BackgroundColor',[.9 .9 .9]);
|
---|
994 | end
|
---|
995 |
|
---|
996 |
|
---|
997 | % --- Executes on slider movement.
|
---|
998 | function Slider2_Callback(hObject, eventdata, handles)
|
---|
999 | % hObject handle to Slider2 (see GCBO)
|
---|
1000 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1001 | % handles structure with handles and user data (see GUIDATA)
|
---|
1002 |
|
---|
1003 | % Hints: get(hObject,'Value') returns position of slider
|
---|
1004 | % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
|
---|
1005 |
|
---|
1006 |
|
---|
1007 | % --- Executes during object creation, after setting all properties.
|
---|
1008 | function Slider2_CreateFcn(hObject, eventdata, handles)
|
---|
1009 | % hObject handle to Slider2 (see GCBO)
|
---|
1010 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1011 | % handles empty - handles not created until after all CreateFcns called
|
---|
1012 |
|
---|
1013 | % Hint: slider controls usually have a light gray background.
|
---|
1014 | if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
1015 | set(hObject,'BackgroundColor',[.9 .9 .9]);
|
---|
1016 | end
|
---|
1017 |
|
---|
1018 |
|
---|
1019 |
|
---|
1020 | function num_ColCode1_Callback(hObject, eventdata, handles)
|
---|
1021 | % hObject handle to num_ColCode1 (see GCBO)
|
---|
1022 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1023 | % handles structure with handles and user data (see GUIDATA)
|
---|
1024 |
|
---|
1025 | % Hints: get(hObject,'String') returns contents of num_ColCode1 as text
|
---|
1026 | % str2double(get(hObject,'String')) returns contents of num_ColCode1 as a double
|
---|
1027 |
|
---|
1028 |
|
---|
1029 | % --- Executes during object creation, after setting all properties.
|
---|
1030 | function num_ColCode1_CreateFcn(hObject, eventdata, handles)
|
---|
1031 | % hObject handle to num_ColCode1 (see GCBO)
|
---|
1032 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1033 | % handles empty - handles not created until after all CreateFcns called
|
---|
1034 |
|
---|
1035 | % Hint: edit controls usually have a white background on Windows.
|
---|
1036 | % See ISPC and COMPUTER.
|
---|
1037 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
1038 | set(hObject,'BackgroundColor','white');
|
---|
1039 | end
|
---|
1040 |
|
---|
1041 |
|
---|
1042 |
|
---|
1043 | function num_MaxVec_Callback(hObject, eventdata, handles)
|
---|
1044 | % hObject handle to num_MaxVec (see GCBO)
|
---|
1045 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1046 | % handles structure with handles and user data (see GUIDATA)
|
---|
1047 |
|
---|
1048 | % Hints: get(hObject,'String') returns contents of num_MaxVec as text
|
---|
1049 | % str2double(get(hObject,'String')) returns contents of num_MaxVec as a double
|
---|
1050 |
|
---|
1051 |
|
---|
1052 | % --- Executes during object creation, after setting all properties.
|
---|
1053 | function num_MaxVec_CreateFcn(hObject, eventdata, handles)
|
---|
1054 | % hObject handle to num_MaxVec (see GCBO)
|
---|
1055 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1056 | % handles empty - handles not created until after all CreateFcns called
|
---|
1057 |
|
---|
1058 | % Hint: edit controls usually have a white background on Windows.
|
---|
1059 | % See ISPC and COMPUTER.
|
---|
1060 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
1061 | set(hObject,'BackgroundColor','white');
|
---|
1062 | end
|
---|
1063 |
|
---|
1064 |
|
---|
1065 | % --- Executes on button press in checkbox52.
|
---|
1066 | function checkbox52_Callback(hObject, eventdata, handles)
|
---|
1067 | % hObject handle to checkbox52 (see GCBO)
|
---|
1068 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1069 | % handles structure with handles and user data (see GUIDATA)
|
---|
1070 |
|
---|
1071 | % Hint: get(hObject,'Value') returns toggle state of checkbox52
|
---|
1072 |
|
---|
1073 |
|
---|
1074 |
|
---|
1075 | function num_MinVec_Callback(hObject, eventdata, handles)
|
---|
1076 | % hObject handle to num_MinVec (see GCBO)
|
---|
1077 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1078 | % handles structure with handles and user data (see GUIDATA)
|
---|
1079 |
|
---|
1080 | % Hints: get(hObject,'String') returns contents of num_MinVec as text
|
---|
1081 | % str2double(get(hObject,'String')) returns contents of num_MinVec as a double
|
---|
1082 |
|
---|
1083 |
|
---|
1084 | % --- Executes during object creation, after setting all properties.
|
---|
1085 | function num_MinVec_CreateFcn(hObject, eventdata, handles)
|
---|
1086 | % hObject handle to num_MinVec (see GCBO)
|
---|
1087 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1088 | % handles empty - handles not created until after all CreateFcns called
|
---|
1089 |
|
---|
1090 | % Hint: edit controls usually have a white background on Windows.
|
---|
1091 | % See ISPC and COMPUTER.
|
---|
1092 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
1093 | set(hObject,'BackgroundColor','white');
|
---|
1094 | end
|
---|
1095 |
|
---|
1096 |
|
---|
1097 | % --- Executes on button press in CheckDecimate4.
|
---|
1098 | function CheckDecimate4_Callback(hObject, eventdata, handles)
|
---|
1099 | % hObject handle to CheckDecimate4 (see GCBO)
|
---|
1100 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1101 | % handles structure with handles and user data (see GUIDATA)
|
---|
1102 |
|
---|
1103 | % Hint: get(hObject,'Value') returns toggle state of CheckDecimate4
|
---|
1104 |
|
---|
1105 |
|
---|
1106 | % --- Executes on button press in heckHideFalse.
|
---|
1107 | function heckHideFalse_Callback(hObject, eventdata, handles)
|
---|
1108 | % hObject handle to heckHideFalse (see GCBO)
|
---|
1109 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1110 | % handles structure with handles and user data (see GUIDATA)
|
---|
1111 |
|
---|
1112 | % Hint: get(hObject,'Value') returns toggle state of heckHideFalse
|
---|
1113 |
|
---|
1114 |
|
---|
1115 |
|
---|
1116 | function num_Colcode2_Callback(hObject, eventdata, handles)
|
---|
1117 | % hObject handle to num_Colcode2 (see GCBO)
|
---|
1118 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1119 | % handles structure with handles and user data (see GUIDATA)
|
---|
1120 |
|
---|
1121 | % Hints: get(hObject,'String') returns contents of num_Colcode2 as text
|
---|
1122 | % str2double(get(hObject,'String')) returns contents of num_Colcode2 as a double
|
---|
1123 |
|
---|
1124 |
|
---|
1125 | % --- Executes during object creation, after setting all properties.
|
---|
1126 | function num_Colcode2_CreateFcn(hObject, eventdata, handles)
|
---|
1127 | % hObject handle to num_Colcode2 (see GCBO)
|
---|
1128 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1129 | % handles empty - handles not created until after all CreateFcns called
|
---|
1130 |
|
---|
1131 | % Hint: edit controls usually have a white background on Windows.
|
---|
1132 | % See ISPC and COMPUTER.
|
---|
1133 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
|
---|
1134 | set(hObject,'BackgroundColor','white');
|
---|
1135 | end
|
---|
1136 |
|
---|
1137 |
|
---|
1138 | % --- Executes on button press in CheckHideWarnin.
|
---|
1139 | function CheckHideWarnin_Callback(hObject, eventdata, handles)
|
---|
1140 | % hObject handle to CheckHideWarnin (see GCBO)
|
---|
1141 | % eventdata reserved - to be defined in a future version of MATLAB
|
---|
1142 | % handles structure with handles and user data (see GUIDATA)
|
---|
1143 |
|
---|
1144 | % Hint: get(hObject,'Value') returns toggle state of CheckHideWarnin
|
---|