18 #include <qapplication.h> 22 #include <qpushbutton.h> 30 QGridLayout *layout =
new QGridLayout(
this);
31 this->setContentsMargins(0, 0, 0, 0);
33 QLabel *label =
new QLabel(
"Threshold ",
this);
34 QFont f = label->font();
37 layout->addWidget(label, 0, 0);
39 QLabel *label2 =
new QLabel(
"Level ",
this);
43 layout->addWidget(label2, 2, 0);
45 m_ThresholdLabel =
new QLabel(
" 0.04",
this);
46 f = m_ThresholdLabel->font();
48 m_ThresholdLabel->setFont(f);
49 layout->addWidget(m_ThresholdLabel, 0, 1);
51 m_SliderThreshold =
new QSlider(Qt::Horizontal,
this);
52 m_SliderThreshold->setMinimum(0);
53 m_SliderThreshold->setMaximum(100);
54 m_SliderThreshold->setPageStep(1);
55 m_SliderThreshold->setValue(4);
56 connect(m_SliderThreshold, SIGNAL(valueChanged(
int)),
this, SLOT(OnSliderValueThresholdChanged(
int)));
57 layout->addWidget(m_SliderThreshold, 1, 0, 1, 2);
59 m_LevelLabel =
new QLabel(
" 0.35",
this);
60 f = m_LevelLabel->font();
62 m_LevelLabel->setFont(f);
63 layout->addWidget(m_LevelLabel, 2, 1);
65 m_SliderLevel =
new QSlider(Qt::Horizontal,
this);
66 m_SliderLevel->setMinimum(0);
67 m_SliderLevel->setMaximum(100);
68 m_SliderLevel->setPageStep(1);
69 m_SliderLevel->setValue(35);
70 connect(m_SliderLevel, SIGNAL(valueChanged(
int)),
this, SLOT(OnSliderValueLevelChanged(
int)));
71 layout->addWidget(m_SliderLevel, 3, 0, 1, 2);
73 QPushButton *okButton =
new QPushButton(
"Run Segmentation",
this);
74 connect(okButton, SIGNAL(clicked()),
this, SLOT(OnCreateSegmentation()));
76 layout->addWidget(okButton, 4, 0, 1, 2);
78 m_InformationLabel =
new QLabel(
"",
this);
79 f = m_InformationLabel->font();
81 m_InformationLabel->setFont(f);
82 layout->addWidget(m_InformationLabel, 5, 0, 1, 2);
84 connect(
this, SIGNAL(NewToolAssociated(
mitk::Tool *)),
this, SLOT(OnNewToolAssociated(
mitk::Tool *)));
137 QApplication::setOverrideCursor(Qt::BusyCursor);
140 QApplication::processEvents();
144 QApplication::setOverrideCursor(Qt::ArrowCursor);
146 for (
int i = 0; i < 60; ++i)
void Progress(unsigned int steps=1)
Sets the current amount of progress to current progress + steps.
static ProgressBar * GetInstance()
static method to get the GUI dependent ProgressBar-instance so the methods for steps to do and progre...
#define MITKSEGMENTATIONUI_EXPORT