-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathregtoolbox.h
100 lines (73 loc) · 2.16 KB
/
regtoolbox.h
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef REGTOOLBOX_H
#define REGTOOLBOX_H
#include <QMainWindow>
#include <QTimer>
#include <QGraphicsScene>
#include <QProgressBar>
#include "zlib.h"
#include "TIPL/tipl.hpp"
#include "reg.hpp"
namespace Ui {
class RegToolBox;
}
class RegToolBox : public QMainWindow
{
Q_OBJECT
public:
uint8_t cur_view = 2;
dual_reg<3> reg;
std::vector<tipl::image<3,unsigned char> > J,Jt;
public:
tipl::transformation_matrix<float> T;
public:
tipl::thread thread;
std::shared_ptr<QTimer> timer;
tipl::affine_transform<float> old_arg;
public:
std::shared_ptr<tipl::reg::bfnorm_mapping<float,3> > bnorm_data;
bool flash = false;
void clear_thread(void);
private:
void setup_slice_pos(void);
uint8_t blend_style(void);
private:
std::vector<std::string> subject_names,template_names;
void auto_fill(void);
void load_subject(const std::string& file_name);
void load_template(const std::string& file_name);
public:
explicit RegToolBox(QWidget *parent = nullptr);
~RegToolBox();
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;
public:
int subject_view_border = 0;
int template_view_border = 0;
tipl::shape<2> subject_view_size,template_view_size;
bool eventFilter(QObject *obj, QEvent *event) override;
public slots:
void show_image();
private slots:
void on_OpenTemplate_clicked();
void on_OpenSubject_clicked();
void on_run_reg_clicked();
void on_timer();
void on_stop_clicked();
void on_actionSave_Warping_triggered();
void on_show_option_clicked();
void on_axial_view_clicked();
void on_coronal_view_clicked();
void on_sag_view_clicked();
void on_switch_view_clicked();
void on_actionSubject_Image_triggered();
void on_actionTemplate_Image_triggered();
void on_ClearSubject_clicked();
void on_ClearTemplate_clicked();
void on_actionApply_Subject_To_Template_Warping_triggered();
void on_actionApply_Template_To_Subject_Warping_triggered();
void on_actionOpen_Mapping_triggered();
private:
Ui::RegToolBox *ui;
QGraphicsScene It_scene,I_scene;
};
#endif // REGTOOLBOX_H