test_colour_direction

PURPOSE ^

Test colour mapping

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Test colour mapping
 $Id: test_colour_direction.m 1535 2008-07-26 15:36:27Z aadler $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Test colour mapping
0002 % $Id: test_colour_direction.m 1535 2008-07-26 15:36:27Z aadler $
0003 
0004 % 2D Test
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 % 3D Test
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');

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