-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_bonesFelix.py
47 lines (31 loc) · 969 Bytes
/
test_bonesFelix.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
40
41
42
43
44
45
46
47
from imfractal import *
import Image
import time
import matplotlib.pyplot as plt
from pylab import *
import os
import sys
sys.path.append('/home/rodrigo/imfractal/imfractal/Algorithm/')
import qs3D
def createFolders(dirs):
for f in dirs:
if not os.path.isdir(f):
os.mkdir (f)
def do_test():
# load array object file
#res = np.load("mfss.npy")
res = np.load("mfss.npy")
patients = ["5c", "6b", "8b", "8c", "V12"]
# scans except xct
#scans = ["01", "02", "03","M1", "M2"]
# all scans
scans = ["01", "02", "03","M1", "M2", "xct"]
dims = 10
vois = 27
print "test"
with open("results.txt", "w") as text_file:
for p in range(len(patients)):
for k in range(len(scans)):
for j in range(vois):
s = str(p+1)+ " " + str(k+1)+ " " + str(j+1) + " "+ ' '.join(map(str, res[p][k][j])) + "\n"
text_file.write(s)