Skip to content

Commit 0ce1638

Browse files
updated abdominal phantom to include more tissue and be properly oriented
1 parent 77fe390 commit 0ce1638

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ md5sums.txt
2121
.cache
2222
nosetests.xml
2323
coverage.xml
24-
*.pyc
24+
*.pyc
25+
phantoms/MR_XCAT_qMRI/*.json
26+
phantoms/MR_XCAT_qMRI/*.txt

phantoms/MR_XCAT_qMRI/sim_ivim_sig.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def phantom(bvalue, noise, TR=3000, TE=40, motion=False, rician=False, interleav
2323

2424
# Access the variables in the loaded .mat file
2525
XCAT = mat_data['IMG']
26-
XCAT = XCAT[0:-1:2,0:-1:2,10:160:4]
26+
XCAT = XCAT[-1:0:-2,-1:0:-2,10:160:4]
2727

2828
D, f, Ds = contrast_curve_calc()
2929
S, Dim, fim, Dpim, legend = XCAT_to_MR_DCE(XCAT, TR, TE, bvalue, D, f, Ds)
@@ -95,15 +95,19 @@ def contrast_curve_calc():
9595
D[8] = 3e-3 # 8 Blood ra
9696
D[10] = 1.37e-3 # 8 Muscle: 10.3389/fresc.2022.910068
9797
D[13] = 1.5e-3 # 13 liver: Delattre et al. doi: 10.1097/RLI.0b013e31826ef901
98+
D[14] = 3.0e-3 # 13 Galbladder
9899
D[17] = 1.67e-3 # 17 esophagus : Huang et al. doi: 10.1259/bjr.20170421
99100
D[18] = 1.67e-3 # 18 esophagus cont : Huang et al. doi: 10.1259/bjr.20170421
100101
D[20] = 1.5e-3 # 20 stomach wall: Li et al. doi: 10.3389/fonc.2022.821586
102+
D[21] = 2.0e-3 # 21 stomach content
101103
D[22] = 1.3e-3 # 22 Pancreas (from literature)
102104
D[23] = 2.12e-3 # 23 right kydney cortex : van Baalen et al. Doi: jmri.25519
103105
D[24] = 2.09e-3 # 23 right kydney medulla : van Baalen et al. Doi: jmri.25519
104106
D[25] = 2.12e-3 # 23 left kydney cortex : van Baalen et al. Doi: jmri.25519
105107
D[26] = 2.09e-3 # 23 left kydney medulla : van Baalen et al. Doi: jmri.25519
106108
D[30] = 1.3e-3 # 30 spleen : Taimouri et al. Doi: 10.1118/1.4915495
109+
D[34] = 4.1e-4 # 34 spinal cord :doi: 10.3389/fonc.2022.961473
110+
D[35] = 0.43e-3 # 35 Bone marrow : https://pubmed.ncbi.nlm.nih.gov/30194746/
107111
D[36] = 3e-3 # 36 artery
108112
D[37] = 3e-3 # 37 vein
109113
D[40] = 1.31e-3 # 40 asc lower intestine : Hai-Jing et al. doi: 10.1097/RCT.0000000000000926
@@ -124,15 +128,19 @@ def contrast_curve_calc():
124128
f[8] = 1.00 # 8 Blood ra
125129
f[10] = 0.10 # 8 Muscle: 10.3389/fresc.2022.910068
126130
f[13] = 0.11 # 13 liver : Delattre et al. doi: 10.1097/RLI.0b013e31826ef901
131+
f[14] = 0 # 13 Gal
127132
f[17] = 0.32 # 17 esophagus : Huang et al. doi: 10.1259/bjr.20170421
128133
f[18] = 0.32 # 18 esophagus cont : Huang et al. doi: 10.1259/bjr.20170421
129134
f[20] = 0.3 # 20 stomach wall: Li et al. doi: 10.3389/fonc.2022.821586
135+
f[21] = 0.0 # 20 stomach content
130136
f[22] = 0.15 # 22 Pancreas (from literature)
131137
f[23] = 0.097 # 23 right kydney cortex : van Baalen et al. Doi: jmri.25519
132138
f[24] = 0.158 # 23 right kydney medulla : van Baalen et al. Doi: jmri.25519
133139
f[25] = 0.097 # 23 left kydney cortex : van Baalen et al. Doi: jmri.25519
134140
f[26] = 0.158 # 23 left kydney medulla : van Baalen et al. Doi: jmri.25519
135141
f[30] = 0.2 # 30 spleen : Taimouri et al. Doi: 10.1118/1.4915495
142+
f[34] = 0.178 # 34 spinal cord :doi: 10.3389/fonc.2022.961473
143+
f[35] = 0.145 # 35 Bone marrow : https://pubmed.ncbi.nlm.nih.gov/30194746/
136144
f[36] = 1.0 # 36 artery
137145
f[37] = 1.0 # 37 vein
138146
f[40] = 0.69 # 40 asc lower intestine : Hai-Jing et al. doi: 10.1097/RCT.0000000000000926
@@ -153,15 +161,19 @@ def contrast_curve_calc():
153161
Ds[8] = 0.1 # 8 Blood ra
154162
Ds[10] = 0.0263 # 8 Muscle: 10.3389/fresc.2022.910068
155163
Ds[13] = 0.1 # 13 liver: Delattre et al. doi: 10.1097/RLI.0b013e31826ef901
164+
Ds[14] = 0.1 # 14 Gal
156165
Ds[17] = 0.03 # 17 esophagus : Huang et al. doi: 10.1259/bjr.20170421
157166
Ds[18] = 0.03 # 18 esophagus cont : Huang et al. doi: 10.1259/bjr.20170421
158167
Ds[20] = 0.012 # 20 stomach wall: Li et al. doi: 10.3389/fonc.2022.821586
168+
Ds[21] = 0.1 # 20 stomach content
159169
Ds[22] = 0.01 # 22 Pancreas (from literature)
160170
Ds[23] = 0.02 # 23 right kydney cortex : van Baalen et al. Doi: jmri.25519
161171
Ds[24] = 0.019 # 23 right kydney medulla : van Baalen et al. Doi: jmri.25519
162172
Ds[25] = 0.02 # 23 left kydney cortex : van Baalen et al. Doi: jmri.25519
163173
Ds[26] = 0.019 # 23 left kydney medulla : van Baalen et al. Doi: jmri.25519
164174
Ds[30] = 0.03 # 30 spleen : Taimouri et al. Doi: 10.1118/1.4915495
175+
Ds[34] = 0.0289 # 34 spinal cord :doi: 10.3389/fonc.2022.961473
176+
Ds[35] = 0.05 # 35 Bone marrow :
165177
Ds[36] = 0.1 # 36 artery
166178
Ds[37] = 0.1 # 37 vein
167179
Ds[40] = 0.029 # 40 asc lower intestine : Hai-Jing et al. doi: 10.1097/RCT.0000000000000926
@@ -261,7 +273,7 @@ def XCAT_to_MR_DCE(XCAT, TR, TE, bvalue, D, f, Ds, b0=3, ivim_cont = True):
261273
73: 'Pancreas tumor',
262274
}
263275
###############################################################################
264-
np.random.seed(42)
276+
np.random.seed(41)
265277
Tissue = np.zeros((74, 4))
266278
Tissue[1] = [1030, 40, 1471, 47]
267279
Tissue[2] = [1030, 40, 1471, 47]
@@ -427,7 +439,7 @@ def parse_bvalues_file(file_path):
427439
# sig = np.flip(sig,axis=0)
428440
# sig = np.flip(sig,axis=1)
429441
res=np.eye(4)
430-
res[2]=2
442+
res[2,2]=2
431443

432444
voxel_selector_fraction = 0.5
433445
D, f, Ds = contrast_curve_calc()

utilities/data_simulation/Download_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import subprocess
44
import time
5-
5+
import zenodo_get
66

77
def unzip_file(zip_file_path, extracted_folder_path):
88
# Open the zip file

0 commit comments

Comments
 (0)