-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSeg3DLib_example_main.cc
More file actions
34 lines (27 loc) · 875 Bytes
/
Seg3DLib_example_main.cc
File metadata and controls
34 lines (27 loc) · 875 Bytes
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
#include <qapplication.h>
#include <qpushbutton.h>
#include "Seg3D_lib.h"
#include <iostream>
#include <QtCore>
#include <QtWidgets>
void showSeg3DWidget()
{
Seg3DLibrary::importDataFile("C:/Users/Ally/Documents/T2_AW_Corrected.nrrd");
Seg3DLibrary::importSegFile("C:/Users/Ally/Documents/HeadSegmentation.nrrd");
Seg3DLibrary::makeSeg3DWidget()->show();
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
auto Context = Seg3DLibrary::Context::makeContext(&app);
// dummy application code
QWidget* widget = new QWidget();
auto mainLayout_ = new QVBoxLayout();
widget->setLayout(mainLayout_);
QPushButton* run_button_ = new QPushButton("Launch Seg3D");
mainLayout_->addWidget(run_button_);
QObject::connect(run_button_, &QPushButton::clicked, showSeg3DWidget);
widget->show();
// end dummy application
return app.exec();
}