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 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 Modelload 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; % Build a fwd model [stim,meas_sel] = mk_stim_patterns(16,1,[0,1],[0,1],{'no_meas_current'}, 1); fmdl = 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 = mdl_normalize(fmdl, 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( fmdl.mat_idx{2} ) = 0.25; show_fem(img); 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); img_ctrl.calc_colours.ref_level=0; show_fem(img_ctrl); axis off opt.resolution = 60; print_convert('pig_control.png',opt); img_inj = inv_solve(imdl, ex_inj, in_inj); img_inj.calc_colours.ref_level=0; show_fem(img_inj); axis off print_convert('pig_injury.png',opt); Figure: Left Ventilation image of control animal Right Ventilation image of animal after left lung injury |
Last Modified: $Date: 2017-04-04 14:21:51 -0400 (Tue, 04 Apr 2017) $ by $Author: aadler $