|
EIDORS: Electrical Impedance Tomography and Diffuse Optical Tomography Reconstruction Software |
|
EIDORS
(mirror) Main Documentation Examples Tutorials − Image Reconst − Data Structures − Application Examples − FEM Modelling Download Contrib Data GREIT Browse SVN News FAQ Developer
|
GREIT evaluation: Make simulation data (3D)In order to test the performance of GREIT, we create a set of simulation data. Here we look at the performance for an object moving radially toward the side from the centre of the medium.Prepare simulation data: phantom dataCreate a simulation netgen model here:% Mk 3D Netgen Model $Id: simulation_3d_test00.m 1601 2008-07-30 11:46:30Z aadler $ electrodes_per_plane=16; number_of_planes= 1; tank_height= 30; refine_electrodes= 0; finelevel=' '; maxh= '-maxh=1.0'; % 124k elems fno_max=0; move_the_ball; save ng_tank fmdlCall the function simulate_3d_movement.m based on these results
% simulate radial movement $Id: simulation_3d_test01.m 1726 2008-12-02 11:43:20Z aadler $
use_3d_model = 1;
if exist('sim_radmove_homog.mat','file')
load sim_radmove_homog.mat vh vi xyzr_pt
else
params= [0.9,0.05,0.5,0.5]; %max_posn, targ_rad, z_0, z_t
stim_pat = mk_stim_patterns(16,1,'{ad}','{ad}', {'no_meas_current'}, 1);
if use_3d_model;
load ng_tank; fmdl.stimulation = stim_pat;
[vh,vi,xyzr_pt]= simulate_3d_movement(500, fmdl, params, @simulation_radmove);
xyzr_pt= xyzr_pt([2,1,3,4],:)/15; %Change: mdl geometry at 90 deg; radius is 15
else;
imdl = mk_common_model('f2d3c',16); fmdl= imdl.fwd_model;
fmdl.stimulation = stim_pat;
[vh,vi,xyzr_pt]= simulate_2d_movement(500, fmdl, params, @simulation_radmove);
xyzr_pt = [-1,0,0;0,1,0;0,0,0;0,0,1]*xyzr_pt;
end
save sim_radmove_homog vh vi xyzr_pt
end
This function calls the function
simulation_radmove.m:
% Radial Movement - $Id: simulation_radmove.m 1585 2008-07-28 11:18:36Z aadler $ function [xp,yp,zp]= simulation_radmove(f_frac, radius, z0,zt); rp= f_frac*radius; cv= 2*pi*f_frac * 73; xp= rp * cos(cv); yp= rp * sin(cv); if nargin==4; zp = mean([zt,z0]); else; zp= 0; endThe positions of the simulated objects may be seen here:
% Show simulated positions $Id: simulation_3d_test02.m 1601 2008-07-30 11:46:30Z aadler $
show_fem(fmdl)
crop_model(gca, inline('x-z<-15','x','y','z'))
view(-90,20)
hold on
[xs,ys,zs]=sphere(10); spclr= [0,.5,.5];
for i=1:1:size(xyzr_pt,2);
xp=15*xyzr_pt(1,i); yp=15*xyzr_pt(2,i); zp=15*xyzr_pt(3,i); rp=15*xyzr_pt(4,i);
hh=surf(rp*xs+xp, rp*ys+yp, rp*zs+zp);
set(hh,'EdgeColor',[0,.4,.4],'FaceColor',[0,.8,.8]);
hh=text(xp,yp,zp+1,num2str(i));
set(hh,'FontSize',7,'FontWeight','bold','HorizontalAlignment','center');
end
hold off
print -dpng -r100 simulation_3d_test02a.png
Figure: Position and size of simulated conductive targets in medium |
Last Modified: $Date: 2008-07-30 07:46:30 -0400 (Wed, 30 Jul 2008) $ by $Author: aadler $