1
function [slice]=unpack_slice(res, dim)
2
shifted = fftshift(res);
3
rec=ifft2(shifted, 'symmetric');
9
mod_slice = [rec(x-(n-1):x,y-(n-1):y) rec(x-(n-1):x,1:n); rec(1:n,y-(n-1):y) rec(1:n,1:n)];
11
%Instead of fftshift we can fix the image with this operation
12
%slice_filter=repmat([1 -1; -1 1], n, n);
13
%slice = slice_filter .* mod_slice;