31def cleanup(num, frame):
32 os.kill(procrb2mrb.pid, signal.SIGINT)
33 os.kill(procmrb2rb.pid, signal.SIGINT)
34 for i
in range(0, ncol):
35 os.kill(procbasf2[i].pid, signal.SIGKILL)
36 subprocess.call([
"removerb", inrblist[i]])
37 subprocess.call([
"removerb", outrblist[i]])
45signal.signal(signal.SIGINT, cleanup)
46signal.signal(signal.SIGTERM, cleanup)
63col_script =
"roitest.py"
69for i
in range(0, ncol):
70 inrblist.append(inputrb + str(i + 1))
71 outrblist.append(outputrb + str(i + 1))
72 roiqlist.append(
'/roi' + str(i))
78 subprocess.call(
"createrb " + x, shell=
'True')
80 subprocess.call(
"createrb " + x, shell=
'True')
83cmdrb2mrb =
"rb2mrb " + inputrb +
" "
85for i
in range(0, ncol):
86 cmdrb2mrb += (inrblist[i] +
" ")
87 cmdmrb2rb += (outrblist[i] +
" ")
92procrb2mrb = subprocess.Popen(cmdrb2mrb, shell=
'True')
97procmrb2rb = subprocess.Popen(cmdmrb2rb, shell=
'True')
102for i
in range(0, ncol):
103 basf2cmd =
"basf2 --no-stats " + col_script +
" " + inrblist[i] +
" " + outrblist[i] +
" " + roiqlist[i]
105 procbasf2.append(subprocess.Popen(basf2cmd, shell=
'True'))