NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkBaseSegmentorView.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkBaseSegmentorView_h
16 #define niftkBaseSegmentorView_h
17 
18 #include <uk_ac_ucl_cmic_commonmidas_Export.h>
19 
20 // CTK for event handling.
21 #include <service/event/ctkEventHandler.h>
22 #include <service/event/ctkEventAdmin.h>
23 
24 // Berry stuff for application framework.
25 #include <berryIWorkbenchPart.h>
26 
27 // Qmitk for Qt/MITK stuff.
28 #include <niftkBaseView.h>
29 
30 namespace berry
31 {
32 class IBerryPreferences;
33 }
34 
35 namespace niftk
36 {
37 
38 class BaseSegmentorController;
39 
46 class COMMONMIDAS_EXPORT BaseSegmentorView : public BaseView
47 {
48 
49  Q_OBJECT
50 
51 public:
52 
55  virtual ~BaseSegmentorView();
56 
60  static const QString DEFAULT_COLOUR;
61 
65  static const QString DEFAULT_COLOUR_STYLE_SHEET;
66 
67 signals:
68 
72  void InteractorRequest(const ctkDictionary&);
73 
74 protected:
75 
77  virtual void Activated() override;
78 
80  virtual void Deactivated() override;
81 
83  virtual void Visible() override;
84 
86  virtual void Hidden() override;
87 
89  virtual void CreateQtPartControl(QWidget* parent) override;
90 
92  virtual BaseSegmentorController* CreateSegmentorController() = 0;
93 
95  virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer part, const QList<mitk::DataNode::Pointer>& nodes) override;
96 
98  virtual void OnPreferencesChanged(const berry::IBerryPreferences*) override;
99 
101  virtual void RetrievePreferenceValues();
102 
104  virtual QString GetPreferencesNodeName() = 0;
105 
106 private:
107 
109  BaseSegmentorController* m_SegmentorController;
110 
111 };
112 
113 }
114 
115 #endif
Definition: niftkBaseSegmentorView.h:30
static const QString DEFAULT_COLOUR
Stores the preference name of the default outline colour (defaults to pure green).
Definition: niftkBaseSegmentorView.h:60
Base view component for MIDAS Segmentation widgets.
Definition: niftkBaseSegmentorView.h:46
Base view component for plugins listening to visibility change events, focus changed events and so on...
Definition: niftkBaseView.h:47
Definition: niftkBaseSegmentorController.h:39
static const QString DEFAULT_COLOUR_STYLE_SHEET
Stores the preference name of the default outline colour style sheet (defaults to pure green)...
Definition: niftkBaseSegmentorView.h:65
Definition: niftkExceptionObject.h:21