0001
0002
0003
0004
0005 imdl= mk_common_model('b2c',16);
0006 s_img= eidors_obj('image','');
0007 s_img.fwd_model= imdl.fwd_model;
0008 s_img.elem_data= ones(size(s_img.fwd_model.elems,1),1);
0009 v_homg = fwd_solve(s_img);
0010 s_img.elem_data(1)= 1.1;
0011 v_targ = fwd_solve(s_img);
0012 imgr1= inv_solve(imdl,v_homg,v_targ);
0013 slice1= calc_slices(imgr1);
0014 subplot(121)
0015 show_fem(imgr1);
0016 disp('image should be red');
0017
0018
0019 imdl= mk_common_model('n3r2',[16 2]);
0020 s_img= eidors_obj('image','');
0021 s_img.fwd_model= imdl.fwd_model;
0022 s_img.elem_data= ones(size(s_img.fwd_model.elems,1),1);
0023 v_homg = fwd_solve(s_img);
0024 s_img.elem_data(1)= 1.1;
0025 v_targ = fwd_solve(s_img);
0026 imgr2= inv_solve(imdl,v_homg,v_targ);
0027 subplot(122)
0028 show_fem(imgr2);
0029 disp('image should be red');