|
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 Download Contrib Data GREIT Browse Docs Browse SVN News Mailing list (archive) FAQ Developer
|
GREIT Reconstruction for a pig thorax geometryReconstruction of experimental data onto a pig thorax shape. Data used are from the study:
Forward Model
%% This first bit comes largely from the other tutorial
load CT3
trunk = trunk*.01;
lung = lung*.01; lung = flipud(lung(1:3:end,:)); % need counterclockwise shapes
elec_pos = elec_pos*.01;
% Calculate electrode angles
pp= fourier_fit(trunk); sp = linspace(0,1,51);sp(end)=[]; centroid = mean(fourier_fit(pp, sp));
elec_pos = elec_pos - ones(size(elec_pos,1),1) * centroid;
electh= atan2(elec_pos(:,2),elec_pos(:,1))*180/pi;
% Buiold a fwd model
[stim,meas_sel] = mk_stim_patterns(16,1,[0,1],[0,1],{'no_meas_current'}, 1);
[fmdl, mat_idx] = ng_mk_extruded_model({2,{trunk,lung} ,[4,50],.1},[electh,1+0*electh],[0.1]);
fmdl.name = 'trunk_and_lungs';
fmdl.stimulation = stim;
fmdl.meas_select = meas_sel;
fmdl.normalize_measurements = 1;
fmdl.electrode(2:16) = fmdl.electrode(16:-1:2); %flip electrodes to match
fmdl.nodes = fmdl.nodes*diag([-1,-1,1]);
img = mk_image(fmdl,1);
img.elem_data( mat_idx{2} ) = 0.25;
show_fem(img);
print -dpng -r75 pig_ex_fmdl.png
%print_convert pig_ex_fmdl.png '-density 75';
Figure: Forward model used for training GREIT using lung shaped contrasting regions Training GREIT%% Train GREIT opt.imgsz = [64 64]; % 64-by-64 image (yes, we can do that now) opt.distr = 3; % non-random, uniform opt.Nsim = 500; % 500 hundred targets to train on, seems enough opt.target_size = 0.01; %small targets opt.target_offset = 0; opt.noise_figure = 0.5; % this is key! imdl=mk_GREIT_model(img, 0.25, [], opt); Reconstruct Images
%% Read in the data
ctrl = eidors_readdata('2-control.RAW');
inj = eidors_readdata('2-injury.RAW');
ex_ctrl = ctrl(:,101);
in_ctrl = ctrl(:,103);
ex_inj = inj(:,99);
in_inj = inj(:,101);
%% Reconstruct
img_ctrl = inv_solve(imdl, ex_ctrl, in_ctrl);
show_fem(img_ctrl); axis off
print_convert pig_control.png '-density 60'
img_inj = inv_solve(imdl, ex_inj, in_inj);
show_fem(img_inj); axis off
print_convert pig_injury.png '-density 60'
Figure: Left Ventilation image of control animal Right Ventilation image of animal after left lung injury |
Last Modified: $Date: 2011-07-15 06:48:46 -0400 (Fri, 15 Jul 2011) $ by $Author: aadler $