forked from ndwork/dworkLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiGrid.m
More file actions
30 lines (27 loc) · 995 Bytes
/
iGrid.m
File metadata and controls
30 lines (27 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function k = iGrid( img, traj, varargin )
% k = iGrid( img, traj, [ 'alpha', alpha, 'W', W, 'nC', nC ] )
%
% Inverse Gridding based on Beatty et. al., IEEE TMI, 2005
% Detailed in the following document http://nicholasdwork.com/tutorials/dworkGridding.pdf
%
% Inputs:
% img is an array specifying the volume to be encoded
% traj is a MxV array specifying the k-space trajectory.
% V is the number of dimensions of the img
% The first/second/third column is kx/ky/kz
% The units are normalized to [-0.5,0.5).
% alpha is the oversampling factor [1,inf]
% W is the window width in pixels
% nC is the number of points to sample the convolution kernel
%
% Written by Nicholas Dwork (c) 2015
if size( traj, 1 ) == 1, traj=transpose( traj ); end
nD = size( traj, 2 );
if nD == 1
k = iGrid_1D( img, traj, varargin{:} );
elseif nD == 2
k = iGrid_2D( img, traj, varargin{:} );
elseif nD == 3
k = iGrid_3D( img, traj, varargin{:} );
end
end