No difference when generating image with show_slices for 3d using imdl.meas_icov = meas_icov_rm_elecs( imdl, 1);

3 views (last 30 days)
At the moment i am able to generate different images when using 2d by changing the value from 1 to other numbers (1-16 electrodes) imdl.meas_icov = meas_icov_rm_elecs( imdl, 1) as the code shown below
% Forward solvers $Id: forward_solvers01.m 3790 2013-04-04 15:41:27Z aadler $
% 2D Model
imdl= mk_common_model('d2d1c',19);
% Create an homogeneous image
img_1 = mk_image(imdl);
h1= subplot(221);
show_fem(img_1);
% Add a circular object at 0.2, 0.5
% Calculate element membership in object
img_2 = img_1;
select_fcn = inline('(x-0.5).^2+(y-0.4).^2<0.1^2','x','y','z');
img_2.elem_data = 1 + elem_select(img_2.fwd_model, select_fcn);
h2= subplot(222);
show_fem(img_2);
img_2.calc_colours.cb_shrink_move = [.3,.8,-0.02];
common_colourbar([h1,h2],img_2);
imdl.meas_icov = meas_icov_rm_elecs( imdl, 1);
img = mk_image(img_1,1);
vh = fwd_solve(img);
vi = fwd_solve(img_2);
ring = inv_solve(imdl, vh, vi);
show_fem(ring)
But when using 3d GREIT, all the images are the same. I know there might be a different when using 2d and 3d. At the moment i am still unsure.
% $Id: mk_GREIT_matrix01.m 3354 2012-07-01 21:42:05Z bgrychtol $
n_elecs = 16;
fmdl = ng_mk_cyl_models([2 2 0.2] ,[n_elecs,1],[0.1]);
fmdl.stimulation = mk_stim_patterns(n_elecs,1,[0,1],[0,1],{'no_meas_current'}, 1);
fmdl = mdl_normalize(fmdl, 0);
img = mk_image(fmdl,1); % Homogeneous background
show_fem(fmdl); view(0,70);
print_convert mk_GREIT_matrix01a.png '-density 60'
% $Id: mk_GREIT_matrix02.m 2473 2011-03-02 20:32:23Z aadler $
opt.imgsz = [32 32];
opt.distr = 3; % non-random, uniform
opt.Nsim = 1000;
opt.target_size = 0.05; % Target size (frac of medium)
opt.noise_figure = 0.5; % Recommended NF=0.5;
imdl = mk_GREIT_model(img, 0.25, [], opt);
imdl.meas_icov = meas_icov_rm_elecs( imdl, [1,2,3]);
% $Id: mk_GREIT_matrix03.m 2474 2011-03-02 20:38:51Z aadler $
img = mk_image(fmdl,1);
vh = fwd_solve(img);
select_fcn = inline('(x-1).^2+(y-1).^2+(z-1).^2<.03','x','y','z');
img.elem_data = 1 + 0.1*elem_select(img.fwd_model, select_fcn);
vi = fwd_solve(img);
show_fem(img); view(0,70);
print_convert mk_GREIT_matrix03a.png '-density 60'
ring = inv_solve(imdl, vh, vi);
show_fem(ring)

Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!