Eidors-logo    

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
                       

 

Hosted by SourceForge.net Logo

 

EIDORS fwd_models

Create a simple 3D fwd_model structure

EIDORS has functions to create common FEM models.
% Create fwd models
% $Id: tutorial010a.m 1535 2008-07-26 15:36:27Z aadler $

subplot(121);

% 2D Model
imdl_2d= mk_common_model('b2c',16);
show_fem(imdl_2d.fwd_model);

axis square
subplot(122);

% 3D Model
imdl_3d= mk_common_model('n3r2',16);
show_fem(imdl_3d.fwd_model);

axis square; view(-35,14);
%print -r75 -dpng tutorial010a.png;


Figure: output image showing 2D and 3D EIT finite element models. Electrodes are shown in green. Electrode #1 is light green.

Create a simple 3D fwd_model structure

Based on these FEM models, we can simulate data. This code simulates difference data for a pattern with two inhomogeneities.
% Simulate EIT data
% $Id: tutorial010b.m 1535 2008-07-26 15:36:27Z aadler $

sim_img= eidors_obj('image', 'stimulation image');
sim_img.fwd_model= imdl_3d.fwd_model;

% set homogeneous conductivity and simulate
sim_img.elem_data= ones( size(sim_img.fwd_model.elems,1) ,1);
homg_data=fwd_solve( sim_img );

% set inhomogeneous conductivity and simulate
sim_img.elem_data([390,391,393,396,402,478,479,480,484,486, ...
                   664,665,666,667,668,670,671,672,676,677, ...
                   678,755,760,761])= 1.15;
sim_img.elem_data([318,319,321,324,330,439,440,441,445,447, ...
                   592,593,594,595,596,598,599,600,604,605, ...
                   606,716,721,722])= 0.8;
inh_data=fwd_solve( sim_img );

clf;subplot(211);

xax= 1:length(homg_data.meas);
hh= plotyy(xax,[homg_data.meas, inh_data.meas], ...
           xax, homg_data.meas- inh_data.meas );

set(hh,'Xlim',[1,max(xax)]);
print -r75 -dpng tutorial010b.png


Figure: Simulated voltages from 3D EIT mesh. Right axis (left) shows the difference signal due to an inhomogeneity.

Reconstruct images

Using these difference data sets, an image may be reconstructed.
% Reconstruct images
% $Id: tutorial010c.m 1535 2008-07-26 15:36:27Z aadler $

subplot(131)
show_fem(sim_img);

%Add 20dB SNR noise to data
noise_level= std(inh_data.meas - homg_data.meas)/10^(20/20);
inh_data.meas = inh_data.meas + noise_level* ...
                randn(size(inh_data.meas));

%reconstruct 
rec_img= inv_solve(imdl_3d, homg_data, inh_data);

% Show reconstruction as a 3D mesh
subplot(132)
show_fem(rec_img)

subplot(133)
show_slices(rec_img,[inf,inf,2.0,1,1; ...
                     inf,inf,1.0,1,2]);

pp=get(gcf,'paperposition');
set(gcf,'paperposition',pp.*[1,1,1.4,1]);
print -r75 -dpng tutorial010c.png
set(gcf,'paperposition',pp.*[1,1,1,1]);


Figure: Left: Simulation image; Middle: Reconstructed image (as mesh); Right: Reconstructed image slices at z=1.0 and z=2.0.

Last Modified: $Date: 2008-07-26 11:36:27 -0400 (Sat, 26 Jul 2008) $ by $Author: aadler $