2 %%% Function that creates a 3D matrix (size dimx, dimy, dimz) containing a sphere, centered at (cx,
3 %%% cy, cz), of radius r
17 coeff=9.917*10^-7; % mu ou autre
19 Sphere=zeros(dimx, dimy, dimz);
24 if((i-cx)^2+(j-cy)^2+(k-cz)^2 <= r^2)
33 name='sphere_phase_Mg_19keV'
35 fid=fopen(strcat(name, '.raw'), 'w')
36 fwrite(fid, Sphere, 'float32');
39 cmd = ['/data/id19/bones01/bones/program/linux_debian/bin/rawtomhd filein=', strcat(name, '.raw'), ' fileout=', strcat(name, '.mhd'), ' dimx=', num2str(dimx), ' dimy=', num2str(dimy), ' dimz=', num2str(dimz), ' format=FLOAT'];