-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgetMARpara.m
65 lines (52 loc) · 1.73 KB
/
getMARpara.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
64
65
function MARpara = getMARpara()
param_root = 'para/';
% materials
load([param_root 'MiuofH2O.mat'], 'MiuofH2O')
load([param_root 'MiuofTi.mat'], 'MiuofTi')
load([param_root 'MiuofFe.mat'], 'MiuofFe')
load([param_root 'MiuofCu.mat'], 'MiuofCu')
load([param_root 'MiuofAu.mat'], 'MiuofAu')
load([param_root 'MiuofBONE_Cortical_ICRU44.mat'], 'MiuofBONE_Cortical_ICRU44')
% spectrum data
load([param_root 'GE14Spectrum120KVP.mat'], 'GE14Spectrum120KVP')
kVp = 120;
energies = 20:kVp;
kev = 70;
photonNum = 2*10^(7);
materialID = 1;
threshWaterHU = 100;
threshBoneHU = 1500;
MiuWater = 0.192;
threshWater = threshWaterHU/1000*MiuWater + MiuWater;
threshBone = threshBoneHU/1000*MiuWater + MiuWater;
MiuofMetal = [];
MiuofMetal(:, :, 1) = MiuofTi(1:kVp, :);
MiuofMetal(:, :, 2) = MiuofFe(1:kVp, :);
MiuofMetal(:, :, 3) = MiuofCu(1:kVp, :);
MiuofMetal(:, :, 4) = MiuofAu(1:kVp, :);
densityMetal = [4.5 7.8 8.9 2];
metalAtten = densityMetal(materialID) * MiuofMetal(kev, 7, materialID);
% materials
MiuAll = [];
MiuAll(:, :, 1) = MiuofH2O(1:kVp, :);
MiuAll(:, :, 2) = MiuofBONE_Cortical_ICRU44(1:kVp, :);
MiuAll(:, :, 3) = MiuofMetal(1:kVp, :, materialID);
spectrum = GE14Spectrum120KVP(1:kVp, 2);
% water BHC
thickness = [0: 0.05: 50]'; % thickness of water, cm
pwaterkev = MiuofH2O(kev, 7)*thickness;
pwaterkvp = pkev2kvp(pwaterkev, spectrum, energies, kev, MiuofH2O(1:kVp, :));
A = [pwaterkvp pwaterkvp.^2 pwaterkvp.^3];
paraBHC = pinv(A)*pwaterkev;
% return
MARpara.kev = kev;
MARpara.spectrum = spectrum;
MARpara.energies = energies;
MARpara.photonNum = photonNum;
MARpara.MiuWater = MiuWater;
MARpara.MiuAll = MiuAll;
MARpara.threshWater = threshWater;
MARpara.threshBone = threshBone;
MARpara.paraBHC = paraBHC;
MARpara.metalAtten = metalAtten;
end