-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathOptionWidget.h
180 lines (142 loc) · 4.83 KB
/
OptionWidget.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
#ifndef OPTIONWIDGET_H
#define OPTIONWIDGET_H
#include <QDockWidget>
#include <QSlider>
#include <QSpinBox>
#include <QRadioButton>
#include <QCheckBox>
#include <QGroupBox>
#include <QListWidget>
#include <QPushButton>
#include <QGridLayout>
#include <QDialog>
#include <QComboBox>
#include "tree_of_shapes.h"
typedef struct SegParameters {
float sigma; // sigma: to smooth the image.
int c; /// c: constant for treshold function.
int min_size; // min_size: minimum component size (enforced by post-processing stage).
} SegParameters;
class OptionWidget : public QDockWidget
{
Q_OBJECT
public:
OptionWidget(QWidget * parent );
~OptionWidget(){}
int getProcessingMode(){ return _processingMode; }
TOSParameters getTOSParameters(){ return _TOSParameters; }
DictionaryParameters getDictionaryParameters(){ return _dictionaryParameters; }
SegParameters getSegParameters(){ return _segParameters; }
void addDictionary(const QString &dict_name);
int getSelectedDictionary(){ return _dictionariesWidget->currentRow();}
void updateFromParameters(TOSParameters tosParam);
void setNbShapes(int shapeNb);
protected:
QDialog * _segmentationDialog;
QListWidget * _dictionariesWidget;
DictionaryParameters _dictionaryParameters;
SegParameters _segParameters;
QDoubleSpinBox * _sigmaRSpinBox;
QSlider * _sigmaRSlider;
QDoubleSpinBox * _transparencySpinBox;
QSlider * _transparencySlider;
QSpinBox * _scaleRatioSpinBox;
QSlider * _scaleRatioSlider;
QDoubleSpinBox * _thresholdSpinBox;
QSlider * _thresholdSlider;
QDoubleSpinBox * _compactnessSpinBox;
QSlider * _compactnessSlider;
QSpinBox *_minAreaSpinBox;
QSlider *_minAreaSlider;
QSpinBox *_largeShapeSpinBox;
QSlider *_largeShapeSlider;
QGroupBox * _reliefGroupBox;
QGroupBox * _blurGroupBox;
QRadioButton * _colorSketchRadioButton;
QSpinBox *_epsSpinBox;
QSlider *_epsSlider;
QDoubleSpinBox * _segSigmaSpinBox;
QSlider * _segSigmaSlider;
QSpinBox * _segConstantSpinBox;
QSlider * _segConstantSlider;
QSpinBox * _segMinSizeSpinBox;
QSlider * _segMinSizeSlider;
int _processingMode;
int _effect_intensity;
QSlider * _effectIntensitySlider;
TOSParameters _TOSParameters;
QDoubleSpinBox * _shiftSpinBox;
QSlider * _shiftSlider;
QDoubleSpinBox * _thetaSpinBox;
QSlider * _thetaSlider;
QDoubleSpinBox * _compactnessDictSpinBox;
QSlider * _compactnessDictSlider;
QDoubleSpinBox * _kerStdSpinBox;
QSlider * _kerStdSlider;
QSpinBox * _kerSizeSpinBox;
QSlider * _kerSizeSlider;
QSpinBox * _medianSizeSpinBox;
QSlider * _medianSizeSlider;
QSpinBox * _reliefHeightSpinBox;
QSlider * _reliefHeightSlider;
QSpinBox * _reliefOrientationSpinBox;
QSlider * _reliefOrientationSlider;
QGroupBox * _dictionaryParameterGroupBox;
QPushButton * _segmentPushButton;
QPushButton * _updateInputPushButton;
QComboBox * _shakingTypeComboBox;
QComboBox * _renderModelComboBox;
QComboBox * _renderOrderComboBox;
QComboBox * _modeComboBox;
int _effect_intensity_nb;
void setInLayout( QGridLayout*layout, char* text, QWidget *first, QWidget *second, int row );
private slots:
void setTransparencySlider();
void setTransparencySpinBox();
void setScaleRatioSlider();
void setScaleRatioSpinBox();
void setThresholdSlider();
void setThresholdSpinBox();
void setSegSigmaSlider();
void setSegSigmaSpinBox();
void setSegMinSizeSlider();
void setSegMinSizeSpinBox();
void setSegConstantSlider();
void setSegConstantSpinBox();
void setCompactnessSlider();
void setCompactnessSpinBox();
void setShiftSlider();
void setShiftSpinBox();
void setThetaSlider();
void setThetaSpinBox();
void setMinAreaSlider();
void setMinAreaSpinBox();
void setLargeShapeSlider();
void setLargeShapeSpinBox();
void setMode( int mode );
void setRenderModel( int renderModel );
void setRenderOrder( int renderOrder );
void setRelief( bool addRelief );
void setBlur( bool addBlur );
void setKerStdSlider();
void setKerStdSpinBox();
void setKerSizeSlider();
void setKerSizeSpinBox();
void setMedianSizeSlider();
void setMedianSizeSpinBox();
void setReliefOrientationSlider();
void setReliefOrientationSpinBox();
void setReliefHeightSlider();
void setReliefHeightSpinBox();
void setColorSketch( bool color_sketch );
void setEpsSlider();
void setEpsSpinBox();
void setShakingType( int smodel );
void setShapeScaling( int shapeScaling );
void setSelectionModel( int selectionModel );
void setColorModel( int colorModel );
void setCompactnessDictSlider();
void setCompactnessDictSpinBox();
void setEffectIntensity( int effect_intensity );
};
#endif // OPTIONWIDGET_H