-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathAutoTract.cxx
77 lines (73 loc) · 2.01 KB
/
AutoTract.cxx
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "AutoTractWindow.h"
#include "AutoTractDerivedWindow.h"
#include "AutoTractCLP.h"
#include <QApplication>
#include <QMap>
#include <QString>
#include "para_Save_AutoTract.h"
#include "para_Load_AutoTract.h"
#include "para_Model_AutoTract.h"
#include "soft_Save_AutoTract.h"
#include "soft_Load_AutoTract.h"
#include "soft_Model_AutoTract.h"
int main( int argc , char** argv )
{
PARSE_ARGS;
para_Model_AutoTract para_m;
para_Save_AutoTract para_s;
para_Load_AutoTract para_l;
soft_Model_AutoTract soft_m;
soft_Save_AutoTract soft_s;
soft_Load_AutoTract soft_l;
if(!executables.empty())
{
soft_l.load( soft_m, executables );
}
if(!parameters.empty())
{
para_l.load( para_m, parameters );
}
if(noGUI == false)
{
QApplication app( argc , argv );
AutoTractDerivedWindow window ;
window.SetParaLoad(¶_l);
window.SetParaSave(¶_s);
window.SetParaModel(¶_m);
window.SetSoftLoad(&soft_l);
window.SetSoftModel(&soft_m);
window.SetSoftSave(&soft_s);
window.show() ;
if(parameters.empty() && executables.empty())
{
window.initSoftware();
window.SyncModelStructureToUi("soft");
}
if(parameters.empty() && !executables.empty())
{
window.SyncModelStructureToUi("soft");
}
if(!parameters.empty() && executables.empty())
{
window.initSoftware();
window.SyncModelStructureToUi();
}
if(!parameters.empty() && !executables.empty())
{
window.SyncModelStructureToUi();
}
window.SyncUiToModelStructure();
return app.exec() ;
}
else
{
Pipeline* pipeline;
pipeline = new Pipeline();
pipeline->setPipelineParameters(¶_m);
pipeline->setPipelineSoftwares(&soft_m);
pipeline->writePipeline();
pipeline->runPipeline();
delete( pipeline );
return 0;
}
}