|
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 (2D)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: create phantom model in 2DPrepare Model
% create model $Id: simulate_2d_test01.m 1585 2008-07-28 11:18:36Z aadler $
% Model parameters
n_elec= 16;
n_nodes= 2000;
% Create electrodes
refine_level=4; %electrode refinement level
elec_width= .1;
z_contact = 0.01;
% elect positions
th=linspace(0,2*pi,n_elec(1)+1)';th(end)=[];
elec_posn= [sin(th),cos(th)];
[elec_nodes, refine_nodes] = dm_mk_elec_nodes( elec_posn, elec_width, refine_level);
% Define circular medium
fd=inline('sum(p.^2,2)-1','p');
bbox = [-1,-1;1,1];
smdl= dm_mk_fwd_model( fd, [], n_nodes, bbox, elec_nodes, refine_nodes, z_contact);
Calculate Homogeneous simulations
% simulate homogeneous $Id: simulate_2d_test02.m 1585 2008-07-28 11:18:36Z aadler $
% stimulation pattern: adjacent
stim_pat= mk_stim_patterns(n_elec,1,'{ad}','{ad}',{},1);
smdl.stimulation= stim_pat;
himg= eidors_obj('image','','fwd_model',smdl, 'elem_data',ones(size(smdl.elems,1),1) );
vh= fwd_solve(himg); vh= vh.meas;
Prepare simulation data: create phantom model in 2DThe positions of the simulated objects may be seen here:
% moving target $Id: simulate_2d_test03.m 1585 2008-07-28 11:18:36Z aadler $
% Create a moving object within the model
trg_rad= 0.05; trs= trg_rad*sin(th); trc= trg_rad*cos(th);
radius= 0.9;
n_sims= 2 ;
contrast= 0.1;
vi=[];
for i= 1:n_sims;
f_frac = (i-1)/(n_sims-1);
cv= 2*pi*f_frac * 73;
trg_ctr= f_frac*radius*[cos(cv),sin(cv)];
trg_refine_nodes= [refine_nodes; [ trs+trg_ctr(1), trc+trg_ctr(2) ]];
tmdl= dm_mk_fwd_model( fd, [], n_nodes, bbox, elec_nodes, trg_refine_nodes, z_contact);
tmdl.stimulation = stim_pat;
% find elements in size target
mdl_pts = interp_mesh( tmdl );
ctr_pts = mdl_pts - ones(size(mdl_pts,1),1)*trg_ctr;
in_trg =(sum(ctr_pts.^2,2) < trg_rad^2);
% Create target image object
timg= eidors_obj('image','','fwd_model',tmdl, 'elem_data',1 + in_trg*contrast);
vi_t= fwd_solve(timg);
vi = [vi, vi_t.meas];
if i==1; show_fem(timg); print -dpng -r60 simulate_2d_test03a.png
elseif i==150; show_fem(timg); print -dpng -r60 simulate_2d_test03b.png
end
end
Figure: Position and size of conductive targets in medium |
Last Modified: $Date: 2008-07-28 07:18:36 -0400 (Mon, 28 Jul 2008) $ by $Author: aadler $