/tomo/dfi

To get this branch, use:
bzr branch http://suren.me/webbzr/tomo/dfi

« back to all changes in this revision

Viewing changes to unpack_slice.m

  • Committer: Suren A. Chilingaryan
  • Date: 2013-03-22 00:21:41 UTC
  • Revision ID: csa@dside.dyndns.org-20130322002141-40r2i2pfmza3lpfc
Initial release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function [slice]=unpack_slice(res, dim)
 
2
    shifted = fftshift(res);
 
3
    rec=ifft2(shifted, 'symmetric');
 
4
 
 
5
    x=size(rec,1);
 
6
    y=size(rec,2);
 
7
    n=dim/2;
 
8
 
 
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)];
 
10
 
 
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;
 
14
 
 
15
    slice = mod_slice;
 
16
end