22 #include <qapplication.h>
26 #include <qpushbutton.h>
34 QGridLayout *layout =
new QGridLayout(
this);
35 this->setContentsMargins(0, 0, 0, 0);
37 QLabel *label =
new QLabel(
"Threshold ",
this);
38 QFont f = label->font();
41 layout->addWidget(label, 0, 0);
43 QLabel *label2 =
new QLabel(
"Level ",
this);
47 layout->addWidget(label2, 2, 0);
49 m_ThresholdLabel =
new QLabel(
" 0.04",
this);
50 f = m_ThresholdLabel->font();
52 m_ThresholdLabel->setFont(f);
53 layout->addWidget(m_ThresholdLabel, 0, 1);
55 m_SliderThreshold =
new QSlider(Qt::Horizontal,
this);
56 m_SliderThreshold->setMinimum(0);
57 m_SliderThreshold->setMaximum(100);
58 m_SliderThreshold->setPageStep(1);
59 m_SliderThreshold->setValue(4);
60 connect(m_SliderThreshold, SIGNAL(valueChanged(
int)),
this, SLOT(OnSliderValueThresholdChanged(
int)));
61 layout->addWidget(m_SliderThreshold, 1, 0, 1, 2);
63 m_LevelLabel =
new QLabel(
" 0.35",
this);
64 f = m_LevelLabel->font();
66 m_LevelLabel->setFont(f);
67 layout->addWidget(m_LevelLabel, 2, 1);
69 m_SliderLevel =
new QSlider(Qt::Horizontal,
this);
70 m_SliderLevel->setMinimum(0);
71 m_SliderLevel->setMaximum(100);
72 m_SliderLevel->setPageStep(1);
73 m_SliderLevel->setValue(35);
74 connect(m_SliderLevel, SIGNAL(valueChanged(
int)),
this, SLOT(OnSliderValueLevelChanged(
int)));
75 layout->addWidget(m_SliderLevel, 3, 0, 1, 2);
77 QPushButton *okButton =
new QPushButton(
"Run Segmentation",
this);
78 connect(okButton, SIGNAL(clicked()),
this, SLOT(OnCreateSegmentation()));
80 layout->addWidget(okButton, 4, 0, 1, 2);
82 m_InformationLabel =
new QLabel(
"",
this);
83 f = m_InformationLabel->font();
85 m_InformationLabel->setFont(f);
86 layout->addWidget(m_InformationLabel, 5, 0, 1, 2);
88 connect(
this, SIGNAL(NewToolAssociated(
mitk::Tool *)),
this, SLOT(OnNewToolAssociated(
mitk::Tool *)));
141 QApplication::setOverrideCursor(Qt::BusyCursor);
144 QApplication::processEvents();
148 QApplication::setOverrideCursor(Qt::ArrowCursor);
150 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