-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
39 lines (33 loc) · 990 Bytes
/
main.py
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
from helper import *
finalRes = []
# for i in range(5):
getMovingIMG()
elastix()
res = []
for dir in os.listdir(OUTPUT):
try:
res.append(getTRE(dir))
except Exception:
print(dir)
print('-------------------------------------')
# print('time no.',i)
print(res)
res_mean = np.array(res).mean()
print(res_mean)
print('-------------------------------------')
finalRes.append(res_mean)
# print('final')
# print(finalRes)
# print(np.array(finalRes).mean())
#
# line = "********-" + 'TRE' + '-********-[TRE mean, TRE min, TRE max, TRE std, TRE median, 90% percentile]: '
# print(line)
# f = open(OUTPUT + 'tre.txt', 'w+')
# f.write(line + '\n')
# result = np.mean(finalRes), np.min(finalRes), np.max(finalRes), np.std(finalRes), np.median(finalRes), np.percentile(finalRes, 90)
# f.write(str(result[0])+' ')
# f.write(str(result[1])+' ')
# f.write(str(result[2])+' ')
# f.write(str(result[3])+' ')
# f.write(str(result[4])+' ')
# f.write(str(result[5]))