-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCellLineage.h
180 lines (137 loc) · 4.09 KB
/
CellLineage.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Copyright 2009 Sandia Corporation, Kitware Inc.
// See LICENSE.txt for details.
#ifndef CellLineage_H
#define CellLineage_H
#include <QMainWindow>
#include <QStandardItemModel>
#include <QItemSelection>
#include <QString>
#include "vtkSmartPointer.h" // Required for smart pointer internal ivars.
#include "vtkStdString.h"
#include <vtksys/stl/map>
using vtksys_stl::map;
// Forward Qt class declarations
class Ui_CellLineage;
class vtkObject;
class vtkQtTreeView;
class vtkTreeToQtModelAdapter;
// Forward VTK class declarations
class vtkAnnotationLink;
class vtkCommand;
class vtkDataRepresentation;
class vtkEventQtSlotConnect;
class vtkGraph;
class vtkLineageView;
class vtkTable;
class vtkTreeReader;
class vtkVolumeViewer;
class vtkXMLImageDataReader;
// The view updater
class CellLineageUpdater;
class CellLineage : public QMainWindow
{
Q_OBJECT
public:
// Constructor/Destructor
CellLineage( QWidget * iParent = 0, Qt::WindowFlags iFlags = 0 );
~CellLineage();
public slots:
// Application slots
virtual void slotOpenLineageData();
virtual void slotOpenGeneData();
virtual void slotOpenVolumeData();
virtual void slotExit();
// Description:
// Toggle the mouse mode between selection and collapsing/expanding
void slotSetCollapseMode(int on);
// Description:
// Set the labels on/off
void slotSetLabels(int on);
// Description:
// Set whether to use radial layout.
void slotSetRadialLayout(int radial);
// Description:
// Set the radial layout angle.
void slotSetRadialAngle(int angle);
// Description:
// Set the log spacing for the layout.
void slotSetLogSpacingFactor(double spacing);
// Description:
// Set whether to see the back plane
void slotSetBackPlane(int state);
// Description:
// Set whether to see the iso contour
void slotSetIsoContour(int state);
// Description:
// Set whether to color edges
void slotSetColorEdges(int state);
// Description:
// Set when elbow is turned on
void slotSetElbow(int state);
// Description:
// Set the elbow angle
void slotSetElbowAngle(int value);
// Description:
// Set when distance by time is turned on
void slotSetDistanceByTime(int state);
protected:
protected slots:
// Description:
// Set the global time value for just the tree layout
void slotGlobalTimeValueChanging(int value);
// Description:
// Set the global time value for all views
void slotSetGlobalTimeValue(int value);
// Description:
// Called when selection changed in the Qt tree view
void slotSelectionChanged();
// Description:
// The gene selection changed
void slotGeneSelectionChanged();
// Description:
// Select genes expressed in cells
void slotSelectGenesFromCells(vtkObject*, unsigned long, void*, void*);
// Description:
// VCR slots
void slotVCRPlay();
void slotVCRPause();
void slotVCRBack();
void slotVCRForward();
void slotVCRFirst();
void slotVCRLast();
private:
// Methods
// Description: Browse for and read the Lineage data
int readLineageData();
// Description: Browse for and read the volume data
int readVolumeData();
// Description: Open a specific timestep (do not browse)
int readVolumeDataTimeStep(int timeStep);
// Description: Set up the Lineage list view of the data
void setUpLineageListView();
// Members
vtkTreeReader* LineageReader;
vtkLineageView* LineageView;
vtkDataRepresentation* LineageViewRep;
vtkXMLImageDataReader* VolumeReader;
vtkVolumeViewer* VolumeView;
vtkQtTreeView* QtTreeView;
vtkDataRepresentation* QtTreeViewRep;
vtkAnnotationLink* AnnotationLink;
QString volumeDataDir;
vtkTable* GeneTable;
vtkGraph* GeneGraph;
bool SelectingGenesFromCells;
bool SelectingCellsFromGenes;
CellLineageUpdater* Updater;
vtkEventQtSlotConnect* Connect;
map<vtkStdString, vtkIdType> CellToVertex;
map<vtkStdString, vtkIdType> GeneToVertex;
map<vtkStdString, vtkIdType> CellToTreePedigree;
map<vtkStdString, vtkIdType> GeneToTableRow;
// Designer form
Ui_CellLineage *ui;
// Global time ivar
int globalTime;
};
#endif // CellLineage_H