Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
QmitkCalculateGrayValueStatisticsToolGUI.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 "
QmitkCalculateGrayValueStatisticsToolGUI.h
"
18
19
#include "
QmitkCopyToClipBoardDialog.h
"
20
21
MITK_TOOL_GUI_MACRO
(
MITKSEGMENTATIONUI_EXPORT
,
QmitkCalculateGrayValueStatisticsToolGUI
,
""
)
22
23
QmitkCalculateGrayValueStatisticsToolGUI
::
QmitkCalculateGrayValueStatisticsToolGUI
() :
QmitkToolGUI
()
24
{
25
connect(
this
, SIGNAL(NewToolAssociated(
mitk::Tool
*)),
this
, SLOT(OnNewToolAssociated(
mitk::Tool
*)));
26
}
27
28
QmitkCalculateGrayValueStatisticsToolGUI::~QmitkCalculateGrayValueStatisticsToolGUI
()
29
{
30
if
(
m_CalculateGrayValueStatisticsTool
.IsNotNull())
31
{
32
m_CalculateGrayValueStatisticsTool
->StatisticsCompleted -=
33
mitk::MessageDelegate<QmitkCalculateGrayValueStatisticsToolGUI>
(
34
this
, &
QmitkCalculateGrayValueStatisticsToolGUI::OnCalculationsDone
);
35
}
36
}
37
38
void
QmitkCalculateGrayValueStatisticsToolGUI::OnNewToolAssociated
(
mitk::Tool
*tool)
39
{
40
if
(
m_CalculateGrayValueStatisticsTool
.IsNotNull())
41
{
42
m_CalculateGrayValueStatisticsTool
->StatisticsCompleted -=
43
mitk::MessageDelegate<QmitkCalculateGrayValueStatisticsToolGUI>
(
44
this
, &
QmitkCalculateGrayValueStatisticsToolGUI::OnCalculationsDone
);
45
}
46
47
m_CalculateGrayValueStatisticsTool
=
dynamic_cast<
mitk::CalculateGrayValueStatisticsTool
*
>
(tool);
48
49
if
(
m_CalculateGrayValueStatisticsTool
.IsNotNull())
50
{
51
m_CalculateGrayValueStatisticsTool
->StatisticsCompleted +=
52
mitk::MessageDelegate<QmitkCalculateGrayValueStatisticsToolGUI>
(
53
this
, &
QmitkCalculateGrayValueStatisticsToolGUI::OnCalculationsDone
);
54
}
55
}
56
57
void
QmitkCalculateGrayValueStatisticsToolGUI::OnCalculationsDone
()
58
{
59
if
(
m_CalculateGrayValueStatisticsTool
.IsNotNull())
60
{
61
std::string report =
m_CalculateGrayValueStatisticsTool
->GetReport();
62
63
// one for linux users
64
std::cout << report << std::endl;
65
66
// one for window users
67
QmitkCopyToClipBoardDialog
*dialog =
new
QmitkCopyToClipBoardDialog
(report.c_str(), NULL);
68
dialog->show();
69
}
70
}
MITK_TOOL_GUI_MACRO
MITK_TOOL_GUI_MACRO(, QmitkPixelManipulationToolGUI,"")
mitk::Tool
Base class of all tools used by mitk::ToolManager.
Definition:
mitkTool.h:92
QmitkCalculateGrayValueStatisticsToolGUI::OnNewToolAssociated
void OnNewToolAssociated(mitk::Tool *)
Connected to signal from QmitkToolGUI. We remember the current tool here.
Definition:
QmitkCalculateGrayValueStatisticsToolGUI.cpp:38
QmitkCalculateGrayValueStatisticsToolGUI
GUI for mitk::CalculateGrayValueStatisticsTool.
Definition:
QmitkCalculateGrayValueStatisticsToolGUI.h:34
QmitkCopyToClipBoardDialog.h
QmitkCopyToClipBoardDialog
Displays read-only QTextEdit.
Definition:
QmitkCopyToClipBoardDialog.h:28
QmitkCalculateGrayValueStatisticsToolGUI::~QmitkCalculateGrayValueStatisticsToolGUI
virtual ~QmitkCalculateGrayValueStatisticsToolGUI()
Definition:
QmitkCalculateGrayValueStatisticsToolGUI.cpp:28
QmitkToolGUI
Base class for GUIs belonging to mitk::Tool classes.
Definition:
QmitkToolGUI.h:36
mitk::CalculateGrayValueStatisticsTool
Calculates some gray value statistics for segmentations.
Definition:
mitkCalculateGrayValueStatisticsTool.h:42
QmitkCalculateGrayValueStatisticsToolGUI.h
QmitkCalculateGrayValueStatisticsToolGUI::OnCalculationsDone
void OnCalculationsDone()
Reacts to signals from mitk::CalculateGrayValueStatisticsTool.
Definition:
QmitkCalculateGrayValueStatisticsToolGUI.cpp:57
QmitkCalculateGrayValueStatisticsToolGUI::m_CalculateGrayValueStatisticsTool
mitk::CalculateGrayValueStatisticsTool::Pointer m_CalculateGrayValueStatisticsTool
Definition:
QmitkCalculateGrayValueStatisticsToolGUI.h:58
mitk::MessageDelegate
Definition:
mitkMessage.h:145
MITKSEGMENTATIONUI_EXPORT
#define MITKSEGMENTATIONUI_EXPORT
Definition:
MitkSegmentationUIExports.h:15
git
MITK
Modules
SegmentationUI
Qmitk
QmitkCalculateGrayValueStatisticsToolGUI.cpp
Generated on Fri Feb 3 2017 20:52:12 for Medical Imaging Interaction Toolkit by
1.8.9.1