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

 

Using Netgen to create cylindrical EIDORS Models

EIDORS can use Netgen to create sophisticated 2D and 3D models (Older netgen software from JKU, will work for most of these examples, but we recommend you obtain the newest software).

Here are some examples of the varity of models which can be generated using the function: ng_mk_cyl_models.

Simple 3D cylinder. Radius = 1. No electrodes

fmdl= ng_mk_cyl_models(3,[0],[]); 
show_fem(fmdl);

Simple 2D cylinder. Radius = 2. Set minsize to refine

fmdl= ng_mk_cyl_models([0,2,.2],[0],[]); 
show_fem(fmdl);

3D cylinder. Radius = 1. 2 planes of 8 elecs with radius 0.1

fmdl= ng_mk_cyl_models(3,[8,1,2],[0.1]); 
show_fem(fmdl);

3D cylinder. Radius = 1. 6 circ elecs with elec refinement

fmdl= ng_mk_cyl_models(3,[7,1],[0.2,0,0.05]); 
show_fem(fmdl);

3D cylinder. Radius = 1. 7 rect elecs with no refinement

fmdl= ng_mk_cyl_models(3,[7,1],[0.2,0.3]); 
show_fem(fmdl);

2D cylinder. Radius = 1. 11 rect elecs with refinement

fmdl= ng_mk_cyl_models(0,[11],[0.2,0,0.05]); 
show_fem(fmdl);

2D cylinder. Radius = 1.5. Refined(0.1). 11 elecs with refinement

fmdl= ng_mk_cyl_models([0,1,0.1],[11],[0.2,0,0.02]); 
show_fem(fmdl);

2D cylinder. elecs at 0, 90 and 120 degrees

fmdl= ng_mk_cyl_models(0,[0;90;120],[0.2,0,0.03]); 
show_fem(fmdl);

2D cylinder. elecs at 0 (large,refined) and 90 (small) degrees

fmdl= ng_mk_cyl_models(0,[0;90],[0.4,0,0.01;0.1,0,0.1]); 
show_fem(fmdl);

% 3D cylinder. elecs at 0, 30, 60, 90 in planes

fmdl= ng_mk_cyl_models(3,[0,0.5;30,1;60,1.5;90,2.0],[0.2,0,0.1]); 
show_fem(fmdl);

3D cylinder. Various elecs at 0, 30, 60, 90 in planes

el_pos = [0,0.5;30,1;60,1.5;90,2.0];
el_sz  = [0.2,0,0.1;0.1,0,0.05;0.2,0.2,0.02;0.2,0.4,0.5];
fmdl= ng_mk_cyl_models(3,el_pos,el_sz); 
show_fem(fmdl);

Simple 3D cylinder with a ball

extra={'ball','solid ball = sphere(0.5,0.5,2;0.4);'}
fmdl= ng_mk_cyl_models(3,[0],[],extra); 
img= mk_image(fmdl,1); img.elem_data(fmdl.mat_idx{2}) = 2;

show_fem(img);

3D cylinder with 8 electrodes and cube

extra={'cube','solid cube = orthobrick(0.5,0.5,0.5;0,0,1.5);'}
fmdl= ng_mk_cyl_models(2,[8,0.5,1.5],[0.1],extra); 
img= mk_image(fmdl,1); img.elem_data(fmdl.mat_idx{2}) = 2;
show_fem(img);

3D cylinder with inner cylinder

extra={'ball','solid ball = cylinder(0.2,0.2,0;0.2,0.2,1;0.2) and orthobrick(-1,-1,1;1,1,2) -maxh=0.05;'}
fmdl= ng_mk_cyl_models(3,[0],[],extra); 

show_fem(fmdl);

2D cylinder with 8 electrodes and hole

extra={'ball','solid ball = sphere(0.2,0.2,0;0.2) -maxh=0.05;'}

fmdl= ng_mk_cyl_models(0,[8],[0.1,0,0.05],extra); 
show_fem(fmdl);

2D cylinder with 9 electrodes and inner cylinder

extra={'ball','solid ball = cylinder(0.2,0.2,0;0.2,0.2,1;0.2) and orthobrick(-1,-1,0;1,1,0.05) -maxh=0.03;'}

fmdl= ng_mk_cyl_models(0,[9],[0.2,0,0.05],extra); 
ctr = interp_mesh(fmdl); ctr=(ctr(:,1)-0.2).^2 + (ctr(:,2)-0.2).^2;
img= mk_image(fmdl, 1 + 0.1*(ctr<0.2^2));

show_fem(img);

2D cylinder with 16 electrodes and inner cylinder and box

extra={'ballandbox', ...
       ['solid ball = cylinder(0.2,0.2,0;0.2,0.2,1;0.2) and ' ...
                     'orthobrick(-1,-1,0;1,1,0.05) -maxh=0.1;' ...
        'solid box = orthobrick(-0.3,-0.3,0;-0.1,0.1,0.05) -maxh=0.1;' ...
        'solid ballandbox = ball or box;']};

fmdl= ng_mk_cyl_models(0,[16],[0.1,0,0.05],extra); 
img = mk_image( fmdl, 1);
img.elem_data( fmdl.mat_idx{2} ) = 1.1;
show_fem(img);

3D cylinder with two rows of electrodes and ellipse

    ob= 'orthobrick(-1,-1,0;1,1,1.5)';
    el= 'ellipsoid(0,0,1.5; 0,0,1.25; 0.8,0,0; 0,0.8,0)';
    extra={'obj',['solid obj = ',ob,' and ',el,';']}
    fmdl= ng_mk_cyl_models(1.5,[8,0.5,1.0],[0.1],extra); 
    img= mk_image(fmdl,1); img.elem_data(fmdl.mat_idx{2}) = 2;
show_fem(img);

Cylinder with toruses (tori??)

    t1= 'solid obj1 = torus( 0, 0,  .8; 1, 0, 0; .4 ; .1 );';
    t2= 'solid obj2 = torus( 0, 0, 1.2; 0, 1, 0; .4 ; .1 );';
    extra={'obj1','obj2',[t1,t2]};
    fmdl= ng_mk_cyl_models(2,[6,.5],[0.3,0.2],extra);
    img= mk_image(fmdl,1);
    img.elem_data(fmdl.mat_idx{2}) = 1.5;
    img.elem_data(fmdl.mat_idx{3}) = 0.5;
show_fem(img);

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