-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparametertesterwidget.h
executable file
·55 lines (50 loc) · 1.69 KB
/
parametertesterwidget.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
#ifndef PARAMETERTESTERWIDGET_H
#define PARAMETERTESTERWIDGET_H
#include <QWidget>
#include <queue>
#include "extractortest/budextractortest.h"
class QFormLayout;
class QPushButton;
class FileDirSelectionWidget;
class ChtExtractorConfigDialog;
class ParameterTesterWidget : public QWidget
{
Q_OBJECT
class ParameterCandidate
{
int cannyThreshold;
float houghThreshold;
float estimatedScore;
public:
ParameterCandidate();
ParameterCandidate(int cannyThreshold, float houghThreshold, float estimatedScore);
bool operator< (const ParameterCandidate& other) const;
bool operator == (const ParameterCandidate& other) const;
std::vector<ParameterCandidate> generateNewCandidates() const;
int getCannyThreshold() const;
void setCannyThreshold(int value);
float getHoughThreshold() const;
void setHoughThreshold(float value);
float getEstimatedScore() const;
void setEstimatedScore(float value);
};
QString* dataFile;
BudExtractorTest tester;
QFormLayout* dataLayout;
QPushButton* configButton;
QPushButton* startButton;
//FileDirSelectionWidget* dataSelection;
FileDirSelectionWidget* outputFileField;
ChtExtractorConfigDialog* extractorDialog;
void loadSettings();
void saveSettings();
void addNewCandidates(std::priority_queue<ParameterCandidate,std::vector<ParameterCandidate>>& queue, const std::vector<ParameterCandidate>& knownCandidates, const ParameterCandidate candidate);
std::vector<ParameterCandidate> loadCandidates(QFile& file);
public:
explicit ParameterTesterWidget(QString* dataFile, QWidget *parent = nullptr);
signals:
private slots:
void startClicked();
void configClicked();
};
#endif // PARAMETERTESTERWIDGET_H