iRoCS Toolbox  1.1.0
TrainLayerAssignmentParametersDialog.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2015 Thorsten Falk
4  *
5  * Image Analysis Lab, University of Freiburg, Germany
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  **************************************************************************/
22 
23 #ifndef TRAINLAYERASSIGNMENTPARAMETERSDIALOG_HH
24 #define TRAINLAYERASSIGNMENTPARAMETERSDIALOG_HH
25 
26 #ifdef HAVE_CONFIG_H
27 #include <config.hh>
28 #endif
29 
30 #include <QtGui/QDialog>
31 #include <QtGui/QGroupBox>
32 #include <QtGui/QTreeWidget>
33 
35 
43 
45 
47  : public QDialog, public TrainingParameters
48 {
49 
50  Q_OBJECT
51 
52 public:
53 
55  LabellingMainWidget* mainWidget,
56  QWidget* parent = 0, Qt::WindowFlags f = 0);
58 
59  std::vector<TrainfileParameters*> trainFiles() const;
60 
61  void setFeatureGroup(std::string const &group);
62  std::string featureGroup() const;
63 
64  void setGenerateRandomSamples(bool generate);
65  bool generateRandomSamples() const;
66 
67  void setNInRootSamples(int samples);
68  int nInRootSamples() const;
69 
70  void setNOutRootSamples(int samples);
71  int nOutRootSamples() const;
72 
73  void setModelFileName(std::string const &name);
74  std::string modelFileName() const;
75 
78 
82 
83  void setCost(double cost);
84  double cost() const;
85 
86  void setGamma(double gamma);
87  double gamma() const;
88 
89 private slots:
90 
91  void checkAndAccept();
92  void addTrainFile();
93 
94 private:
95 
96  LabellingMainWidget* p_mainWidget;
97 
98  QTreeWidget *p_trainFileList;
99  QPushButton *p_addTrainFileButton;
100  StringControlElement *p_featureGroupControlElement;
101  QGroupBox* p_randomSamplesGroup;
102  IntControlElement* p_nInRootSamplesControlElement;
103  IntControlElement* p_nOutRootSamplesControlElement;
104  FileNameSelectionControlElement* p_modelFileNameControlElement;
105  StringSelectionControlElement *p_sdNormalizationControl;
106  StringSelectionControlElement *p_houghNormalizationControl;
107  DoubleControlElement* p_costControlElement;
108  DoubleControlElement* p_gammaControlElement;
109 
110 };
111 
112 #endif
void setSdFeatureNormalization(iRoCS::Features::NormalizationType normType)
iRoCS::Features::NormalizationType houghFeatureNormalization() const
std::vector< TrainfileParameters * > trainFiles() const
void setModelFileName(std::string const &name)
void setGenerateRandomSamples(bool generate)
void setFeatureGroup(std::string const &group)
iRoCS::Features::NormalizationType sdFeatureNormalization() const
TrainLayerAssignmentParametersDialog(LabellingMainWidget *mainWidget, QWidget *parent=0, Qt::WindowFlags f=0)
void setHoughFeatureNormalization(iRoCS::Features::NormalizationType normType)