-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctCorrectForTranslation.m
More file actions
39 lines (31 loc) · 1.18 KB
/
Copy pathctCorrectForTranslation.m
File metadata and controls
39 lines (31 loc) · 1.18 KB
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
38
function [recon,costs] = ctCorrectForTranslation( sinogram, nDetectors, ...
detSize, thetas, translations, nCols, nRows, pixSize, varargin )
% Optional Variables:
% method:
% 'GD' for Gradient Descent
% 'LADMM' for Linearized ADMM
% 'PC' for Pock Chambolle
defaultMethod = 'PC';
defaultR = [];
p = inputParser;
p.addOptional( 'method', defaultMethod );
p.addOptional( 'radonMatrix', defaultR );
p.parse( varargin{:} );
method = p.Results.method;
radonMatrix = p.Results.radonMatrix;
switch method
case 'GD' % Gradient Descent
costs = [];
recon = ctCorrectForTranslation_GD( sinogram, ...
nDetectors, detSize, thetas, translations, nCols, nRows, ...
pixSize, 'radonMatrix', radonMatrix );
case 'LADMM' % Linearized ADMM
[recon,costs] = ctCorrectForTranslation_LADMM( sinogram, ...
nDetectors, detSize, thetas, translations, nCols, nRows, ...
pixSize, 'radonMatrix', radonMatrix );
case 'PC' % Pock-Chambolle
[recon,costs] = ctCorrectForTranslation_PC( sinogram, ...
nDetectors, detSize, thetas, translations, nCols, nRows, ...
pixSize, 'radonMatrix', radonMatrix );
end
end