Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkLiveWireTool2DGUI.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "QmitkLiveWireTool2DGUI.h"
14 
16 
17 #include "mitkBaseRenderer.h"
18 #include "mitkStepper.h"
19 #include <qlabel.h>
20 #include <qlayout.h>
21 #include <qpainter.h>
22 #include <qpushbutton.h>
23 #include <qslider.h>
24 
26 
28 {
29  m_Controls.setupUi(this);
30  m_Controls.m_Information->hide();
31 
32  connect(m_Controls.m_ConfirmButton, SIGNAL(clicked()), this, SLOT(OnConfirmSegmentation()));
33  connect(m_Controls.m_ClearButton, SIGNAL(clicked()), this, SLOT(OnClearSegmentation()));
34  connect(this, SIGNAL(NewToolAssociated(mitk::Tool *)), this, SLOT(OnNewToolAssociated(mitk::Tool *)));
35  connect(m_Controls.m_InformationCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnShowInformation(bool)));
36 }
37 
39 {
40 }
41 
43 {
44  m_LiveWireTool = dynamic_cast<mitk::LiveWireTool2D *>(tool);
45 }
46 
48 {
49  if (m_LiveWireTool.IsNotNull())
50  m_LiveWireTool->ConfirmSegmentation();
51 }
52 
54 {
55  if (m_LiveWireTool.IsNotNull())
56  m_LiveWireTool->ClearSegmentation();
57 }
58 
60 {
61  m_Controls.m_Information->setVisible(on);
62 }
Base class of all tools used by mitk::ToolManager.
Definition: mitkTool.h:86
mitk::LiveWireTool2D::Pointer m_LiveWireTool
void OnNewToolAssociated(mitk::Tool *)
MITK_TOOL_GUI_MACRO(, QmitkPixelManipulationToolGUI, "")
A 2D segmentation tool based on a LiveWire approach.
GUI for mitk::LiveWireTool.
Base class for GUIs belonging to mitk::Tool classes.
Definition: QmitkToolGUI.h:32
Ui::QmitkLiveWireTool2DGUIControls m_Controls
#define MITKSEGMENTATIONUI_EXPORT