forked from josalggui/MaRGE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
47 lines (37 loc) · 1.67 KB
/
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
40
41
42
43
44
45
46
"""
Main file to run MaRGE
"""
import os
import sys
from PyQt5.QtWidgets import QApplication
# *****************************************************************************
# Get the directory of the current script
main_directory = os.path.dirname(os.path.realpath(__file__))
# Get the parent directory (one level up)
parent_directory = os.path.dirname(main_directory)
# Define the subdirectories you want to add to sys.path
subdirs = ['marcos_client']
# Add the subdirectories to sys.path
for subdir in subdirs:
full_path = os.path.join(parent_directory, subdir)
sys.path.append(full_path)
# ******************************************************************************
import experiment as ex
print("****************************************************************************************")
print("Graphical User Interface for MaRCoS *")
print("Dr. J.M. Algarín, mriLab @ i3M, CSIC, Spain *")
print("https://www.i3m-stim.i3m.upv.es/research/magnetic-resonance-imaging-laboratory-mrilab/ *")
print("https://github.com/mriLab-i3M/MaRGE *")
print("****************************************************************************************")
# Add folders
if not os.path.exists('experiments/parameterization'):
os.makedirs('experiments/parameterization')
if not os.path.exists('calibration'):
os.makedirs('calibration')
if not os.path.exists('protocols'):
os.makedirs('protocols')
from controller.controller_session import SessionController
# Run the gui
app = QApplication(sys.argv)
gui = SessionController()
sys.exit(app.exec_())