forked from ndtatbristol/brain1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_3d_plot_panel.m
65 lines (56 loc) · 1.61 KB
/
test_3d_plot_panel.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
fn_clear;
load('Instruments\Emulator data\3MHz 128el 2D array aluminium HMC.mat');
addpath('.\Imaging');
addpath('.\gpu stuff');
options.x_size = 30e-3;
options.y_size = 30e-3;
options.z_size = 50e-3;
options.x_offset = 0;
options.y_offset = 0;
options.z_offset = 5e03;
options.pixel_size = 1e-3;
options.angle_limit_on = 0;
options.interpolation_method = 'nearest';
options.centre_freq = 3e6;
options.frac_half_bandwidth = 1;
options.filter_on = 1;
data = fn_basic_plusgpu_wrapper(exp_data, options, 'recalc_and_process');
f = figure('MenuBar', 'none', 'ToolBar', 'None', 'Name', 'Test NDT 3D display panel');
panel_rel_pos = [0, 0, 1, 1];
panel_colour = get(gcf, 'Color');
h_panel = uipanel('BorderType','none',...
'BackgroundColor', panel_colour,...
'Units', 'normalized',...
'Position', panel_rel_pos,...
'Parent', f);
h_toolbar = uitoolbar(f);
%turn the panel into a plot panel
[h_fn_update_data, h_fn_get_options, h_fn_set_options] = gui_3d_plot_panel(h_panel, h_toolbar);
%add the data
% h_fn_update_data(data);
tmp = data.f;
% while 1
% data.f = tmp + (randn(size(data.f)) + i * randn(size(data.f))) * 0.1;
h_fn_update_data(data);
% end
% %test some 3D visualisation ideas
% fn_clear;
% x = linspace(-1,1,50);
% [X,Y,Z] = meshgrid(x,x,x);
%
% R = sqrt(X .^ 2 - Y .^ 2 + Z .^ 2);
%
% fv = isosurface(X, Y, Z, R, 0.5, 'NoShare');
% % fv2 = isocaps(X, Y, Z, R, 0.5, 'NoShare', 'below');
%
% figure;
% subplot(2,2,1);
% patch(fv, 'FaceColor' ,'r', 'EdgeColor','none');
% % hold on;
% % patch(fv2, 'FaceColor','interp', 'EdgeColor','none');
% view(3);
% axis equal;
% camlight
% lighting gouraud
% alpha(0.1);
%