
% kspace: kspace data (kx, ky, receiver, slice)
% numrec: number of receivers
% numslice: number of slices
% object: object data
% image: magnitude image of chosen slice
%
% Written by Wesley (11/13/2007)

clear all

load brain_8rec10sl

numrec = size(kspace,3);
numslice = size(kspace,4);
for slice = 1 : numslice
   for rec = 1 : numrec
      object(:,:,rec,slice) = ift( kspace(:,:,rec,slice) );
   end
end

slicepick = 1;

oneslice = object(:,:,:,slicepick);
image = sqrt( sum( abs(oneslice).^2, 3 ) );

figure;
dispimage( image );
axis square;





