Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkSurfaceBasedInterpolatorWidget.h
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 #ifndef QmitkSurfaceBasedInterpolatorWidgetWidget_h_Included
18 #define QmitkSurfaceBasedInterpolatorWidgetWidget_h_Included
19 
21 #include "mitkDataNode.h"
22 #include "mitkDataStorage.h"
23 #include "mitkLabelSetImage.h"
25 
26 #include <map>
27 
28 #include <QWidget>
29 
30 // For running 3D interpolation in background
31 #include <QFuture>
32 #include <QFutureWatcher>
33 #include <QTimer>
34 #include <QtConcurrentRun>
35 
36 #include "ui_QmitkSurfaceBasedInterpolatorWidgetGUIControls.h"
37 
38 namespace mitk
39 {
40  class ToolManager;
41 }
42 
59 {
60  Q_OBJECT
61 
62 public:
63  QmitkSurfaceBasedInterpolatorWidget(QWidget *parent = 0, const char *name = 0);
65 
66  void SetDataStorage(mitk::DataStorage &storage);
67 
68  void OnToolManagerWorkingDataModified();
69 
73  void OnSurfaceInterpolationInfoChanged(const itk::EventObject &);
74 
78  void ShowInterpolationResult(bool);
79 
80  Ui::QmitkSurfaceBasedInterpolatorWidgetGUIControls m_Controls;
81 
82 public slots:
83 
87  void OnToggleWidgetActivation(bool);
88 
89 protected slots:
90 
91  void OnAcceptInterpolationClicked();
92 
93  void OnSurfaceInterpolationFinished();
94 
95  void OnRunInterpolation();
96 
97  void OnShowMarkers(bool);
98 
99  void StartUpdateInterpolationTimer();
100 
101  void StopUpdateInterpolationTimer();
102 
103  void ChangeSurfaceColor();
104 
105 private:
106  mitk::SurfaceBasedInterpolationController::Pointer m_SurfaceBasedInterpolatorController;
107 
108  mitk::ToolManager *m_ToolManager;
109 
110  bool m_Activated;
111 
112  unsigned int m_SurfaceInterpolationInfoChangedObserverTag;
113 
114  mitk::DataNode::Pointer m_InterpolatedSurfaceNode;
115  mitk::DataNode::Pointer m_3DContourNode;
116 
118 
119  mitk::LabelSetImage::Pointer m_WorkingImage;
120 
121  QFuture<void> m_Future;
122  QFutureWatcher<void> m_Watcher;
123  QTimer *m_Timer;
124 };
125 
126 #endif
Ui::QmitkSurfaceBasedInterpolatorWidgetGUIControls m_Controls
Data management class that handles 'was created by' relations.
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
mitk::DataStorage::Pointer m_DataStorage
#define MITKSEGMENTATIONUI_EXPORT
Manages and coordinates instances of mitk::Tool.