diff --git a/Modules/SegmentationUI/Qmitk/QmitkFastMarchingToolGUI.cpp b/Modules/SegmentationUI/Qmitk/QmitkFastMarchingToolGUI.cpp index 08670906f7..d37040dc8b 100644 --- a/Modules/SegmentationUI/Qmitk/QmitkFastMarchingToolGUI.cpp +++ b/Modules/SegmentationUI/Qmitk/QmitkFastMarchingToolGUI.cpp @@ -1,31 +1,29 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "QmitkFastMarchingToolGUI.h" -#include "QmitkNewSegmentationDialog.h" - #include "mitkBaseRenderer.h" #include "mitkStepper.h" #include #include #include #include #include #include #include #include MITK_TOOL_GUI_MACRO(MITKSEGMENTATIONUI_EXPORT, QmitkFastMarchingToolGUI, "") QmitkFastMarchingToolGUI::QmitkFastMarchingToolGUI() : QmitkFastMarchingToolGUIBase(true) {} diff --git a/Modules/SegmentationUI/Qmitk/QmitkLiveWireTool2DGUI.cpp b/Modules/SegmentationUI/Qmitk/QmitkLiveWireTool2DGUI.cpp index f90802a78c..34eb6dfb82 100644 --- a/Modules/SegmentationUI/Qmitk/QmitkLiveWireTool2DGUI.cpp +++ b/Modules/SegmentationUI/Qmitk/QmitkLiveWireTool2DGUI.cpp @@ -1,62 +1,60 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "QmitkLiveWireTool2DGUI.h" -#include "QmitkNewSegmentationDialog.h" - #include "mitkBaseRenderer.h" #include "mitkStepper.h" #include #include #include #include #include MITK_TOOL_GUI_MACRO(MITKSEGMENTATIONUI_EXPORT, QmitkLiveWireTool2DGUI, "") QmitkLiveWireTool2DGUI::QmitkLiveWireTool2DGUI() : QmitkToolGUI() { m_Controls.setupUi(this); m_Controls.m_Information->hide(); connect(m_Controls.m_ConfirmButton, SIGNAL(clicked()), this, SLOT(OnConfirmSegmentation())); connect(m_Controls.m_ClearButton, SIGNAL(clicked()), this, SLOT(OnClearSegmentation())); connect(this, SIGNAL(NewToolAssociated(mitk::Tool *)), this, SLOT(OnNewToolAssociated(mitk::Tool *))); connect(m_Controls.m_InformationCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnShowInformation(bool))); } QmitkLiveWireTool2DGUI::~QmitkLiveWireTool2DGUI() { } void QmitkLiveWireTool2DGUI::OnNewToolAssociated(mitk::Tool *tool) { m_LiveWireTool = dynamic_cast(tool); } void QmitkLiveWireTool2DGUI::OnConfirmSegmentation() { if (m_LiveWireTool.IsNotNull()) m_LiveWireTool->ConfirmSegmentation(); } void QmitkLiveWireTool2DGUI::OnClearSegmentation() { if (m_LiveWireTool.IsNotNull()) m_LiveWireTool->ClearSegmentation(); } void QmitkLiveWireTool2DGUI::OnShowInformation(bool on) { m_Controls.m_Information->setVisible(on); } diff --git a/Modules/SegmentationUI/Qmitk/QmitkPaintbrushToolGUI.cpp b/Modules/SegmentationUI/Qmitk/QmitkPaintbrushToolGUI.cpp index 084197aa7b..fd92685a7f 100644 --- a/Modules/SegmentationUI/Qmitk/QmitkPaintbrushToolGUI.cpp +++ b/Modules/SegmentationUI/Qmitk/QmitkPaintbrushToolGUI.cpp @@ -1,119 +1,117 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "QmitkPaintbrushToolGUI.h" -#include "QmitkNewSegmentationDialog.h" - #include #include #include #include #include QmitkPaintbrushToolGUI::QmitkPaintbrushToolGUI() : QmitkToolGUI(), m_Slider(nullptr) { // create the visible widgets QBoxLayout *layout = new QHBoxLayout(this); this->setContentsMargins(0, 0, 0, 0); QLabel *label = new QLabel("Size ", this); QFont f = label->font(); f.setBold(false); label->setFont(f); layout->addWidget(label); m_SizeLabel = new QLabel(" 10", this); f = m_SizeLabel->font(); f.setBold(false); m_SizeLabel->setFont(f); layout->addWidget(m_SizeLabel); // m_Slider = new QSlider( 1, 50, 1, 10, Qt::Horizontal, this ); m_Slider = new QSlider(Qt::Horizontal, this); m_Slider->setMinimum(1); m_Slider->setMaximum(50); m_Slider->setPageStep(1); m_Slider->setValue(10); connect(m_Slider, SIGNAL(valueChanged(int)), this, SLOT(OnSliderValueChanged(int))); layout->addWidget(m_Slider); /* m_Frame = new QFrame( this ); m_Frame->setMinimumSize( QSize(50, 50) ); m_Frame->setFrameStyle( QFrame::Box || QFrame::Plain ); m_Frame->show(); layout->addWidget( m_Frame ); */ connect(this, SIGNAL(NewToolAssociated(mitk::Tool *)), this, SLOT(OnNewToolAssociated(mitk::Tool *))); } QmitkPaintbrushToolGUI::~QmitkPaintbrushToolGUI() { // !!! if (m_PaintbrushTool.IsNotNull()) { m_PaintbrushTool->SizeChanged -= mitk::MessageDelegate1(this, &QmitkPaintbrushToolGUI::OnSizeChanged); } } void QmitkPaintbrushToolGUI::OnNewToolAssociated(mitk::Tool *tool) { if (m_PaintbrushTool.IsNotNull()) { m_PaintbrushTool->SizeChanged -= mitk::MessageDelegate1(this, &QmitkPaintbrushToolGUI::OnSizeChanged); } m_PaintbrushTool = dynamic_cast(tool); if (m_PaintbrushTool.IsNotNull()) { m_PaintbrushTool->SizeChanged += mitk::MessageDelegate1(this, &QmitkPaintbrushToolGUI::OnSizeChanged); } } void QmitkPaintbrushToolGUI::OnSliderValueChanged(int value) { if (m_PaintbrushTool.IsNotNull()) { m_PaintbrushTool->SetSize(value); } VisualizePaintbrushSize(value); } void QmitkPaintbrushToolGUI::VisualizePaintbrushSize(int size) { m_SizeLabel->setText(QString("%1 ").arg(size)); /* nice, but useless. scale does not correspond to the image in a render window, so this is more or less useless */ /* QPainter p( m_Frame ); p.eraseRect( m_Frame->rect() ); int width = size; int height = size; int x = m_Frame->width() / 2 - width / 2; int y = m_Frame->height() / 2 - height / 2; p.drawEllipse( x, y, width, height ); */ } void QmitkPaintbrushToolGUI::OnSizeChanged(int current) { m_Slider->setValue(current); }