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

 

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 1535 2008-07-26 15:36:27Z aadler $

% 3D Model
imdl_3d= mk_common_model('n3r2',16);
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 -r75 -dpng tutorial030a.png;


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 1535 2008-07-26 15:36:27Z aadler $

% 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,'y')

% 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,'y')

% 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,'y')

print -r75 -dpng tutorial030b.png;


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 1535 2008-07-26 15:36:27Z aadler $

% Define an image
sim_img= eidors_obj('image', 'stimulation image');
sim_img.elem_data= ones( size(zigzag_mdl.elems,1) ,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 -r75 -dpng tutorial030c.png;


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: 2008-07-26 11:36:27 -0400 (Sat, 26 Jul 2008) $ by $Author: aadler $