please
could you give me some examples how to display Three slices through a volume of data.
i have done it but having some trouble in 3D visualization in matlab (using GPRMAX3D)... this is my code, but display the 3D image is incorrect.
this is my code:
-----------------------------------------------------------------------------------------
filename = 'ex3';
geo = '.geo';
sca = '.sca';
geofile = [filename geo];
scafile = [filename sca];
%% Apelle GPR simulation
% *** Select output/results directory
% directory_out = 'C:\GPRModels\Outputs';
% *** Select exe and input directories
% dos 'C:\GprMax\Bin\GPRMax3D C:\GprModels\Inputs\ex4.in'
[mesh,ID,header,media] = gprmax3g(geofile);
[chem,titre,ext]=fileparts(geofile);
modeltitle = header.title;
dx = header.dx; % cell size in x direction - horizontal for GprMax dy = header.dy; % cell size in y direction - vertical for GprMax
nx = header.nx;
dy = header.dy;
ny = header.ny;
x = nx*dx;
y = ny*dy;
% Scan data
[Header,Fields]=gprmax(scafile);
modeltitle = Header.title;
Nsteps = Header.NSteps; % no. of scans in the file
iterations = Header.iterations; % no. of iterations (in the given time window)
dt = Header.dt; % time for each iteration
timew = Header.removed; % time window (s)
ex = reshape(Fields.ex, iterations, Nsteps);
ey = reshape(Fields.ey, iterations, Nsteps);
ez = reshape(Fields.ez, iterations, Nsteps); % reshape scan data into matrix
%% L'affichage de la géométrie de l'image et C-scan
% géométrie
cla
set(gcf,'InvertHardcopy','off')
mesh = squeeze(mesh);
p = patch(isosurface(mesh, 2), 'FaceColor', 'red', 'EdgeColor', 'none');
patch(isocaps(mesh, 2), 'FaceColor', 'interp', 'EdgeColor', 'none');
isonormals(mesh,p);
view(3)
daspect([1 1 .4])
cmap=colormap(gray(100));
camva(9)
box on
camlight(40, 40);
camlight(-20,-10);
lighting gouraud
% % C-Scan
radargram
,
= Fields.ez
,1,
;
t=1e9*Fields.t;
Y = Header.dx * Header.rx: Header.dx * Header.RxStepY :Header.dx * Header.rx + (Header.dx * Header.RxStepY * (Nsteps-1));
figure;
I=imagesc(Y,t,radargram);
colormap(gray(100))
title('Ez');
ylabel('Time (ns)');
xlabel('Scan length (m)')
figure;
[mesh.x,mesh.y,mesh.z] = meshgrid(Y);
xslice = [5,20]; yslice = 20; zslice = [0,10];
colormap(gray(100));
slice(mesh.x,xslice,yslice,zslice);
--------------------------------------------------------------------------
I want to display a 3D image as described in the manual : Three slices through a volume of data(page 53)
Pleas help me :-(
thanks...