-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctCorrectForRotAndTrans.m
38 lines (29 loc) · 1.05 KB
/
ctCorrectForRotAndTrans.m
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
31
32
33
34
35
36
37
function [recon,costs] = ctCorrectForRotAndTrans( sinogram, nDetectors, ...
detSize, thetas, rotations, translations, nCols, nRows, pixSize, ...
varargin )
% Optional Variables:
% method:
% 'GD' for Gradient Descent
% 'LADMM' for Linearized ADMM
% 'PC' for Pock Chambolle
defaultMethod = 'PC';
p = inputParser;
p.addOptional( 'method', defaultMethod );
p.parse( varargin{:} );
method = p.Results.method;
switch method
case 'GD' % Gradient Descent
costs = [];
recon = ctCorrectForRotAndTrans_GD( sinogram, ...
nDetectors, detSize, thetas, rotations, translations, ...
nCols, nRows, pixSize );
case 'LADMM' % Linearized ADMM
[recon,costs] = ctCorrectForRotAndTrans_LADMM( sinogram, ...
nDetectors, detSize, thetas, rotations, translations, ...
nCols, nRows, pixSize );
case 'PC' % Pock-Chambolle
[recon,costs] = ctCorrectForRotAndTrans_PC( sinogram, ...
nDetectors, detSize, thetas, rotations, translations, ...
nCols, nRows, pixSize );
end
end