Eidors-logo    

EIDORS: Electrical Impedance Tomography and Diffuse Optical Tomography Reconstruction Software

EIDORS (mirror)
Main
Documentation
Tutorials
− Image Reconst
− Data Structures
− Applications
− FEM Modelling
− GREIT
− Old tutorials
Workshop
Install
Contrib Data
GREIT
Browse Docs
Browse SVN

News
Mailing list
(archive)
FAQ
Developer
                       

 

Hosted by
SourceForge.net Logo

 

Modifying EIDORS data structures and models

EIDORS Stimulation patterns

Rather than creating new FEM models from scratch, it is normally easier to take a model that almost works, and then modify it.

In this tutorial, we explore using different 16 electrode configurations for 3D EIT. Assume that we have a 16 electrode adjacent stimulation, adjacent measurment system. Of course, the electrodes can be placed anywhere, and the corresponding images reconstructed.

% Explore Stimulation Patterns
% $Id: tutorial030a.m 4071 2013-05-26 21:37:48Z bgrychtol $

% 3D Model
imdl_3d= mk_common_model('n3r2',[16. 2]);
fmdl= imdl_3d.fwd_model;

% Show opposite pattern
fmdl.stimulation=mk_stim_patterns(16,2, '{op}','{op}', ...
             {'meas_current','no_redundant'} );
subplot(121)
display_meas(fmdl,'ya')

% Show adjacent pattern
fmdl.stimulation=mk_stim_patterns(16,2, '{ad}','{ad}', ...
             {'no_meas_current','do_redundant'} );
subplot(122)
display_meas(fmdl,'ya')

print_convert tutorial030a.png '-density 75';


Figure: Two layer 16 ring FEM models with different stimulation patterns.

Using 16 electrodes from a 32 electrode model

% Explore Stimulation Patterns
% $Id: tutorial030b.m 4086 2013-05-27 15:05:28Z bgrychtol $

% We have a 16 electrode EIT machine with adjacent drive
adjdrv= mk_stim_patterns(16,1, '{ad}','{ad}', ...
             {'no_meas_current','do_redundant'} );

% Arrange 16 electrodes in a zigzag
zigzag_mdl= fmdl; zigzag_mdl.stimulation= adjdrv;
zigzag_pat= [ 1:2:15;
             18:2:32]; 
zigzag_mdl.electrode= fmdl.electrode( zigzag_pat(:) );

subplot(131); display_meas(zigzag_mdl,'ya')

% Arrange 16 electrodes as planar
planar_mdl= fmdl; planar_mdl.stimulation= adjdrv;
planar_pat= [ 1:2:15;
             17:2:32]'; 
planar_mdl.electrode= fmdl.electrode( planar_pat(:) );

subplot(132); display_meas(planar_mdl,'ya')

% Arrange 16 electrodes as planar-opposite
pl_ops_mdl= fmdl; pl_ops_mdl.stimulation= adjdrv;
pl_ops_pat= [ rem( (0:7)*3, 8)*2+1;
              rem( (0:7)*3, 8)*2+17]'; 
pl_ops_mdl.electrode= fmdl.electrode( pl_ops_pat(:) );

subplot(133); display_meas(pl_ops_mdl,'ya')

print_convert tutorial030b.png '-density 75';


Figure: Three different ways to place 16 electrodes on a 32 electrode phantom. Left: Zigzag, Middle: Planar, Right: Planar-opposite,

Reconstruct images with different electrode placements

% Explore Stimulation Patterns - and reconstruct images
% $Id: tutorial030c.m 4076 2013-05-27 09:17:05Z bgrychtol $

% Define an image
sim_img= mk_image(zigzag_mdl, 1);

% Simulate homogeneous measurements
sim_img.fwd_model= zigzag_mdl;
zigzag_data_h= fwd_solve( sim_img );

sim_img.fwd_model= planar_mdl;
planar_data_h= fwd_solve( sim_img );

sim_img.fwd_model= pl_ops_mdl;
pl_ops_data_h= fwd_solve( sim_img );

% Create targets in image
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;

% Simulate inhomogeneous measurements
sim_img.fwd_model= zigzag_mdl;
zigzag_data_i= fwd_solve( sim_img );

sim_img.fwd_model= planar_mdl;
planar_data_i= fwd_solve( sim_img );

sim_img.fwd_model= pl_ops_mdl;
pl_ops_data_i= fwd_solve( sim_img );


%Add 25dB SNR noise to data
noise= std(zigzag_data_i.meas - zigzag_data_h.meas) ...
       / 10^(25/20) * randn(size(zigzag_data_h.meas));

zigzag_data_i.meas= zigzag_data_i.meas + noise;
planar_data_i.meas= planar_data_i.meas + noise;
pl_ops_data_i.meas= pl_ops_data_i.meas + noise;


%Reconstruct and show images
slices= [inf,inf,2.0,1,1; inf,inf,1.0,1,2];

subplot(131)
imdl_3d.fwd_model= zigzag_mdl;
img= inv_solve(imdl_3d, zigzag_data_h, zigzag_data_i);
show_slices(img, slices);

subplot(132)
imdl_3d.fwd_model= planar_mdl;
img= inv_solve(imdl_3d, planar_data_h, planar_data_i);
show_slices(img, slices);

subplot(133)
imdl_3d.fwd_model= pl_ops_mdl;
img= inv_solve(imdl_3d, pl_ops_data_h, pl_ops_data_i);
show_slices(img, slices);

print_convert tutorial030c.png '-density 75';


Figure: Reconstructions with three different ways to place 16 electrodes on a 32 electrode phantom. Left: Zigzag, Middle: Planar, Right: Planar-opposite. As expected, image quality is worse (at 25dB SNR) than for the 32 electrode case a 20dB SNR.

Last Modified: $Date: 2017-02-28 13:12:08 -0500 (Tue, 28 Feb 2017) $ by $Author: aadler $