0001 function img = igt2img(igt)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 img.name = 'Read in from an igt file';
0012 img.type = 'image';
0013 img.elem_data = 1:912;
0014 tempmdl = mk_common_gridmdl('b2d','backproj');
0015 img.fwd_model = tempmdl.fwd_model;
0016
0017
0018 img.calc_colours.npoints=32;
0019 greit_m = calc_slices(img);
0020 greit_m(isnan(greit_m)) = 0;
0021
0022
0023 ind=[8:25,39:58,70:91,101:124,132:157,163:190,194:223,225:800, ...
0024 802:831,835:862,868:893,901:924,934:955,967:986,1000:1017];
0025 igt_m = zeros(1,1024);
0026 igt_m(ind) = 1:912;
0027 igt_m = reshape(igt_m,32,32)';
0028
0029
0030 data=zeros(size(igt,1),912);
0031 for i = 1:32
0032 for j = 1:32
0033 if igt_m(i,j)>0
0034 data(:,greit_m(i,j)) = igt(:,igt_m(i,j));
0035 end
0036 end
0037 end
0038
0039 img.elem_data = data';