|
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
|
Internal electrodesIf you would like to use electrodes inside the FEM models, it needs a little work from EIDORS, because EIDORS uses the model boundary to look for electrode complete electrode model nodes. There are two ways to get around this.Electrode in a hole in the modelBy placing a hole in a model as below, the electrode s on the boundary, and thus no special treatment is required.
shape_str = [ ...
'solid hole = sphere(0.2,0.2,1.5;0.08);' ...
'solid cyl = cylinder (0,0,0; 0,0,1; 1) and not hole; \n', ...
'solid mainobj= orthobrick(-2,-2,0;2,2,2) and cyl -maxh=0.3;\n'];
th = linspace(0,2*pi,7)'; th(end) = []; cs = [cos(th), sin(th)];
elec_pos = [ cs, th/2/pi + 0.5, cs, 0*th];
elec_shape=[0.1]; elec_obj = 'cyl';
fmdl = ng_mk_gen_models(shape_str, elec_pos, elec_shape, elec_obj);
% Put an electrode in the hole
el_nodes = fmdl.nodes - ones(num_nodes(fmdl),1)*[0.2,0.2,1.5];
shim = 1e-4; % a little bit extra to catch elements
el_nodes = sum(el_nodes.^2,2) <= .08^2 + shim;
fmdl.electrode(end+1) = struct( ...
'nodes', find(el_nodes), ...
'z_contact',.01);
show_fem(fmdl); view(90,60);
print_convert internal_electrodes01a.jpg
Figure: Internal electrode using a hole in the model. Specifying the electrode boundary to EIDORS
extra={'ctr_el','solid ctr_el = sphere(0.2,0.2,0.5;0.08);'};
fmdl = ng_mk_cyl_models(1,[8,0.5],0.1,extra);
% Get electrode boundary
ctr_elec = fmdl.elems(fmdl.mat_idx{2},:);
bdy_elec = find_boundary(ctr_elec);
elec_nod = unique(bdy_elec(:));
fmdl.electrode(end+1) = struct( ...
'nodes', elec_nod, 'z_contact',.01);
% Make sure EIDORS knows you have internal electrodes
fmdl.system_mat_fields.CEM_boundary = bdy_elec;
show_fem(fmdl); view(90,60);
print_convert internal_electrodes02a.jpg
Figure: Internal electrode by specifying using CEM_boundary fmdl.stimulation = stim_meas_list([1,num_elecs(fmdl),1,2]); img= mk_image(fmdl,1); img.fwd_solve.get_all_meas = true; vh=fwd_solve(img); imgh = rmfield(img,'elem_data'); imgh.node_data = vh.volt; show_slices(imgh,1); %center slice print_convert internal_electrodes03a.jpg
Figure: Voltages in a slide of a model with internal electrode |
Last Modified: $Date: 2018-06-14 11:07:21 -0400 (Thu, 14 Jun 2018) $ by $Author: aadler $