-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscaling_factor.m
63 lines (56 loc) · 2.21 KB
/
scaling_factor.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
function scale_factor = scaling_factor(BqDim_ind , d_x , d_y , d_z , t1 , t2 , lambda , calib_fact , IMAGE_DECAYED)
% scale_factor = scaling_factor(BqDim , d_x , d_y , d_z , t1 , t2 , lambda , calib_fact)
% This function returns the image corrected for the following factors:
% Bq oder of magnitude, voxel size , time , decay and calibration factor.
% volume of a voxel is needed, and calculated via d_x, d_y.
% t1, t2 and lambda are needed for calucating the decay factor.
% calibration factor can be evaluated from calib_fact.m
% -------------------------------------------------------------------------
% % AUTHOR:
% - Saeed Ashrafinia
% -------------------------------------------------------------------------
% **** If you use this code in a study, please cite the following paper ***
% S. Ashrafinia, H. Mohy-ud-din, N. Karakatsanis, A. Jha, M. Casey, D.
% Kadrmas and A. Rahmim, 밎eneralized PSF modeling for optimized
% quantitative-task performance�, Phys. Med. Biol., vol. 62, pp. 5149-5179,
% 2017.
%
% -------------------------------------------------------------------------
% STATEMENT:
% This file is part of PET Recon Package by Saeed Ashrafinia, Rahmimlab.com
% --> Copyright (C) 2013-2018 Saeed Ashrafinia, Johns Hopkins University
%
% This package is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% -------------------------------------------------------------------------
% Correct for Bq unit
switch BqDim_ind
case 1 % [Bq/ml]
ratio = 1;
case 2 % [kBq/ml]
ratio = 1e3;
case 3 % [MBq/ml]
ratio = 1e6;
end
%if BqDim_ind == 'K'
% ratio = 1e3;
%elseif BqDim == 'M'
% ratio = 1e6;
%else
% ratio = 1;
%end
% find voxel volume
vol = d_x * d_y * d_z; % Unit for vol: [cc], for d_x & d_y & d_z: [cm]
% find time
delta_t = t2 - t1; % unit: [min]
% decay
if IMAGE_DECAYED == 0
decay_factor = exp(-lambda * t1) * (1 / (lambda * delta_t)) * (1 - exp(-lambda * delta_t));
else
decay_factor = 1;
end
% scaling factor
scale_factor = ratio * vol * (60 * delta_t) * decay_factor * calib_fact;