Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "QmitkLiveWireTool2DGUI.h"
18 
20 
21 #include "mitkBaseRenderer.h"
22 #include "mitkStepper.h"
23 #include <qlabel.h>
24 #include <qlayout.h>
25 #include <qpainter.h>
26 #include <qpushbutton.h>
27 #include <qslider.h>
28 
30 
32 {
33  m_Controls.setupUi(this);
34  m_Controls.m_Information->hide();
35 
36  connect(m_Controls.m_ConfirmButton, SIGNAL(clicked()), this, SLOT(OnConfirmSegmentation()));
37  connect(m_Controls.m_ClearButton, SIGNAL(clicked()), this, SLOT(OnClearSegmentation()));
38  connect(this, SIGNAL(NewToolAssociated(mitk::Tool *)), this, SLOT(OnNewToolAssociated(mitk::Tool *)));
39  connect(m_Controls.m_InformationCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnShowInformation(bool)));
40 }
41 
43 {
44 }
45 
47 {
48  m_LiveWireTool = dynamic_cast<mitk::LiveWireTool2D *>(tool);
49 }
50 
52 {
53  if (m_LiveWireTool.IsNotNull())
54  m_LiveWireTool->ConfirmSegmentation();
55 }
56 
58 {
59  if (m_LiveWireTool.IsNotNull())
60  m_LiveWireTool->ClearSegmentation();
61 }
62 
64 {
65  m_Controls.m_Information->setVisible(on);
66 }
MITK_TOOL_GUI_MACRO(, QmitkPixelManipulationToolGUI,"")
Base class of all tools used by mitk::ToolManager.
Definition: mitkTool.h:92
mitk::LiveWireTool2D::Pointer m_LiveWireTool
void OnNewToolAssociated(mitk::Tool *)
A 2D segmentation tool based on LiveWire approach. The contour between the last user added point and ...
GUI for mitk::LiveWireTool.
Base class for GUIs belonging to mitk::Tool classes.
Definition: QmitkToolGUI.h:36
Ui::QmitkLiveWireTool2DGUIControls m_Controls
#define MITKSEGMENTATIONUI_EXPORT