forked from GIBIS-UNIFESP/BIAL-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplayformat.h
More file actions
128 lines (89 loc) · 2.39 KB
/
displayformat.h
File metadata and controls
128 lines (89 loc) · 2.39 KB
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
#ifndef DISPLAYFORMAT_H
#define DISPLAYFORMAT_H
#include <QColor>
#include <QObject>
#include <QVector>
#include <array>
enum class Modality {
BW2D = 1, RGB2D = 2, BW3D = 4
};
enum class Layout {
GRID, HORIZONTAL, VERTICAL
};
enum class Views {
SHOW0 = 1, SHOW1 = 2, SHOW2 = 4, SHOW3 = 8, SHOW012 = 7, SHOW123 = 14, SHOW0123 = 15
};
class DisplayFormat : public QObject {
Q_OBJECT
public:
explicit DisplayFormat( QObject *parent );
~DisplayFormat( );
Modality modality( ) const;
Layout currentLayout( ) const;
virtual void setCurrentLayout( const Layout ¤tLayout );
Views currentViews( ) const;
virtual void setCurrentViews( const Views ¤tViews );
bool hasViewerControls( ) const;
bool enableTools( ) const;
bool rotateAll( ) const;
bool rotateSingle( ) const;
bool hasOverlay( ) const;
bool showNiftiViews( ) const;
bool showNiftiAxis( ) const;
bool showOrientation( ) const;
bool showPpmViews( ) const;
bool showPpmChannels( ) const;
bool overlay( ) const;
void setOverlay( bool overlay );
void toggleOverlay( );
bool hasLayout( ) const;
bool has3Views( ) const;
bool has4Views( ) const;
std::array< bool, 4 > getViews( );
int getNumberOfViews( ) const;
virtual void setNumberOfViews( int numberOfViews ) = 0;
QColor overlayColor( ) const;
void setOverlayColor( const QColor &overlayColor );
size_t getMaximumNumberOfViews( ) const;
signals:
void updated( );
protected:
Modality m_modality;
Layout m_currentLayout;
Views m_currentViews;
void loadSettings( );
bool m_overlay;
bool m_hasViewerControls;
bool m_enableTools;
bool m_rotateAll;
bool m_rotateSingle;
bool m_hasOverlay;
bool m_hasLayout;
bool m_has3Views;
bool m_has4Views;
bool m_showNiftiViews;
bool m_showNiftiAxis;
bool m_showOrientation;
bool m_showPpmViews;
bool m_showPpmChannels;
Views defaultViews;
int m_numberOfViews;
size_t m_maximumNumberOfViews;
QColor m_overlayColor;
};
class BW2DFormat : public DisplayFormat {
public:
BW2DFormat( QObject *parent = 0 );
void setNumberOfViews( int numberOfViews );
};
class BW3DFormat : public DisplayFormat {
public:
BW3DFormat( QObject *parent = 0 );
void setNumberOfViews( int numberOfViews );
};
class RGB2DFormat : public DisplayFormat {
public:
RGB2DFormat( QObject *parent = 0 );
void setNumberOfViews( int numberOfViews );
};
#endif /* DISPLAYFORMAT_H */