mk_thorax_model_grychtol2016a

PURPOSE ^

Builds the male thorax models from Grychtol, Müller and Adler (2016)

SYNOPSIS ^

function img = mk_thorax_model_grychtol2016a(stimpat)

DESCRIPTION ^

 Builds the male thorax models from Grychtol, Müller and Adler (2016)
 Accepts a string parameter:
    '2x16_planar'   - 2 rings of 16 electrodes, planar stimulation
    '2x16_odd-even' - 2 rings, each stimulation is cross-plane 
    '2x16_square'   - 2 rings, every second stimulation is cross-plane
    '2x16_adjacent' - like square, but with adjacent stimulation
    '1x32_ring'     - single ring of 32 electrodes

 CITATION_REQUEST:
 AUTHOR: Bartlomiej Grychtol, Beat Müller and Andy Adler
 TITLE: 3D EIT image reconstruction with GREIT
 JOURNAL: Physiological Measurement
 VOL: 37
 YEAR: 2016

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function img = mk_thorax_model_grychtol2016a(stimpat)
0002 % Builds the male thorax models from Grychtol, Müller and Adler (2016)
0003 % Accepts a string parameter:
0004 %    '2x16_planar'   - 2 rings of 16 electrodes, planar stimulation
0005 %    '2x16_odd-even' - 2 rings, each stimulation is cross-plane
0006 %    '2x16_square'   - 2 rings, every second stimulation is cross-plane
0007 %    '2x16_adjacent' - like square, but with adjacent stimulation
0008 %    '1x32_ring'     - single ring of 32 electrodes
0009 %
0010 % CITATION_REQUEST:
0011 % AUTHOR: Bartlomiej Grychtol, Beat Müller and Andy Adler
0012 % TITLE: 3D EIT image reconstruction with GREIT
0013 % JOURNAL: Physiological Measurement
0014 % VOL: 37
0015 % YEAR: 2016
0016 
0017 % (C) 2016 Bartlomiej Grychtol. License: GPL version 2 or 3
0018 % $Id: mk_thorax_model_grychtol2016a.m 5424 2017-04-25 17:45:19Z aadler $
0019 
0020 citeme(mfilename);
0021 
0022 if nargin<1 || isempty(stimpat)
0023    stimpat = '1x32_ring';
0024 end
0025    
0026 
0027 eth16 = 360*cumsum([0.2 0.4*ones(1,7) 0.5 0.4*ones(1,7)])/6.5 - 90; eth16 = eth16';
0028 eth32 = 360*cumsum([0.1 0.2*ones(1,15) 0.25 0.2*ones(1,15)])/6.45 - 90; eth32 = eth32';
0029 ep = eth16; ep(:,2) = 150;
0030 ep(17:48,1) = eth32; ep(17:48,2) = 175;
0031 ep(49:64,1) = eth16; ep(49:64,2) = 200;
0032 mdl = mk_thorax_model('male',ep,[5 0 .5],10);
0033 mdl.name = sprintf(['Thorax mesh from Grychtol, Müller and Adler (2016) '... 
0034                      '- %s electrode config'],stimpat);
0035 
0036 emap = get_elec_map(stimpat);
0037 mdl.electrode = mdl.electrode(emap);
0038 mdl.stimulation = get_stim_pattern(stimpat);
0039 
0040 
0041 opt = organ_options;
0042 img = mk_lung_image(mdl,opt);
0043 img.fwd_model.normalize_measurements = false;
0044 
0045 img.name = sprintf(['Thorax model from Grychtol, Müller and Adler (2016) '... 
0046                      '- %s electrode config'],stimpat);
0047 
0048 end
0049 
0050 
0051 function  opt = organ_options
0052    opt.bkgnd_val = 1  ;
0053    opt.lung_val =  .2;
0054    opt.heart_val = 1.5;
0055    opt.left_lung_center =  [ 75 25 100];
0056    opt.right_lung_center = [-75 25 100];
0057    opt.left_lung_axes = [80 100 250];
0058    opt.right_lung_axes = [80 100 250];
0059    opt.heart_center = [20 -25 200];
0060    opt.heart_axes = [50 60 75];
0061    opt.diaphragm_center = [0 -50 0];
0062    opt.diaphragm_axes = [220 190 120];
0063 end
0064 
0065 function stim = get_stim_pattern(str)
0066    switch(str)
0067       case '2x16_planar'
0068          stim = mk_stim_patterns(32,1,[0 6],[0 6],{'no_meas_current','no_rotate_meas'},1);
0069       case {'2x16_odd-even', '2x16_square', '1x32_ring'}
0070          stim = mk_stim_patterns(32,1,[0 5],[0 5],{'no_meas_current','no_rotate_meas'},1);
0071       case '2x16_adjacent'
0072          stim = mk_stim_patterns(32,1,[0 1],[0 1],{'no_meas_current','no_rotate_meas'},1);  
0073       otherwise
0074          error('Stim pattern string not understood. Available strings are: \n%s', ...
0075             sprintf('%s\n', pattern_list));
0076    end
0077 end
0078 
0079 function ls = pattern_list
0080    ls = {
0081       '2x16_planar'
0082       '2x16_odd-even'
0083       '2x16_square'
0084       '2x16_adjacent'
0085       '1x32_ring'
0086       };
0087 end
0088 
0089 function map = get_elec_map(str)
0090 
0091    switch str
0092       case {'2x16_odd-even', '2x16_planar'}
0093          map = oddeven32;
0094       case {'2x16_square', '2x16_adjacent'}
0095          map = square32;
0096       case '1x32_ring'
0097          map = ring32;
0098       otherwise
0099          error('No such electrode map');
0100    end
0101 end
0102 
0103 function m = square32
0104    o = [48 1 -48 1];
0105    o = repmat(o,1,8);
0106    m = zeros(1,32);
0107    m(1) = 1;
0108    for i = 2:32
0109       m(i) = m(i-1) + o(i-1);
0110    end
0111 end
0112 
0113 
0114 function m = oddeven32
0115    odd = 49:64; % top layer
0116    even = 1:16; % bottom layer
0117    m = [odd; even];
0118    m = m(:)';
0119 end
0120 
0121 function m = ring32
0122    m = 17:48;
0123 end

Generated on Fri 30-Dec-2022 19:44:54 by m2html © 2005