-
Notifications
You must be signed in to change notification settings - Fork 0
/
AJTrackingFrame.h
155 lines (108 loc) · 4.44 KB
/
AJTrackingFrame.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#ifndef AJTRACKINGFRAME_H
#define AJTRACKINGFRAME_H
#include <QDialog>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkCamera.h>
#include <vtkPointWidget.h>
#include <vtkEventQtSlotConnect.h>
#include "VertexLocationsDrawer.h"
#include "EdgesDrawer.h"
#include "DrosophilaOmmatidiaJSONProject.h"
#include "OmmatidiaTissue.h"
#include "CellDrawer.h"
namespace Ui {
class AJTrackingFrame;
}
class AJTrackingFrame : public QDialog
{
Q_OBJECT
public:
explicit AJTrackingFrame(QWidget *parent, DrosophilaOmmatidiaJSONProject & project);
~AJTrackingFrame();
public:
typedef OmmatidiaTissue<3>::AJGraphType AJGraphType;
typedef DrosophilaOmmatidiaJSONProject::CellGraphType CellGraphType;
typedef CellGraphType::CellVertexHandler CellType;
typedef AJGraphType::AJVertexHandler VertexType;
typedef AJGraphType::AJEdgeHandler EdgeType;
void clearBeforeSelection();
void clearAfterSelection();
void setSelectedCellAfter(const CellType & cell);
void setSelectedCellBefore(const CellType & cell);
void setSelectedEdgeAfter(const EdgeType & edge);
void setSelectedEdgeBefore(const EdgeType & edge);
void setSelectedVertexAfter(const VertexType & vertex);
void setSelectedVertexBefore(const VertexType & vertex);
void setFrame(int frame);
public slots:
void slotGuessCorrespondence();
void slotFrameForward();
void slotFrameBackward();
void slotFrameChanged(int frame);
void slotComputeCorrespondences();
void slotDeleteSelectedCorrespondences();
void slotAddCorrespondence();
void slotSelectVertexBefore();
void slotSelectVertexAfter();
void slotSelectEdgeBefore();
void slotSelectEdgeAfter();
void slotSelectCellBefore();
void slotSelectCellAfter();
void slotLeftClickBeforeVertexSelection(vtkObject*,unsigned long, void*,void*,vtkCommand*);
void slotLeftClickAfterVertexSelection(vtkObject*,unsigned long, void*,void*,vtkCommand*);
void slotLeftClickBeforeEdgeSelection(vtkObject*,unsigned long, void*,void*,vtkCommand*);
void slotLeftClickAfterEdgeSelection(vtkObject*,unsigned long, void*,void*,vtkCommand*);
void slotLeftClickBeforeCellSelection(vtkObject*,unsigned long, void*,void*,vtkCommand*);
void slotLeftClickAfterCellSelection(vtkObject*,unsigned long, void*,void*,vtkCommand*);
void slotCorrespondenceSelectionChanged();
public:
void PopulateTable();
private:
DrosophilaOmmatidiaJSONProject::CorrespondenceSetType m_Correspondences;
Ui::AJTrackingFrame *m_pUI;
DrosophilaOmmatidiaJSONProject & m_Project;
vtkSmartPointer<vtkRenderer> m_BeforeRenderer;
vtkSmartPointer<vtkRenderer> m_AfterRenderer;
vtkSmartPointer<vtkRenderWindow> m_BeforeRenderWindow;
vtkSmartPointer<vtkRenderWindow> m_AfterRenderWindow;
vtkSmartPointer<vtkRenderWindowInteractor> m_BeforeRenderWindowInteractor;
vtkSmartPointer<vtkRenderWindowInteractor> m_AfterRenderWindowInteractor;
unsigned int m_CurrentFrame;
typedef VertexLocationsDrawer<AJGraphType > VertexLocationsDrawerType;
VertexLocationsDrawerType m_BeforeVertexDrawer;
VertexLocationsDrawerType m_AfterVertexDrawer;
typedef EdgesDrawer<AJGraphType > EdgesDrawerType;
EdgesDrawerType m_BeforeEdgesDrawer;
EdgesDrawerType m_AfterEdgesDrawer;
typedef CellDrawer<CellGraphType,AJGraphType> CellsDrawerType;
CellsDrawerType m_BeforeCellsDrawer;
CellsDrawerType m_AfterCellsDrawer;
OmmatidiaTissue<3>::Pointer m_BeforeTissue;
OmmatidiaTissue<3>::Pointer m_AfterTissue;
vtkSmartPointer<vtkCamera> m_Camera;
vtkSmartPointer<vtkPointWidget> m_PointWidget;
vtkSmartPointer<vtkEventQtSlotConnect> m_QtToVTKConnections;
VertexType m_VertexSelectedBefore;
bool m_IsVertexSelectedBefore;
VertexType m_VertexSelectedAfter;
bool m_IsVertexSelectedAfter;
EdgeType m_EdgeSelectedBefore;
bool m_IsEdgeSelectedBefore;
EdgeType m_EdgeSelectedAfter;
bool m_IsEdgeSelectedAfter;
CellType m_CellSelectedBefore;
bool m_IsCellSelectedBefore;
CellType m_CellSelectedAfter;
bool m_IsCellSelectedAfter;
typedef DrosophilaOmmatidiaJSONProject::CorrespondenceSetType CorrespondenceSetType;
typedef CorrespondenceSetType::AJCorrespondenceType AJCorrespondenceType;
typedef AJCorrespondenceType::AJSubgraphType AJSubgraphType;
AJSubgraphType m_BeforeSelection;
AJSubgraphType m_AfterSelection;
std::vector<AJCorrespondenceType> m_PlottedCorrespondences;
std::map<AJSubgraphType,vtkColor3d > m_BeforeColors,m_AfterColors,m_Colors;
bool m_Forward;
bool m_Backward;
};
#endif // AJTRACKINGFRAME_H