1 |
function vizicq4_gui |
---|
2 |
%%% |
---|
3 |
%%% Build the VIZICQ4 interface |
---|
4 |
%%% |
---|
5 |
% Set Defaults |
---|
6 |
fontsize=get(0,'DefaultTextFontSize'); |
---|
7 |
set(0,'DefaultTextFontWeight','bold') |
---|
8 |
set(0,'DefaultAxesFontWeight','bold') |
---|
9 |
|
---|
10 |
% Set new figure; |
---|
11 |
ScreenUnits = get(0,'Units'); |
---|
12 |
set(0,'Unit','pixels'); |
---|
13 |
ScreenPos = get(0,'ScreenSize'); |
---|
14 |
set(0,'Unit',ScreenUnits); |
---|
15 |
Carolina_Blue=[0.6324 0.7650 0.8000]; |
---|
16 |
Figpos=[.15 .15 .8 .825].*ScreenPos+[0.1*ScreenPos(3:4) 0 0]; |
---|
17 |
vizicq4figure=figure('Colormap',jet(16),... |
---|
18 |
'HandleVisibility','on',... |
---|
19 |
'Visible','off',... |
---|
20 |
'Position',Figpos,... |
---|
21 |
'MenuBar','figure',... |
---|
22 |
'Units','pixels',... |
---|
23 |
'IntegerHandle','off',... |
---|
24 |
'Renderer','zbuffer',... |
---|
25 |
'RendererMode','auto',... |
---|
26 |
'Color',Carolina_Blue,... |
---|
27 |
'Interruptible','on',... |
---|
28 |
'WindowButtonDownFcn',... |
---|
29 |
'vizicq4_guts(''ButtonDownFcn'')'); |
---|
30 |
set(vizicq4figure,'DefaultAxesFontWeight','bold') |
---|
31 |
set(vizicq4figure,'DefaultUIControlFontWeight','bold') |
---|
32 |
|
---|
33 |
set(vizicq4figure,'Pointer','watch') |
---|
34 |
drawnow |
---|
35 |
|
---|
36 |
set(vizicq4figure,'Tag','VIZICQ4_Figure',... |
---|
37 |
'NumberTitle','off',... |
---|
38 |
'Name','VIZICQ4 Version 1.2',... |
---|
39 |
'Resize','on',... |
---|
40 |
'Visible','on',... |
---|
41 |
'KeyPressFcn','',... |
---|
42 |
'Units','pixels',... |
---|
43 |
'UserData',[]); |
---|
44 |
set(vizicq4figure,'Pointer','arrow') |
---|
45 |
drawnow |
---|
46 |
|
---|
47 |
% Create the target axes for drawing grid |
---|
48 |
axwidth = 0.8*Figpos(3); |
---|
49 |
axheight= axwidth/1.5/Figpos(4); |
---|
50 |
axstdpos = [0.075 0.14 0.7 axheight+.06]; |
---|
51 |
vizicq4gridaxes=axes('Parent',vizicq4figure,... |
---|
52 |
'Position',axstdpos,... |
---|
53 |
'XColor','k',... |
---|
54 |
'Box','on',... |
---|
55 |
'YColor','k',... |
---|
56 |
'Color','w',... |
---|
57 |
'DrawMode','fast',... |
---|
58 |
'XLimMode','auto',... |
---|
59 |
'YLimMode','auto',... |
---|
60 |
'XGrid','off',... |
---|
61 |
'YGrid','off',... |
---|
62 |
'XTickMode','auto',... |
---|
63 |
'YTickMode','auto',... |
---|
64 |
'Units','normalized',... |
---|
65 |
'DataAspectRatio',[1 1 1],... |
---|
66 |
'DataAspectRatioMode','auto',... |
---|
67 |
'ButtonDownFcn','',... |
---|
68 |
'Visible','on',... |
---|
69 |
'Tag','VIZICQ4_Grid_Axes'); |
---|
70 |
title('Grid Axes','FontSize',fontsize+5) |
---|
71 |
|
---|
72 |
% Save visible axes position: |
---|
73 |
setuprop(vizicq4gridaxes,'axstdpos',axstdpos) |
---|
74 |
|
---|
75 |
% Create a duplicate axes to hold the slice data |
---|
76 |
vizicq4sliceaxes=axes('Parent',vizicq4figure,... |
---|
77 |
'Units','normalized',... |
---|
78 |
'Position',[1.1 1.1 axstdpos(3) axstdpos(4)],... |
---|
79 |
'XColor','k',... |
---|
80 |
'Box','on',... |
---|
81 |
'YColor','k',... |
---|
82 |
'Color','w',... |
---|
83 |
'DrawMode','fast',... |
---|
84 |
'XLimMode','auto',... |
---|
85 |
'YLimMode','auto',... |
---|
86 |
'ZLimMode','auto',... |
---|
87 |
'XGrid','off',... |
---|
88 |
'YGrid','off',... |
---|
89 |
'ZGrid','off',... |
---|
90 |
'XTickMode','auto',... |
---|
91 |
'YTickMode','auto',... |
---|
92 |
'Units','normalized',... |
---|
93 |
'DataAspectRatio',[1 1 1],... |
---|
94 |
'DataAspectRatioMode','auto',... |
---|
95 |
'ButtonDownFcn','',... |
---|
96 |
'Visible','off',... |
---|
97 |
'Tag','VIZICQ4_Slice_Axes'); |
---|
98 |
invisaxstdpos=[1.1 1.1 axstdpos(3) axstdpos(4)]; |
---|
99 |
setuprop(vizicq4sliceaxes,'invisaxstdpos',invisaxstdpos) |
---|
100 |
title('Slice Axes','FontSize',fontsize+5) |
---|
101 |
|
---|
102 |
context_menus; |
---|
103 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
104 |
%%%%%%% FIRST-ROW MENUS IN ADDITION TO THE DEFAULT MENUBAR %%%%%%% |
---|
105 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
106 |
% Options menu: |
---|
107 |
opt_menu = uimenu(vizicq4figure,'Label','&Axis',... |
---|
108 |
'Accelerator','O',... |
---|
109 |
'Tag','VIZICQ4_Options_Menu',... |
---|
110 |
'Enable','on'); |
---|
111 |
uimenu(opt_menu,'Label','&Grid On/Off',... |
---|
112 |
'Accelerator','G',... |
---|
113 |
'CallBack','grid'); |
---|
114 |
temp=uimenu(opt_menu,'Label','Axes --->>>',... |
---|
115 |
'Accelerator','A',... |
---|
116 |
'Separator','on'); |
---|
117 |
uimenu(temp,'Label','&Axes Limits...',... |
---|
118 |
'Accelerator','A',... |
---|
119 |
'Separator','on',... |
---|
120 |
'CallBack',''); |
---|
121 |
uimenu(temp,'Label','Axes &Square ',... |
---|
122 |
'Accelerator','S',... |
---|
123 |
'CallBack','axis(''square'')'); |
---|
124 |
uimenu(temp,'Label','Axes &Tight ',... |
---|
125 |
'Accelerator','T',... |
---|
126 |
'CallBack','axis(''tight'')'); |
---|
127 |
uimenu(temp,'Label','Axes &Normal',... |
---|
128 |
'Accelerator','N',... |
---|
129 |
'CallBack','axis(''normal'')'); |
---|
130 |
uimenu(temp,'Label','Axes &Equal',... |
---|
131 |
'Accelerator','E',... |
---|
132 |
'CallBack','axis(''equal'')'); |
---|
133 |
uimenu(temp,'Label','Axes On',... |
---|
134 |
'CallBack','axis(''on'')'); |
---|
135 |
uimenu(temp,'Label','Axes Off',... |
---|
136 |
'CallBack','axis(''off'')'); |
---|
137 |
uimenu(opt_menu,'Label','WYSIWYG',... |
---|
138 |
'Interruptible','on',... |
---|
139 |
'CallBack','wysiwyg',... |
---|
140 |
'Separator','on','Enable','on'); |
---|
141 |
uimenu(opt_menu,'Label','HELP',... |
---|
142 |
'Interruptible','on',... |
---|
143 |
'Separator','on',... |
---|
144 |
'CallBack','vizicq4_guts(''Help'',''OptionsMenu'')',... |
---|
145 |
'Enable','off'); |
---|
146 |
|
---|
147 |
clear_menu= uimenu(vizicq4figure,'Label','&Clear',... |
---|
148 |
'Accelerator','C',... |
---|
149 |
'Tag','VIZICQ4_Clear_Menu',... |
---|
150 |
'UserData',[],'Enable','on'); |
---|
151 |
uimenu(clear_menu,'Label','Vectors',... |
---|
152 |
'CallBack','vizicq4_guts(''Clear'',''Vectors'')'); |
---|
153 |
uimenu(clear_menu,'Label','Volumes',... |
---|
154 |
'CallBack','vizicq4_guts(''Clear'',''Volumes'')'); |
---|
155 |
uimenu(clear_menu,'Label','Horz. Slices',... |
---|
156 |
'CallBack','vizicq4_guts(''Clear'',''HSlices'')'); |
---|
157 |
uimenu(clear_menu,'Label','Vert. Slices',... |
---|
158 |
'CallBack','vizicq4_guts(''Clear'',''VSlices'')'); |
---|
159 |
colormenu; |
---|
160 |
|
---|
161 |
|
---|
162 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
163 |
%%%%%%% FIRST-ROW ITEMS %%%%%%% |
---|
164 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
165 |
% first row backgroud ui frame |
---|
166 |
uicontrol(vizicq4figure,'Style','frame',... |
---|
167 |
'Units','normalized',... |
---|
168 |
'Position',[0 0.96 1 .04]); |
---|
169 |
% Current Domain: |
---|
170 |
uicontrol(vizicq4figure,'Style','text',... |
---|
171 |
'Units','normalized',... |
---|
172 |
'HorizontalAlignment','right',... |
---|
173 |
'Position',[0.005 .964 .1 .025],... |
---|
174 |
'String','FEM Domain: ',... |
---|
175 |
'ToolTipString','Enter FEM Domain Name'); |
---|
176 |
uicontrol(vizicq4figure,'Style','edit',... |
---|
177 |
'Units','normalized',... |
---|
178 |
'Position',[.105 .9625 .18 .035],... |
---|
179 |
'HorizontalAlignment','center',... |
---|
180 |
'BackgroundColor','w',... |
---|
181 |
'Enable','on',... |
---|
182 |
'Tag','VIZICQ4_Current_Domain',... |
---|
183 |
'Callback','vizicq4_guts(''Load_Grid'')',... |
---|
184 |
'String', '<enter domain name>',... |
---|
185 |
'UserData','none'); |
---|
186 |
uicontrol(vizicq4figure,'Style','text',... |
---|
187 |
'Units','normalized',... |
---|
188 |
'HorizontalAlignment','right',... |
---|
189 |
'Position',[0.3 .964 .09 .025],... |
---|
190 |
'String','Z-Contours: ',... |
---|
191 |
'ToolTipString','Bathymetry Contours'); |
---|
192 |
uicontrol(vizicq4figure,'Style','edit',... |
---|
193 |
'Units','normalized',... |
---|
194 |
'Position',[.39 .967 .15 .025],... |
---|
195 |
'HorizontalAlignment','center',... |
---|
196 |
'BackgroundColor','w',... |
---|
197 |
'Enable','on',... |
---|
198 |
'Tag','VIZICQ4_Contour_Vals',... |
---|
199 |
'Callback','vizicq4_guts(''ZContours'')',... |
---|
200 |
'ToolTipString','Bathymetry Contours',... |
---|
201 |
'String', 'linspace(zmin,zmax,7)',... |
---|
202 |
'UserData','none'); |
---|
203 |
uicontrol(vizicq4figure,'Style','push',... |
---|
204 |
'Units','normalized',... |
---|
205 |
'Position',[.575 .9625 .05 .035],... |
---|
206 |
'HorizontalAlignment','center',... |
---|
207 |
'Enable','on',... |
---|
208 |
'Callback','vizicq4_guts(''LabCont'')',... |
---|
209 |
'ToolTipString','Label Contours',... |
---|
210 |
'String', 'LabC',... |
---|
211 |
'UserData','none',... |
---|
212 |
'Tag','VIZICQ4_LabCont'); |
---|
213 |
uicontrol(vizicq4figure,'Style','push',... |
---|
214 |
'Units','normalized',... |
---|
215 |
'Position',[.625 .9625 .05 .035],... |
---|
216 |
'HorizontalAlignment','center',... |
---|
217 |
'Enable','on',... |
---|
218 |
'Callback','vizicq4_guts(''DelCont'')',... |
---|
219 |
'ToolTipString','Delete Contours',... |
---|
220 |
'String', 'DelC',... |
---|
221 |
'UserData','none',... |
---|
222 |
'Tag','VIZICQ4_DelCont'); |
---|
223 |
|
---|
224 |
% Create the ShipTrack button |
---|
225 |
uicontrol(vizicq4figure,'Style','push','String','ShipTrack',... |
---|
226 |
'Tag','VIZICQ4_ShipTrack_Popup_Button',... |
---|
227 |
'CallBack','vizicq4_ShipTrack(''Pop'')',... |
---|
228 |
'Units','normalized',... |
---|
229 |
'Position',[.70 .9625 .075 .035],... |
---|
230 |
'ForeGroundColor','k','Enable','off'); |
---|
231 |
|
---|
232 |
% Create the Volume button |
---|
233 |
uicontrol(vizicq4figure,'Style','push','String','Volume',... |
---|
234 |
'Tag','VIZICQ4_Volume_Popup_Button',... |
---|
235 |
'CallBack','vizicq4_volume(''Pop'')',... |
---|
236 |
'Units','normalized',... |
---|
237 |
'Position',[.775 .9625 .075 .035],... |
---|
238 |
'ForeGroundColor','k'); |
---|
239 |
% Create the Slicer button |
---|
240 |
uicontrol(vizicq4figure,'Style','push','String','Slice',... |
---|
241 |
'Tag','VIZICQ4_Slicer_Popup_Button',... |
---|
242 |
'CallBack','vizicq4_slicer(''Pop'')',... |
---|
243 |
'Units','normalized',... |
---|
244 |
'Position',[.85 .9625 .075 .035],... |
---|
245 |
'ForeGroundColor','k'); |
---|
246 |
|
---|
247 |
% Create the Toggle Axes button |
---|
248 |
uicontrol(vizicq4figure,'Style','push',... |
---|
249 |
'String','Toggle Axes',... |
---|
250 |
'Tag','VIZICQ4_Toggle_Axes_Button',... |
---|
251 |
'CallBack','vizicq4_guts(''Toggle_Axes'')',... |
---|
252 |
'Units','normalized',... |
---|
253 |
'Position',[.925 .9625 .075 .035],... |
---|
254 |
'ForeGroundColor','k'); |
---|
255 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
256 |
%%%%%%% SECOND-ROW ITEMS %%%%%%% |
---|
257 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
258 |
% first row backgroud ui frame |
---|
259 |
uicontrol(vizicq4figure,'Style','frame',... |
---|
260 |
'Units','normalized',... |
---|
261 |
'Position',[0 0.92 1 .04]); |
---|
262 |
% Current directory: |
---|
263 |
uicontrol(vizicq4figure,'Style','text',... |
---|
264 |
'Units','normalized',... |
---|
265 |
'HorizontalAlignment','right',... |
---|
266 |
'Position',[0.005 .9225 .1 .03],... |
---|
267 |
'String','Forecast Dir: ',... |
---|
268 |
'ToolTipString','Enter Forecast Directory'); |
---|
269 |
cur_dir=pwd; |
---|
270 |
uicontrol(vizicq4figure,'Style','edit',... |
---|
271 |
'Units','normalized',... |
---|
272 |
'Position',[.105 .9225 .5 .035],... |
---|
273 |
'HorizontalAlignment','left',... |
---|
274 |
'BackgroundColor','w',... |
---|
275 |
'Enable','on',... |
---|
276 |
'Tag','VIZICQ4_Current_Icq4_Dir',... |
---|
277 |
'Callback',... |
---|
278 |
'vizicq4_guts(''Load_Icq4'',''Directory'')',... |
---|
279 |
'String',cur_dir,... |
---|
280 |
'UserData','none'); |
---|
281 |
|
---|
282 |
% Current Icq4 file name: |
---|
283 |
uicontrol(vizicq4figure,'Style','text',... |
---|
284 |
'Units','normalized',... |
---|
285 |
'HorizontalAlignment','right',... |
---|
286 |
'Position',[0.63 .9225 .15 .03],... |
---|
287 |
'String','Icq4 Name: ',... |
---|
288 |
'ToolTipString','Enter QUODDY4 .icq4 file name'); |
---|
289 |
uicontrol(vizicq4figure, 'Style','edit',... |
---|
290 |
'Units','normalized',... |
---|
291 |
'Position',[.78 .9225 .18 .035],... |
---|
292 |
'HorizontalAlignment','left',... |
---|
293 |
'BackgroundColor','w',... |
---|
294 |
'Enable','on',... |
---|
295 |
'Tag','VIZICQ4_Current_Icq4_Name',... |
---|
296 |
'Callback','vizicq4_guts(''Load_Icq4'',''Name'')',... |
---|
297 |
'String', '<enter .icq4 filename>',... |
---|
298 |
'UserData','none'); |
---|
299 |
|
---|
300 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
301 |
%%%%% BOTTOM OF FIGURE ITEMS %%%%% |
---|
302 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
303 |
% Info Line display: |
---|
304 |
uicontrol(vizicq4figure,'Style','frame',... |
---|
305 |
'Units','normalized',... |
---|
306 |
'Position',[0 0 .44 .06]); |
---|
307 |
uicontrol(vizicq4figure,'Style','text',... |
---|
308 |
'Units','normalized',... |
---|
309 |
'HorizontalAlignment','right',... |
---|
310 |
'Position',[.02 .005 .07 .04],... |
---|
311 |
'String','Info:',... |
---|
312 |
'Tag','VIZICQ4_Info'); |
---|
313 |
uicontrol(vizicq4figure,'Style','text',... |
---|
314 |
'Units','normalized',... |
---|
315 |
'Position',[.10 .01 .33 .04],... |
---|
316 |
'HorizontalAlignment','left',... |
---|
317 |
'Value',1,... |
---|
318 |
'Tag','VIZICQ4_Info_Text',... |
---|
319 |
'BackGroundColor','w',... |
---|
320 |
'String',' Load a FEM Domain'); |
---|
321 |
|
---|
322 |
% Error Line display: |
---|
323 |
uicontrol(vizicq4figure,'Style','frame',... |
---|
324 |
'Units','normalized',... |
---|
325 |
'Position',[.44 0 .42 .06]); |
---|
326 |
uicontrol(vizicq4figure,'Style','text',... |
---|
327 |
'Units','normalized',... |
---|
328 |
'HorizontalAlignment','right',... |
---|
329 |
'Position',[.46 .005 .07 .04],... |
---|
330 |
'ForeGroundColor','r',... |
---|
331 |
'String','Error:',... |
---|
332 |
'Tag','VIZICQ4_Error',... |
---|
333 |
'Visible','on'); |
---|
334 |
uicontrol(vizicq4figure,'Style','text',... |
---|
335 |
'Units','normalized',... |
---|
336 |
'Position',[.54 .01 .31 .04],... |
---|
337 |
'HorizontalAlignment','left',... |
---|
338 |
'Value',1,... |
---|
339 |
'Tag','VIZICQ4_Error_Text',... |
---|
340 |
'String',' No Errors PLEASE!!',... |
---|
341 |
'BackGroundColor','w',... |
---|
342 |
'ForeGroundColor','r'); |
---|
343 |
|
---|
344 |
% Exit button |
---|
345 |
uicontrol(vizicq4figure,'Style','frame',... |
---|
346 |
'Units','normalized',... |
---|
347 |
'Position',[0.86 0 .14 .06]); |
---|
348 |
uicontrol(vizicq4figure,'Style','pushbutton',... |
---|
349 |
'Interruptible','on',... |
---|
350 |
'Units','normalized',... |
---|
351 |
'Position',[.88 .01 .1 .04],... |
---|
352 |
'ToolTipString','Terminate VIZICQ4',... |
---|
353 |
'Callback','vizicq4_guts(''Terminate'')',... |
---|
354 |
'String','Exit'); |
---|
355 |
|
---|
356 |
% Set up "Select icq4 variable" section |
---|
357 |
uicontrol(vizicq4figure,'Style','frame',... |
---|
358 |
'Units','normalized',... |
---|
359 |
'Position',[.81 .25 .15 .6]); |
---|
360 |
uicontrol(vizicq4figure,'Style','text',... |
---|
361 |
'Units','normalized',... |
---|
362 |
'Position',[.83 .795 .11 .05],... |
---|
363 |
'String','Select State Var',... |
---|
364 |
'ForeGroundColor','r',... |
---|
365 |
'BackGroundColor','w'); |
---|
366 |
|
---|
367 |
% Define mutually exclusive radio buttons. |
---|
368 |
varlist={'HMID';'UMID';'VMID';'HOLD';'UOLD';'VOLD';'ZMID';'ZOLD', |
---|
369 |
'UZMID';'VZMID';'WZMID';'Q2MID';'Q2LMID';'TMPMID';'SALMID';'RHO'}; |
---|
370 |
dy=.0; |
---|
371 |
buttonwidth=.09; |
---|
372 |
buttonheight=.03; |
---|
373 |
ystart=.76; |
---|
374 |
xstart=.84; |
---|
375 |
for i=1:length(varlist) |
---|
376 |
hvar(i)=uicontrol(vizicq4figure,'Style','radio',... |
---|
377 |
'Units','normalized',... |
---|
378 |
'Position',... |
---|
379 |
[xstart ystart-(i-1)*(buttonheight+dy) buttonwidth buttonheight],... |
---|
380 |
'String',varlist{i},... |
---|
381 |
'HorizontalAlignment','left',... |
---|
382 |
'Enable','off','Tag','VIZICQ4_icq4_select_button'); |
---|
383 |
end |
---|
384 |
for i=1:length(varlist) |
---|
385 |
set(hvar(i),'UserData',hvar(:,[1:(i-1),(i+1):length(varlist)])) |
---|
386 |
end |
---|
387 |
CALL1=['me=get(gcf,''CurrentObject'');',... |
---|
388 |
'if(get(me,''Value'')==1),',... |
---|
389 |
'set(get(me,''UserData''),''Value'',0),',... |
---|
390 |
'else,',... |
---|
391 |
'set(me,''Value'',1),',... |
---|
392 |
'end']; |
---|
393 |
set(hvar,'CallBack',CALL1); |
---|
394 |
|
---|
395 |
% Unset the Tags of the 2-D fields so they won't be found. Later |
---|
396 |
% versions will use these. |
---|
397 |
set(hvar(1:8),'Tag','') |
---|
398 |
|
---|
399 |
% Set the Tag for the density button separately |
---|
400 |
% set(hvar(length(varlist)),'Tag','VIZICQ4_icq4_select_button_RHO') |
---|
401 |
|
---|
402 |
% icq4 info button |
---|
403 |
uicontrol(vizicq4figure,'Style','push',... |
---|
404 |
'String','Icq4 Info',... |
---|
405 |
'Tag','VIZICQ4_Toggle_Axes_Button',... |
---|
406 |
'CallBack','vizicq4_guts(''Icq4_Info'')',... |
---|
407 |
'Units','normalized',... |
---|
408 |
'Position',[.83 .26 .12 .04],... |
---|
409 |
'ForeGroundColor','k'); |
---|
410 |
|
---|
411 |
% Build the "make_slice" gui |
---|
412 |
vizicq4_make_volume_popup; |
---|
413 |
vizicq4_make_slicer_popup; |
---|
414 |
make_icq4_info_popup; |
---|
415 |
|
---|
416 |
% Before exiting, store invisaxstdpos and axstdpos |
---|
417 |
% invisaxstdpos is hung from the VIZICQ4_LabCont UserData |
---|
418 |
VIZICQ4_LabCont=findobj(vizicq4figure,'Type','uicontrol',... |
---|
419 |
'Tag','VIZICQ4_LabCont'); |
---|
420 |
set(VIZICQ4_LabCont,'UserData',invisaxstdpos); |
---|
421 |
% axstdpos is hung from the VIZICQ4_DelCont |
---|
422 |
VIZICQ4_DelCont=findobj(vizicq4figure,'Type','uicontrol',... |
---|
423 |
'Tag','VIZICQ4_DelCont'); |
---|
424 |
set(VIZICQ4_DelCont,'UserData',axstdpos); |
---|
425 |
|
---|
426 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
427 |
%%%%%%%%%%%%%%% vizicq4_make_slicer_popup %%%%%%%%%%%%%%%%% |
---|
428 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
429 |
|
---|
430 |
function vizicq4_make_slicer_popup |
---|
431 |
% Figure defaults |
---|
432 |
fontsize=get(0,'DefaultTextFontSize'); |
---|
433 |
set(0,'DefaultTextFontWeight','bold') |
---|
434 |
%%%% Build Volume Popup |
---|
435 |
sfig=figure('Position',[107 410 746 248],... |
---|
436 |
'IntegerHandle','off',... |
---|
437 |
'NumberTitle','off',... |
---|
438 |
'MenuBar','none',... |
---|
439 |
'Name','VIZICQ4 1.2 Slicer',... |
---|
440 |
'Resize','off',... |
---|
441 |
'Units','pixels',... |
---|
442 |
'Tag','VIZICQ4_Slicer_Fig',... |
---|
443 |
'CloseRequestFcn','closereq',... |
---|
444 |
'Visible','off'); |
---|
445 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
446 |
% Horz Slice Selection |
---|
447 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
448 |
uicontrol(sfig,'Style','frame',... |
---|
449 |
'Units','normalized',... |
---|
450 |
'Position',[0 .2 .5 .8],... |
---|
451 |
'Units','pixels'); |
---|
452 |
uicontrol(sfig,'Style','text',... |
---|
453 |
'String','Horizontal',... |
---|
454 |
'ForeGroundColor','k',... |
---|
455 |
'Units','normalized',... |
---|
456 |
'FontSize',fontsize+2,... |
---|
457 |
'FontWeight','bold',... |
---|
458 |
'Position',[.05 .89 .4 .1],... |
---|
459 |
'HorizontalAlignment','center',... |
---|
460 |
'Enable','on') |
---|
461 |
|
---|
462 |
uicontrol(sfig,'Style','text',... |
---|
463 |
'String','Z-val:',... |
---|
464 |
'ForeGroundColor','k',... |
---|
465 |
'Units','normalized',... |
---|
466 |
'Position',[.01 .72 .1 .07],... |
---|
467 |
'HorizontalAlignment','center',... |
---|
468 |
'Enable','on') |
---|
469 |
uicontrol(sfig,'Style','edit',... |
---|
470 |
'String','<>',... |
---|
471 |
'ForeGroundColor','k',... |
---|
472 |
'Units','normalized',... |
---|
473 |
'Position',[.1 .72 .1 .07],... |
---|
474 |
'HorizontalAlignment','center',... |
---|
475 |
'Enable','on',... |
---|
476 |
'Tag','VIZICQ4_Slice_Z') |
---|
477 |
|
---|
478 |
uicontrol(sfig,'Style','frame',... |
---|
479 |
'ForeGroundColor','k',... |
---|
480 |
'Units','normalized',... |
---|
481 |
'Position',[.07 .25 .15 .1],... |
---|
482 |
'Enable','on') |
---|
483 |
uicontrol(sfig,'Style','radio',... |
---|
484 |
'ForeGroundColor','k',... |
---|
485 |
'Units','normalized',... |
---|
486 |
'Position',[.075 .26 .025 .08],... |
---|
487 |
'HorizontalAlignment','center',... |
---|
488 |
'Enable','on',... |
---|
489 |
'Tag','VIZICQ4_Slice_HVectors') |
---|
490 |
uicontrol(sfig,'Style','text',... |
---|
491 |
'String','Vectors',... |
---|
492 |
'ForeGroundColor','k',... |
---|
493 |
'Units','normalized',... |
---|
494 |
'Position',[.1 .26 .1 .07],... |
---|
495 |
'Tag','') |
---|
496 |
|
---|
497 |
uicontrol(sfig,'Style','push',... |
---|
498 |
'Units','normalized',... |
---|
499 |
'Position',[.30 .25 .15 .1],... |
---|
500 |
'Units','pixels',... |
---|
501 |
'String','Make Slice',... |
---|
502 |
'ToolTipString','',... |
---|
503 |
'Enable','on',... |
---|
504 |
'Callback','vizicq4_slicer(''MakeHSlice'')',... |
---|
505 |
'Tag','','Enable','on') |
---|
506 |
|
---|
507 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
508 |
% Transect Selection |
---|
509 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
510 |
uicontrol(sfig,'Style','frame',... |
---|
511 |
'Units','normalized',... |
---|
512 |
'Position',[.5 .2 .5 .8],... |
---|
513 |
'Units','pixels'); |
---|
514 |
uicontrol(sfig,'Style','text',... |
---|
515 |
'String','Vertical',... |
---|
516 |
'ForeGroundColor','k',... |
---|
517 |
'Units','normalized',... |
---|
518 |
'FontSize',fontsize+2,... |
---|
519 |
'FontWeight','bold',... |
---|
520 |
'Position',[.55 .89 .4 .1],... |
---|
521 |
'HorizontalAlignment','center',... |
---|
522 |
'Enable','on') |
---|
523 |
|
---|
524 |
x1=.51;x2=.62; |
---|
525 |
dx=.1; |
---|
526 |
y1=.8; |
---|
527 |
dy=.08; |
---|
528 |
dy1=.07;dy2=.08; |
---|
529 |
POS=[x1 y1-0*dy dx dy1 |
---|
530 |
x2 y1-0*dy dx dy2 |
---|
531 |
x1 y1-1*dy dx dy1 |
---|
532 |
x2 y1-1*dy dx dy2 |
---|
533 |
x1 y1-2*dy dx dy1 |
---|
534 |
x2 y1-2*dy dx dy2 |
---|
535 |
x1 y1-3*dy dx dy1 |
---|
536 |
x2 y1-3*dy dx dy2 |
---|
537 |
x1 y1-4*dy dx dy1 |
---|
538 |
x2 y1-4*dy dx dy2 |
---|
539 |
x1 y1-5*dy dx dy1 |
---|
540 |
x2 y1-5*dy dx dy2]; |
---|
541 |
|
---|
542 |
uicontrol(sfig,'Style','text',... |
---|
543 |
'String','X 1:',... |
---|
544 |
'ForeGroundColor','k',... |
---|
545 |
'Units','normalized',... |
---|
546 |
'Position',POS(1,:),... |
---|
547 |
'HorizontalAlignment','center',... |
---|
548 |
'Enable','on') |
---|
549 |
uicontrol(sfig,'Style','edit',... |
---|
550 |
'String','<>',... |
---|
551 |
'ForeGroundColor','k',... |
---|
552 |
'Units','normalized',... |
---|
553 |
'Position',POS(2,:),... |
---|
554 |
'HorizontalAlignment','center',... |
---|
555 |
'Enable','off',... |
---|
556 |
'Tag','VIZICQ4_Slice_X1') |
---|
557 |
uicontrol(sfig,'Style','text',... |
---|
558 |
'String','Y 1:',... |
---|
559 |
'ForeGroundColor','k',... |
---|
560 |
'Units','normalized',... |
---|
561 |
'Position',POS(3,:),... |
---|
562 |
'HorizontalAlignment','center') |
---|
563 |
uicontrol(sfig,'Style','edit',... |
---|
564 |
'String','<>',... |
---|
565 |
'ForeGroundColor','k',... |
---|
566 |
'Units','normalized',... |
---|
567 |
'Position',POS(4,:),... |
---|
568 |
'HorizontalAlignment','center',... |
---|
569 |
'Enable','off',... |
---|
570 |
'Tag','VIZICQ4_Slice_Y1') |
---|
571 |
uicontrol(sfig,'Style','text',... |
---|
572 |
'String','X 2:',... |
---|
573 |
'ForeGroundColor','k',... |
---|
574 |
'Units','normalized',... |
---|
575 |
'Position',POS(5,:),... |
---|
576 |
'HorizontalAlignment','center') |
---|
577 |
uicontrol(sfig,'Style','edit',... |
---|
578 |
'String','<>',... |
---|
579 |
'ForeGroundColor','k',... |
---|
580 |
'Units','normalized',... |
---|
581 |
'Position',POS(6,:),... |
---|
582 |
'HorizontalAlignment','center',... |
---|
583 |
'Enable','off',... |
---|
584 |
'Tag','VIZICQ4_Slice_X2') |
---|
585 |
uicontrol(sfig,'Style','text',... |
---|
586 |
'String','Y 2:',... |
---|
587 |
'ForeGroundColor','k',... |
---|
588 |
'Units','normalized',... |
---|
589 |
'Position',POS(7,:),... |
---|
590 |
'HorizontalAlignment','center',... |
---|
591 |
'Enable','on') |
---|
592 |
uicontrol(sfig,'Style','edit',... |
---|
593 |
'String','<>',... |
---|
594 |
'ForeGroundColor','k',... |
---|
595 |
'Units','normalized',... |
---|
596 |
'Position',POS(8,:),... |
---|
597 |
'HorizontalAlignment','center',... |
---|
598 |
'Enable','off',... |
---|
599 |
'Tag','VIZICQ4_Slice_Y2') |
---|
600 |
uicontrol(sfig,'Style','text',... |
---|
601 |
'String','DL:',... |
---|
602 |
'ForeGroundColor','k',... |
---|
603 |
'Units','normalized',... |
---|
604 |
'Position',POS(9,:),... |
---|
605 |
'HorizontalAlignment','center',... |
---|
606 |
'Enable','on') |
---|
607 |
uicontrol(sfig,'Style','edit',... |
---|
608 |
'String','2000',... |
---|
609 |
'ForeGroundColor','k',... |
---|
610 |
'Units','normalized',... |
---|
611 |
'Position',POS(10,:),... |
---|
612 |
'ToolTipString','Sample Spacing in meters',... |
---|
613 |
'HorizontalAlignment','center',... |
---|
614 |
'Enable','off',... |
---|
615 |
'Tag','VIZICQ4_Slice_DL') |
---|
616 |
uicontrol(sfig,'Style','text',... |
---|
617 |
'String','NCol:',... |
---|
618 |
'ForeGroundColor','k',... |
---|
619 |
'Units','normalized',... |
---|
620 |
'Position',POS(11,:),... |
---|
621 |
'HorizontalAlignment','center',... |
---|
622 |
'Enable','on') |
---|
623 |
uicontrol(sfig,'Style','edit',... |
---|
624 |
'String','16',... |
---|
625 |
'ForeGroundColor','k',... |
---|
626 |
'Units','normalized',... |
---|
627 |
'Position',POS(12,:),... |
---|
628 |
'ToolTipString','Number of color bands',... |
---|
629 |
'HorizontalAlignment','center',... |
---|
630 |
'Enable','off',... |
---|
631 |
'Tag','VIZICQ4_Slice_NC') |
---|
632 |
uicontrol(sfig,'Style','frame',... |
---|
633 |
'ForeGroundColor','k',... |
---|
634 |
'Units','normalized',... |
---|
635 |
'Position',[.57 .25 .15 .1]) |
---|
636 |
uicontrol(sfig,'Style','radio',... |
---|
637 |
'ForeGroundColor','k',... |
---|
638 |
'Units','normalized',... |
---|
639 |
'Position',[.575 .26 .025 .08],... |
---|
640 |
'HorizontalAlignment','center',... |
---|
641 |
'Enable','on',... |
---|
642 |
'Tag','VIZICQ4_Slice_VVectors') |
---|
643 |
uicontrol(sfig,'Style','text',... |
---|
644 |
'String','Vectors',... |
---|
645 |
'ForeGroundColor','k',... |
---|
646 |
'Units','normalized',... |
---|
647 |
'Position',[.6 .26 .1 .07]) |
---|
648 |
|
---|
649 |
uicontrol(sfig,'Style','push',... |
---|
650 |
'Units','normalized',... |
---|
651 |
'Position',[.80 .75 .15 .1],... |
---|
652 |
'Units','pixels',... |
---|
653 |
'String','X-Slice Mouse',... |
---|
654 |
'ToolTipString','Cut Constant X',... |
---|
655 |
'Enable','on',... |
---|
656 |
'Callback','vizicq4_slicer(''SelRegion'',''XSlice'')',... |
---|
657 |
'Tag','','Enable','on') |
---|
658 |
uicontrol(sfig,'Style','push',... |
---|
659 |
'Units','normalized',... |
---|
660 |
'Position',[.80 .65 .15 .1],... |
---|
661 |
'Units','pixels',... |
---|
662 |
'String','Y-Slice Mouse',... |
---|
663 |
'ToolTipString','Cut Constant Y',... |
---|
664 |
'Enable','on',... |
---|
665 |
'Callback','vizicq4_slicer(''SelRegion'',''YSlice'')',... |
---|
666 |
'Tag','','Enable','on') |
---|
667 |
uicontrol(sfig,'Style','push',... |
---|
668 |
'Units','normalized',... |
---|
669 |
'Position',[.80 .55 .15 .1],... |
---|
670 |
'Units','pixels',... |
---|
671 |
'String','Arbitrary Slice',... |
---|
672 |
'ToolTipString','Arbitrary Horiz. Slice',... |
---|
673 |
'Enable','on',... |
---|
674 |
'Callback','vizicq4_slicer(''SelRegion'',''ArbSlice'')',... |
---|
675 |
'Tag','','Enable','on') |
---|
676 |
uicontrol(sfig,'Style','push',... |
---|
677 |
'Units','normalized',... |
---|
678 |
'Position',[.80 .25 .15 .1],... |
---|
679 |
'Units','pixels',... |
---|
680 |
'String','Make Slice',... |
---|
681 |
'ToolTipString','',... |
---|
682 |
'Enable','on',... |
---|
683 |
'Callback','vizicq4_slicer(''MakeVSlice'')',... |
---|
684 |
'Tag','','Enable','on') |
---|
685 |
|
---|
686 |
% Frame at bottom of fig |
---|
687 |
uicontrol(sfig,'Style','frame',... |
---|
688 |
'Units','normalized',... |
---|
689 |
'Position',[0 0 1 .2],... |
---|
690 |
'Units','pixels'); |
---|
691 |
|
---|
692 |
uicontrol(sfig,'Style','push',... |
---|
693 |
'Units','normalized',... |
---|
694 |
'Position',[.9 .05 .09 .1],... |
---|
695 |
'Units','pixels',... |
---|
696 |
'String','Close',... |
---|
697 |
'Callback','vizicq4_slicer(''Close'')',... |
---|
698 |
'ToolTipString','Close Volume Popup') |
---|
699 |
uicontrol(sfig,'Style','push',... |
---|
700 |
'Units','normalized',... |
---|
701 |
'Position',[.8 .05 .09 .1],... |
---|
702 |
'Units','pixels',... |
---|
703 |
'String','Rotate On',... |
---|
704 |
'Callback','vizicq4_slicer(''Rotate_Toggle'')',... |
---|
705 |
'ToolTipString','Activate 3-D Rotation',... |
---|
706 |
'Tag','VIZICQ4_Slicer_Rotation') |
---|
707 |
|
---|
708 |
uicontrol(sfig,'Style','push',... |
---|
709 |
'Units','normalized',... |
---|
710 |
'Position',[.7 .05 .09 .1],... |
---|
711 |
'Units','pixels',... |
---|
712 |
'String','Reset 2D',... |
---|
713 |
'Callback','vizicq4_slicer(''Reset_View'')',... |
---|
714 |
'ToolTipString','Restore 2-D view') |
---|
715 |
|
---|
716 |
uicontrol(sfig,'Style','push',... |
---|
717 |
'Units','normalized',... |
---|
718 |
'Position',[.6 .05 .09 .1],... |
---|
719 |
'Units','pixels',... |
---|
720 |
'String','Colorbar',... |
---|
721 |
'Callback','vizicq4_slicer(''Colorbar'')',... |
---|
722 |
'ToolTipString','Place Colorbar') |
---|
723 |
|
---|
724 |
uicontrol(sfig,'Style','push',... |
---|
725 |
'Units','normalized',... |
---|
726 |
'Position',[.5 .05 .09 .1],... |
---|
727 |
'Units','pixels',... |
---|
728 |
'String','Del 1 Slice',... |
---|
729 |
'Callback','vizicq4_slicer(''DelSlice'',''one'')',... |
---|
730 |
'ToolTipString','Delete A Slice') |
---|
731 |
uicontrol(sfig,'Style','push',... |
---|
732 |
'Units','normalized',... |
---|
733 |
'Position',[.4 .05 .09 .1],... |
---|
734 |
'Units','pixels',... |
---|
735 |
'String','DelAllSlice',... |
---|
736 |
'Callback','vizicq4_slicer(''DelSlice'',''all'')',... |
---|
737 |
'ToolTipString','Delete All Slices') |
---|
738 |
|
---|
739 |
uicontrol(sfig,'Style','text',... |
---|
740 |
'Units','normalized',... |
---|
741 |
'Position',[.12 .075 .1 .1],... |
---|
742 |
'Units','pixels',... |
---|
743 |
'String','Shading:',... |
---|
744 |
'HorizontalAlignment','left') |
---|
745 |
|
---|
746 |
uicontrol(sfig,'Style','radio',... |
---|
747 |
'Units','normalized',... |
---|
748 |
'Position',[.01 .02 .1 .1],... |
---|
749 |
'Units','pixels',... |
---|
750 |
'String','Interp',... |
---|
751 |
'Callback','vizicq4_slicer(''Shading'',''Interp'')',... |
---|
752 |
'ToolTipString','Interpolated Shading',... |
---|
753 |
'Tag','VIZICQ4_Slicer_Shading_Interp') |
---|
754 |
uicontrol(sfig,'Style','radio',... |
---|
755 |
'Units','normalized',... |
---|
756 |
'Position',[.11 .02 .1 .1],... |
---|
757 |
'Units','pixels',... |
---|
758 |
'String','Flat',... |
---|
759 |
'Callback','vizicq4_slicer(''Shading'',''Flat'')',... |
---|
760 |
'ToolTipString','Flat Shading',... |
---|
761 |
'Tag','VIZICQ4_Slicer_Shading_Flat') |
---|
762 |
uicontrol(sfig,'Style','radio',... |
---|
763 |
'Units','normalized',... |
---|
764 |
'Position',[.21 .02 .1 .1],... |
---|
765 |
'Units','pixels',... |
---|
766 |
'String','Faceted',... |
---|
767 |
'Callback','vizicq4_slicer(''Shading'',''Faceted'')',... |
---|
768 |
'ToolTipString','Faceted Shading',... |
---|
769 |
'Tag','VIZICQ4_Slicer_Shading_Faceted') |
---|
770 |
|
---|
771 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
772 |
%%%%%%%%%%%%%%% vizicq4_make_volume_popup %%%%%%%%%%%%%%%%% |
---|
773 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
774 |
|
---|
775 |
function vizicq4_make_volume_popup |
---|
776 |
% Figure defaults |
---|
777 |
fontsize=get(0,'DefaultTextFontSize'); |
---|
778 |
set(0,'DefaultTextFontWeight','bold') |
---|
779 |
%%%% Build Volume Popup |
---|
780 |
sfig=figure('Position',[107 410 746 248],... |
---|
781 |
'IntegerHandle','off',... |
---|
782 |
'NumberTitle','off',... |
---|
783 |
'MenuBar','none',... |
---|
784 |
'Name','VIZICQ4 1.2 Volume Popup',... |
---|
785 |
'Resize','off',... |
---|
786 |
'Units','pixels',... |
---|
787 |
'Tag','VIZICQ4_Volume_Fig',... |
---|
788 |
'CloseRequestFcn','closereq',... |
---|
789 |
'Visible','off'); |
---|
790 |
global MAP_SCALAR_EXIST |
---|
791 |
if ~MAP_SCALAR_EXIST |
---|
792 |
VIZICQ4_Volume_Popup_Button=findobj(0,'Tag','VIZICQ4_Volume_Popup_Button'); |
---|
793 |
set(VIZICQ4_Volume_Popup_Button,'Enable','off') |
---|
794 |
end |
---|
795 |
|
---|
796 |
|
---|
797 |
%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
798 |
% FD Slice FRAME |
---|
799 |
%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
800 |
uicontrol(sfig,'Style','frame',... |
---|
801 |
'Units','normalized',... |
---|
802 |
'Position',[.0 .2 .5 .8],... |
---|
803 |
'Units','pixels'); |
---|
804 |
uicontrol(sfig,'Style','text',... |
---|
805 |
'String','FD Discretization',... |
---|
806 |
'FontSize',fontsize+2,... |
---|
807 |
'ForeGroundColor','k',... |
---|
808 |
'FontWeight','bold',... |
---|
809 |
'Units','normalized',... |
---|
810 |
'Position',[.125 .90 .2 .075]) |
---|
811 |
uicontrol(sfig,'Style','text',... |
---|
812 |
'String','Discretization',... |
---|
813 |
'ForeGroundColor','k',... |
---|
814 |
'FontWeight','bold',... |
---|
815 |
'Units','normalized',... |
---|
816 |
'Position',[.025 .80 .15 .075]) |
---|
817 |
uicontrol(sfig,'Style','text',... |
---|
818 |
'String','Nx:',... |
---|
819 |
'ForeGroundColor','k',... |
---|
820 |
'Units','normalized',... |
---|
821 |
'Position',[.01 .65 .05 .075]) |
---|
822 |
uicontrol(sfig,'Style','edit',... |
---|
823 |
'String','50',... |
---|
824 |
'ForeGroundColor','k',... |
---|
825 |
'Units','normalized',... |
---|
826 |
'Position',[.08 .65 .05 .08],... |
---|
827 |
'BackgroundColor','w',... |
---|
828 |
'Tag','VIZICQ4_Nx') |
---|
829 |
uicontrol(sfig,'Style','text',... |
---|
830 |
'String','Ny:',... |
---|
831 |
'ForeGroundColor','k',... |
---|
832 |
'Units','normalized',... |
---|
833 |
'Position',[.01 .55 .05 .075]) |
---|
834 |
uicontrol(sfig,'Style','edit',... |
---|
835 |
'String','50',... |
---|
836 |
'ForeGroundColor','k',... |
---|
837 |
'Units','normalized',... |
---|
838 |
'Position',[.08 .55 .05 .08],... |
---|
839 |
'BackgroundColor','w',... |
---|
840 |
'Tag','VIZICQ4_Ny') |
---|
841 |
uicontrol(sfig,'Style','text',... |
---|
842 |
'String','Nz:',... |
---|
843 |
'ForeGroundColor','k',... |
---|
844 |
'Units','normalized',... |
---|
845 |
'Position',[.01 .45 .05 .075]) |
---|
846 |
uicontrol(sfig,'Style','edit',... |
---|
847 |
'String','10',... |
---|
848 |
'ForeGroundColor','k',... |
---|
849 |
'Units','normalized',... |
---|
850 |
'Position',[.08 .45 .05 .08],... |
---|
851 |
'BackgroundColor','w',... |
---|
852 |
'Tag','VIZICQ4_Nz') |
---|
853 |
|
---|
854 |
% slice coords |
---|
855 |
uicontrol(sfig,'Style','text',... |
---|
856 |
'String','Integer Slice Locations',... |
---|
857 |
'ForeGroundColor','k',... |
---|
858 |
'FontWeight','bold',... |
---|
859 |
'Units','normalized',... |
---|
860 |
'Position',[.25 .80 .2 .075]) |
---|
861 |
|
---|
862 |
uicontrol(sfig,'Style','text',... |
---|
863 |
'String','Ix:',... |
---|
864 |
'ForeGroundColor','k',... |
---|
865 |
'Units','normalized',... |
---|
866 |
'Position',[.25 .65 .04 .075]) |
---|
867 |
uicontrol(sfig,'Style','edit',... |
---|
868 |
'String','25',... |
---|
869 |
'ForeGroundColor','k',... |
---|
870 |
'BackgroundColor','w',... |
---|
871 |
'Units','normalized',... |
---|
872 |
'Position',[.29 .65 .1 .08],... |
---|
873 |
'BackgroundColor','w',... |
---|
874 |
'Tag','VIZICQ4_Ix') |
---|
875 |
uicontrol(sfig,'Style','push',... |
---|
876 |
'String','GO!!',... |
---|
877 |
'ForeGroundColor','r',... |
---|
878 |
'Units','normalized',... |
---|
879 |
'Position',[.4 .65 .075 .08],... |
---|
880 |
'Tag','VIZICQ4_Ix_GO',... |
---|
881 |
'CallBack','vizicq4_volume(''MakeVolume'',''X'')') |
---|
882 |
|
---|
883 |
uicontrol(sfig,'Style','text',... |
---|
884 |
'String','Iy:',... |
---|
885 |
'ForeGroundColor','k',... |
---|
886 |
'Units','normalized',... |
---|
887 |
'Position',[.25 .55 .04 .075]) |
---|
888 |
uicontrol(sfig,'Style','edit',... |
---|
889 |
'String','25',... |
---|
890 |
'ForeGroundColor','k',... |
---|
891 |
'Units','normalized',... |
---|
892 |
'Position',[.29 .55 .10 .08],... |
---|
893 |
'BackgroundColor','w',... |
---|
894 |
'Tag','VIZICQ4_Iy') |
---|
895 |
uicontrol(sfig,'Style','push',... |
---|
896 |
'String','GO!!',... |
---|
897 |
'ForeGroundColor','r',... |
---|
898 |
'Units','normalized',... |
---|
899 |
'Position',[.4 .55 .075 .08],... |
---|
900 |
'Tag','VIZICQ4_Iy_GO',... |
---|
901 |
'CallBack','vizicq4_volume(''MakeVolume'',''Y'')') |
---|
902 |
uicontrol(sfig,'Style','text',... |
---|
903 |
'String','Iz:',... |
---|
904 |
'ForeGroundColor','k',... |
---|
905 |
'Units','normalized',... |
---|
906 |
'Position',[.25 .45 .04 .075]) |
---|
907 |
uicontrol(sfig,'Style','edit',... |
---|
908 |
'String','5',... |
---|
909 |
'ForeGroundColor','k',... |
---|
910 |
'BackgroundColor','w',... |
---|
911 |
'Units','normalized',... |
---|
912 |
'Position',[.29 .45 .10 .08],... |
---|
913 |
'Tag','VIZICQ4_Iz') |
---|
914 |
uicontrol(sfig,'Style','push',... |
---|
915 |
'String','GO!!',... |
---|
916 |
'ForeGroundColor','r',... |
---|
917 |
'Units','normalized',... |
---|
918 |
'Position',[.4 .45 .075 .08],... |
---|
919 |
'Tag','VIZICQ4_Iz_GO',... |
---|
920 |
'CallBack','vizicq4_volume(''MakeVolume'',''Z'')') |
---|
921 |
uicontrol(sfig,'Style','push',... |
---|
922 |
'String','GO ALL!!',... |
---|
923 |
'ForeGroundColor','r',... |
---|
924 |
'Units','normalized',... |
---|
925 |
'Position',[.4 .35 .075 .08],... |
---|
926 |
'Tag','VIZICQ4_ALL_GO',... |
---|
927 |
'CallBack','vizicq4_volume(''MakeVolume'',''ALL'')') |
---|
928 |
% PushButtons |
---|
929 |
uicontrol(sfig,'Style','push',... |
---|
930 |
'Units','normalized',... |
---|
931 |
'Position',[.22 .21 .15 .1],... |
---|
932 |
'Units','pixels',... |
---|
933 |
'String','Map Scalar',... |
---|
934 |
'ToolTipString','Map Scalar',... |
---|
935 |
'Enable','on',... |
---|
936 |
'CallBack','vizicq4_volume(''MapScalar'')',... |
---|
937 |
'Tag','VIZICQ4_Map_Scalar') |
---|
938 |
uicontrol(sfig,'Style','push',... |
---|
939 |
'Units','normalized',... |
---|
940 |
'Position',[.01 .21 .2 .1],... |
---|
941 |
'Units','pixels',... |
---|
942 |
'String','COMP. BASIS',... |
---|
943 |
'ToolTipString','Compute Interp Basis',... |
---|
944 |
'Enable','on',... |
---|
945 |
'CallBack','vizicq4_volume(''CompBasis'')',... |
---|
946 |
'Tag','VIZICQ4_Comp_Basis') |
---|
947 |
uicontrol(sfig,'Style','push',... |
---|
948 |
'Units','normalized',... |
---|
949 |
'Position',[.395 .21 .10 .1],... |
---|
950 |
'Units','pixels',... |
---|
951 |
'String','HELP',... |
---|
952 |
'ToolTipString','HELP on VOLUME',... |
---|
953 |
'Enable','off',... |
---|
954 |
'CallBack','',... |
---|
955 |
'Tag','') |
---|
956 |
|
---|
957 |
|
---|
958 |
|
---|
959 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
960 |
% Region Selection |
---|
961 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
962 |
uicontrol(sfig,'Style','frame',... |
---|
963 |
'Units','normalized',... |
---|
964 |
'Position',[.5 .2 .5 .8],... |
---|
965 |
'Units','pixels'); |
---|
966 |
uicontrol(sfig,'Style','text',... |
---|
967 |
'String','Select Region',... |
---|
968 |
'ForeGroundColor','k',... |
---|
969 |
'FontSize',fontsize+2,... |
---|
970 |
'FontWeight','bold',... |
---|
971 |
'Units','normalized',... |
---|
972 |
'Position',[.51 .90 .47 .07],... |
---|
973 |
'HorizontalAlignment','center',... |
---|
974 |
'Enable','on') |
---|
975 |
|
---|
976 |
uicontrol(sfig,'Style','push',... |
---|
977 |
'Units','normalized',... |
---|
978 |
'Position',[.52 .75 .15 .1],... |
---|
979 |
'Units','pixels',... |
---|
980 |
'String','Select Region',... |
---|
981 |
'ToolTipString','',... |
---|
982 |
'Enable','on',... |
---|
983 |
'Callback','vizicq4_volume(''SelRegion'')',... |
---|
984 |
'Tag','','Enable','on') |
---|
985 |
uicontrol(sfig,'Style','text',... |
---|
986 |
'String','X-Min:',... |
---|
987 |
'ForeGroundColor','k',... |
---|
988 |
'Units','normalized',... |
---|
989 |
'Position',[.51 .65 .1 .07],... |
---|
990 |
'HorizontalAlignment','center',... |
---|
991 |
'Enable','on') |
---|
992 |
uicontrol(sfig,'Style','edit',... |
---|
993 |
'String','<>',... |
---|
994 |
'ForeGroundColor','k',... |
---|
995 |
'Units','normalized',... |
---|
996 |
'Position',[.62 .65 .1 .07],... |
---|
997 |
'HorizontalAlignment','center',... |
---|
998 |
'Enable','off',... |
---|
999 |
'Tag','VIZICQ4_Region_Xmin') |
---|
1000 |
uicontrol(sfig,'Style','text',... |
---|
1001 |
'String','X-Max:',... |
---|
1002 |
'ForeGroundColor','k',... |
---|
1003 |
'Units','normalized',... |
---|
1004 |
'Position',[.51 .55 .1 .07],... |
---|
1005 |
'HorizontalAlignment','center') |
---|
1006 |
uicontrol(sfig,'Style','edit',... |
---|
1007 |
'String','<>',... |
---|
1008 |
'ForeGroundColor','k',... |
---|
1009 |
'Units','normalized',... |
---|
1010 |
'Position',[.62 .55 .1 .07],... |
---|
1011 |
'HorizontalAlignment','center',... |
---|
1012 |
'Enable','off',... |
---|
1013 |
'Tag','VIZICQ4_Region_Xmax') |
---|
1014 |
uicontrol(sfig,'Style','text',... |
---|
1015 |
'String','Y-Min:',... |
---|
1016 |
'ForeGroundColor','k',... |
---|
1017 |
'Units','normalized',... |
---|
1018 |
'Position',[.51 .45 .1 .07],... |
---|
1019 |
'HorizontalAlignment','center') |
---|
1020 |
uicontrol(sfig,'Style','edit',... |
---|
1021 |
'String','<>',... |
---|
1022 |
'ForeGroundColor','k',... |
---|
1023 |
'Units','normalized',... |
---|
1024 |
'Position',[.62 .45 .1 .07],... |
---|
1025 |
'HorizontalAlignment','center',... |
---|
1026 |
'Enable','off',... |
---|
1027 |
'Tag','VIZICQ4_Region_Ymin') |
---|
1028 |
uicontrol(sfig,'Style','text',... |
---|
1029 |
'String','Y-Max:',... |
---|
1030 |
'ForeGroundColor','k',... |
---|
1031 |
'Units','normalized',... |
---|
1032 |
'Position',[.51 .35 .1 .07],... |
---|
1033 |
'HorizontalAlignment','center',... |
---|
1034 |
'Enable','on') |
---|
1035 |
uicontrol(sfig,'Style','edit',... |
---|
1036 |
'String','<>',... |
---|
1037 |
'ForeGroundColor','k',... |
---|
1038 |
'Units','normalized',... |
---|
1039 |
'Position',[.62 .35 .1 .07],... |
---|
1040 |
'HorizontalAlignment','center',... |
---|
1041 |
'Enable','off',... |
---|
1042 |
'Tag','VIZICQ4_Region_Ymax') |
---|
1043 |
|
---|
1044 |
% Rotation activation button |
---|
1045 |
uicontrol(sfig,'Style','text',... |
---|
1046 |
'Interruptible','on',... |
---|
1047 |
'Units','normalized',... |
---|
1048 |
'Position',[.75 .75 .15 .07],... |
---|
1049 |
'String','Delta Theta:'); |
---|
1050 |
uicontrol(sfig,'Style','edit',... |
---|
1051 |
'Interruptible','on',... |
---|
1052 |
'Units','normalized',... |
---|
1053 |
'Position',[.90 .75 .05 .07],... |
---|
1054 |
'String','5',... |
---|
1055 |
'ToolTipString','Delta theta (deg)',... |
---|
1056 |
'Tag','VIZICQ4_DELTA_THETA',... |
---|
1057 |
'Enable','off'); |
---|
1058 |
uicontrol(sfig,'Style','push',... |
---|
1059 |
'Interruptible','on',... |
---|
1060 |
'Units','normalized',... |
---|
1061 |
'Position',[.75 .60 .1 .1],... |
---|
1062 |
'ToolTipString','Rotate CCW',... |
---|
1063 |
'Callback','vizicq4_guts(''RotateRegion'',''CCW'')',... |
---|
1064 |
'String','Rot CCW',... |
---|
1065 |
'Tag','VIZICQ4_ROTATE_CCW',... |
---|
1066 |
'Enable','off'); |
---|
1067 |
uicontrol(sfig,'Style','push',... |
---|
1068 |
'Interruptible','on',... |
---|
1069 |
'Units','normalized',... |
---|
1070 |
'Position',[.87 .60 .1 .1],... |
---|
1071 |
'ToolTipString','Rotate CW',... |
---|
1072 |
'Callback','vizicq4_guts(''RotateRegion'',''CW'')',... |
---|
1073 |
'String','Rot CW',... |
---|
1074 |
'Tag','VIZICQ4_ROTATE_CW',... |
---|
1075 |
'Enable','off'); |
---|
1076 |
|
---|
1077 |
% Frame at bottom of fig |
---|
1078 |
uicontrol(sfig,'Style','frame',... |
---|
1079 |
'Units','normalized',... |
---|
1080 |
'Position',[0 0 1 .2],... |
---|
1081 |
'Units','pixels'); |
---|
1082 |
|
---|
1083 |
uicontrol(sfig,'Style','push',... |
---|
1084 |
'Units','normalized',... |
---|
1085 |
'Position',[.9 .05 .09 .1],... |
---|
1086 |
'Units','pixels',... |
---|
1087 |
'String','Close',... |
---|
1088 |
'Callback','vizicq4_volume(''Close'')',... |
---|
1089 |
'ToolTipString','Close Volume Popup') |
---|
1090 |
uicontrol(sfig,'Style','push',... |
---|
1091 |
'Units','normalized',... |
---|
1092 |
'Position',[.8 .05 .09 .1],... |
---|
1093 |
'Units','pixels',... |
---|
1094 |
'String','Rotate On',... |
---|
1095 |
'Callback','vizicq4_volume(''Rotate_Toggle'')',... |
---|
1096 |
'ToolTipString','Activate 3-D Rotation',... |
---|
1097 |
'Tag','VIZICQ4_Rotation') |
---|
1098 |
|
---|
1099 |
uicontrol(sfig,'Style','push',... |
---|
1100 |
'Units','normalized',... |
---|
1101 |
'Position',[.7 .05 .09 .1],... |
---|
1102 |
'Units','pixels',... |
---|
1103 |
'String','Reset 2D',... |
---|
1104 |
'Callback','vizicq4_volume(''Reset_View'')',... |
---|
1105 |
'ToolTipString','Restore 2-D view') |
---|
1106 |
|
---|
1107 |
uicontrol(sfig,'Style','push',... |
---|
1108 |
'Units','normalized',... |
---|
1109 |
'Position',[.6 .05 .09 .1],... |
---|
1110 |
'Units','pixels',... |
---|
1111 |
'String','Colorbar',... |
---|
1112 |
'Callback','vizicq4_volume(''Colorbar'')',... |
---|
1113 |
'ToolTipString','Place Colorbar') |
---|
1114 |
|
---|
1115 |
uicontrol(sfig,'Style','push',... |
---|
1116 |
'Units','normalized',... |
---|
1117 |
'Position',[.5 .05 .09 .1],... |
---|
1118 |
'Units','pixels',... |
---|
1119 |
'String','Del 1 Vol',... |
---|
1120 |
'Callback','vizicq4_volume(''DelVolume'',''one'')',... |
---|
1121 |
'ToolTipString','Delete A Volume') |
---|
1122 |
uicontrol(sfig,'Style','push',... |
---|
1123 |
'Units','normalized',... |
---|
1124 |
'Position',[.4 .05 .09 .1],... |
---|
1125 |
'Units','pixels',... |
---|
1126 |
'String','DelAllVol',... |
---|
1127 |
'Callback','vizicq4_volume(''DelVolume'',''all'')',... |
---|
1128 |
'ToolTipString','Delete All Volumes') |
---|
1129 |
|
---|
1130 |
uicontrol(sfig,'Style','text',... |
---|
1131 |
'Units','normalized',... |
---|
1132 |
'Position',[.12 .075 .1 .1],... |
---|
1133 |
'Units','pixels',... |
---|
1134 |
'String','Shading:',... |
---|
1135 |
'HorizontalAlignment','left') |
---|
1136 |
|
---|
1137 |
uicontrol(sfig,'Style','radio',... |
---|
1138 |
'Units','normalized',... |
---|
1139 |
'Position',[.01 .02 .1 .1],... |
---|
1140 |
'Units','pixels',... |
---|
1141 |
'String','Interp',... |
---|
1142 |
'Callback','vizicq4_volume(''Shading'',''Interp'')',... |
---|
1143 |
'ToolTipString','Interpolated Shading',... |
---|
1144 |
'Tag','VIZICQ4_Volume_Shading_Interp') |
---|
1145 |
uicontrol(sfig,'Style','radio',... |
---|
1146 |
'Units','normalized',... |
---|
1147 |
'Position',[.11 .02 .1 .1],... |
---|
1148 |
'Units','pixels',... |
---|
1149 |
'String','Flat',... |
---|
1150 |
'Callback','vizicq4_volume(''Shading'',''Flat'')',... |
---|
1151 |
'ToolTipString','Flat Shading',... |
---|
1152 |
'Tag','VIZICQ4_Volume_Shading_Flat') |
---|
1153 |
uicontrol(sfig,'Style','radio',... |
---|
1154 |
'Units','normalized',... |
---|
1155 |
'Position',[.21 .02 .1 .1],... |
---|
1156 |
'Units','pixels',... |
---|
1157 |
'String','Faceted',... |
---|
1158 |
'Callback','vizicq4_volume(''Shading'',''Faceted'')',... |
---|
1159 |
'ToolTipString','Faceted Shading',... |
---|
1160 |
'Tag','VIZICQ4_Volume_Shading_Faceted') |
---|
1161 |
|
---|
1162 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1163 |
%%%%%%%%%%%%%%% make_icq4_info_popup %%%%%%%%%%%%%%%%%%%%%% |
---|
1164 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
1165 |
function make_icq4_info_popup |
---|
1166 |
% Figure defaults |
---|
1167 |
fontsize=get(0,'DefaultTextFontSize'); |
---|
1168 |
set(0,'DefaultTextFontWeight','bold') |
---|
1169 |
%%%% Build Slicer Popup |
---|
1170 |
sfig=figure('Position',[100 100 350 600],... |
---|
1171 |
'IntegerHandle','off',... |
---|
1172 |
'NumberTitle','off',... |
---|
1173 |
'MenuBar','none',... |
---|
1174 |
'Name','VIZICQ4 1.2 Icq4 Info',... |
---|
1175 |
'Resize','on',... |
---|
1176 |
'Units','pixels',... |
---|
1177 |
'Tag','VIZICQ4_Icq4_Info_Fig',... |
---|
1178 |
'CloseRequestFcn','closereq',... |
---|
1179 |
'Visible','off'); |
---|
1180 |
uicontrol(sfig,'Style','frame',... |
---|
1181 |
'Units','normalized',... |
---|
1182 |
'Position',[.01 .005 .98 .985],... |
---|
1183 |
'BackgroundColor',[1 1 1]*.7); |
---|
1184 |
uicontrol(sfig,'Style','text',... |
---|
1185 |
'Units','normalized',... |
---|
1186 |
'Position',[.02 .94 .96 .04],... |
---|
1187 |
'BackgroundColor',[1 1 1]*.7,... |
---|
1188 |
'FontSize',fontsize,... |
---|
1189 |
'Units','pixels',... |
---|
1190 |
'String','Icq4 File Information'); |
---|
1191 |
|
---|
1192 |
varlist={'codename :' |
---|
1193 |
'casename :' |
---|
1194 |
'inqfilename :' |
---|
1195 |
'initcondname :' |
---|
1196 |
'nn :' |
---|
1197 |
'nnv :' |
---|
1198 |
'day :' |
---|
1199 |
'month :' |
---|
1200 |
'year :' |
---|
1201 |
'curr_seconds :' |
---|
1202 |
'ZMID :' |
---|
1203 |
'ZOLD :' |
---|
1204 |
'UZMID :' |
---|
1205 |
'VZMID :' |
---|
1206 |
'WZMID :' |
---|
1207 |
'Q2MID :' |
---|
1208 |
'Q2LMID :' |
---|
1209 |
'TMPMID :' |
---|
1210 |
'SALMID :'}; |
---|
1211 |
xs1=.02;xs2=.51;dx=.45; |
---|
1212 |
ystart=.85;dy=.04;dyy=.035; |
---|
1213 |
for i=1:length(varlist) |
---|
1214 |
y=ystart-(i-1)*dy; |
---|
1215 |
uicontrol(sfig,'Style','text',... |
---|
1216 |
'Units','normalized',... |
---|
1217 |
'Position',[xs1 y dx dyy],... |
---|
1218 |
'Units','pixels',... |
---|
1219 |
'String',varlist{i},... |
---|
1220 |
'HorizontalAlignment','right'); |
---|
1221 |
tag=['VIZICQ4_Icq4_Info_Line' int2str(i)]; |
---|
1222 |
string=varlist{i}; |
---|
1223 |
string=['<' string(1:length(string)-2) '>']; |
---|
1224 |
uicontrol(sfig,'Style','text',... |
---|
1225 |
'Units','normalized',... |
---|
1226 |
'Position',[xs2 y dx dyy],... |
---|
1227 |
'BackgroundColor','w',... |
---|
1228 |
'Tag',tag,... |
---|
1229 |
'String',string,... |
---|
1230 |
'ForeGroundColor','r',... |
---|
1231 |
'HorizontalAlignment','left'); |
---|
1232 |
end |
---|
1233 |
|
---|
1234 |
uicontrol(sfig,'Style','push',... |
---|
1235 |
'Units','normalized',... |
---|
1236 |
'Position',[.4 .05 .20 .05],... |
---|
1237 |
'Units','pixels',... |
---|
1238 |
'String','Close',... |
---|
1239 |
'Callback','vizicq4_guts(''Icq4_Info'')',... |
---|
1240 |
'ToolTipString','Close Slicer Popup') |
---|