0001 function img = mk_thorax_model_grychtol2016a(stimpat)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 citeme(mfilename);
0021
0022 if nargin<1 || isempty(stimpat)
0023 stimpat = '1x32_ring';
0024 end
0025
0026 fname = [get_cache_path filesep 'adult_male_grychtol2016a.mat'];
0027 if exist(fname,'file')
0028 eidors_msg('@@ Using stored model.', 3);
0029 load(fname, 'img');
0030 else
0031 img = build_image;
0032 save(fname, 'img');
0033 end
0034 img.name = img.fwd_model.name;
0035 img.fwd_model.name = ...
0036 sprintf(['Thorax model from Grychtol, Müller and Adler (2016) '...
0037 '- %s electrode config'],stimpat);
0038 img = mdl_normalize(img, 'default');
0039 img = set_predef_stim(img, stimpat);
0040
0041 end
0042
0043 function img = build_image
0044 eth16 = 360*cumsum([0.2 0.4*ones(1,7) 0.5 0.4*ones(1,7)])/6.5 - 90; eth16 = eth16';
0045 eth32 = 360*cumsum([0.1 0.2*ones(1,15) 0.25 0.2*ones(1,15)])/6.45 - 90; eth32 = eth32';
0046 ep = eth16; ep(:,2) = 150;
0047 ep(17:48,1) = eth32; ep(17:48,2) = 175;
0048 ep(49:64,1) = eth16; ep(49:64,2) = 200;
0049 mdl = mk_thorax_model('male',ep,[5 0 .5],10);
0050 mdl.name = sprintf(['Thorax mesh from Grychtol, Müller and Adler (2016)']);
0051
0052
0053 opt = organ_options;
0054 img = mk_lung_image(mdl,opt);
0055 img.fwd_model = mdl_normalize(img.fwd_model, 'default');
0056
0057 end
0058
0059 function opt = organ_options
0060 opt.bkgnd_val = 1 ;
0061 opt.lung_val = .2;
0062 opt.heart_val = 1.5;
0063 opt.left_lung_center = [ 75 25 100];
0064 opt.right_lung_center = [-75 25 100];
0065 opt.left_lung_axes = [80 100 250];
0066 opt.right_lung_axes = [80 100 250];
0067 opt.heart_center = [20 -25 200];
0068 opt.heart_axes = [50 60 75];
0069 opt.diaphragm_center = [0 -50 0];
0070 opt.diaphragm_axes = [220 190 120];
0071 end
0072
0073 function out = get_cache_path
0074 global eidors_objects
0075 out = eidors_objects.model_cache;
0076 end