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
|
Using Netgen to create extruded EIDORS ModelsEIDORS can use Netgen to create sophisticated 2D and 3D models/. For these examples, you need at least Netgen version 4.9.13. Please note that netgen takes much longer to calculate these complicated shapes (especially those with inner shapes) than some simpler examples.Here are some examples of the varity of models which can be generated using the function: ng_mk_extruded_model.
Extruded 3D shape with 9 rectuangular electrodesxy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; fmdl = ng_mk_extruded_model({2,xy,1},[9,0,1],[0.05,0.4]); Extruded 3D shape with mesh refinement and 5 large circular electrodesxy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; fmdl = ng_mk_extruded_model({2,xy,1,0.1},[5,0,1,2],[0.10]); Extruded 3D shape mesh with boundary interpolationxy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; fmdl = ng_mk_extruded_model({1,xy,[4,50]},[8,0,0.3,0.6],[0.08]); 2D shape mesh boundary interpolationHere, we use 47 interpolation points, because Netgen fails with 50. Just one of its paculiarites. Read more in the FAQ.xy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; fmdl = ng_mk_extruded_model({0,xy,[4,47]},[16,1],[0.1]); 2D shape with object and specific electrode positionsxy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; 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.05;'}; elec_pos = [0, 0; 30,0;60,0;90,0]; fmdl = ng_mk_extruded_model({0,xy,[4,49]},elec_pos,[0.1],extra); img = mk_image(fmdl,1); img.elem_data( fmdl.mat_idx{2} ) = 1.1; 3D shape with two objects and no electrodesxy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; extra={'twoball','solid twoball = sphere(0.2,0.2,.7;0.2) or sphere(-0.2,-0.2,.4;0.3);'}; fmdl = ng_mk_extruded_model({1,xy,[4,20]},[0,0],[0.05],extra); img = mk_image(fmdl,1); img.elem_data( fmdl.mat_idx{2} ) = 1.1; 3D shape with custom electrodesxy= [ -0.89 -0.74 -0.21 0.31 0.79 0.96 0.67 0.05 -0.36 -0.97; 0.14 0.51 0.35 0.50 0.27 -0.23 -0.86 -0.69 -0.85 -0.46]'; elec_pos = [0, 0.1; 30,0.2; 60,0.3; 90,0.4;120,0.5]; extra={'cyl','solid cyl = cylinder(0.2,-0.2,0;0.2,-0.2,1;0.2) and orthobrick(-1,-1,0;1,1,1);'}; fmdl = ng_mk_extruded_model({1,xy,[4,47]},elec_pos,[0.05,0.2],extra); img = mk_image(fmdl,1); img.elem_data( fmdl.mat_idx{2} ) = 1.1; Thorax with two layers of electrodesThis example requires the coordinates from CT2.mat here.load CT2.mat; fmdl = ng_mk_extruded_model({2,trunk/100 ,[4,50]},[6,0,0.5,1.5],[0.1,0.2]); Thorax with lung with 16 circular electrodesThis example requires the coordinates from CT2.mat here.load CT2.mat; lung = flipud(lung(1:3:end,:)); fmdl = ng_mk_extruded_model({1,{trunk/100, lung/100} ,[4,50]},[16,0.5],[0.1]); img = mk_image(fmdl,1); img.elem_data( fmdl.mat_idx{2} ) = 0.9; fmdl= img; |
Last Modified: $Date: 2017-02-28 13:21:02 -0500 (Tue, 28 Feb 2017) $ by $Author: aadler $