Files
glocalize/mainw.h
T

136 lines
3.0 KiB
C++

#ifndef _MAINW_H_
#define _MAINW_H_
#define MULTIPLE_REF
#include <QMainWindow>
#include <QString>
#include <QThread>
#include <QStandardItemModel>
class Ui_MainWindow; // forward declaration (defined in ui_mainw.h)
class gRen;
class DicomScanWorker;
class LocalizationWorker;
class SkullRemovalWorker;
class VolumePrepWorker;
class gLoadPatDialog;
//#include "wrkDirParser.h"
//#include "loadDCM2VTK.h"
#include "gPatientRTGeneralInfos.h"
#include "dicomUtils.h"
#include "connectITKVTK.h"
#include "LocalizationWorker.h"
#include "DicomScanWorker.h"
#include "SkullRemovalWorker.h"
#include "VolumePrepWorker.h"
#include "types_qt.h"
class gLoadPatDialog: public QDialog{
public:
gLoadPatDialog(QWidget *parent = 0)
: QDialog(parent){
QVBoxLayout * lay = new QVBoxLayout(this);
this->setModal(true);
message = new QLabel(this);
lay->addWidget(message);
message->setText("Loading patient from wrkDir... Please wait.");
};
private:
QLabel *message;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QString p_loadPath);
~MainWindow();
private:
Ui_MainWindow* Ui;
void retranslateUi(Ui_MainWindow* Ui, QMainWindow *MainWindow);
void connectUi(Ui_MainWindow* Ui);
gRen * Visualizer;
DicomScanWorker* loadPatient;
QThread* loadPatient_thread;
VolumePrepWorker* volumePrep{nullptr};
QThread* volumePrep_thread{nullptr};
LocalizationWorker* localize_marker{nullptr};
QThread* localize_thread;
SkullRemovalWorker* skullRemoval;
QThread* skull_thread;
QStandardItemModel* treeModel;
QString loadPath;
gLoadPatDialog* loadDialog;
double regGrownParameters[2];
QString pathIn;
QString pathOut;
private slots:
void call_localize_start();
void call_localize_cancel();
void call_visualize_all();
void call_hide_all();
void call_ToolbarAction(QAction* action);
void call_skullMask();
void call_loadPatient();
void call_saveDotCtFile();
void call_quit();
void call_quit_nothreads();
void onParsedOK(int result, gPatientRTGeneralInfos* data);
void onParsedEmptyFolder();
void onLocalizationEnd(MarkerList marker_list);
void onLocalizationProgress(double percent);
void onLocalizationError(const QString& message);
void onLocalizationAborted();
void onVisualizationTrigger(QAction* trigger_action);
void onManualMaskTrigger(bool state);
void onAutoMaskError(QString msg);
void onItemChanged(QStandardItem* item);
void setStatusMsg(QString msg, int timeout);
void onVirtualIsoTested(bool IsoV);
#ifdef MULTIPLE_REF
void onRefTrigger(QAbstractButton* trigger_button);
#endif
void onPatientlLoaded();
void onRTIsoAvailable(double* iso);
void onCTVolumeAvailable(double* bounds, double* spacing, int* dim);
void updateMarkerPos(double dx, double dy, double dz);
void onSkullMaskingUpdt(QString msg, double val);
void onAutoSkullMaskEnd(vtkImageData* img);
protected:
void showEvent(QShowEvent *event) override; //with or without the override keyword, no change
};
#endif