Re: human head model
Hi aaron412,
many thanks!! You really helped me
The file is easy to open. I used Matlab for
this purpose. Here is the code to read the head. If you encounter some problems please let me kow. Many thanks again!!
% ----------------------------------------------------
% dat2mat_.m 07-2005
% read 'zubal head' data format;
% and save as a 3d-matrix in *.mat file
% ----------------------------------------------------
fid=fopen('det_head_u2med.dat','r'); % read head
head_lin=fread(fid,'uint8'); % data_format= uint8
fclose(fid);
%
nx=256; ny=256; nz=128; % dimension matrix
%
head3d=zeros(nx,ny,nz); % increases speed!!!
i=1;
for z=1:nz
for y=1:ny
for x=1:nx
head3d(x,y,z)=head_lin(i); % write in 3d matrix
i=i+1;
end
end
end
%
figure % an example: view slice 80
contourf(head3d
,:,80));
hold on
colorbar
save head3d.mat head3d %
% ----------------------------------------------------