NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
MITKSegmentationView.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 MITKSegmentationView_h
16 #define MITKSegmentationView_h
17 
18 #include <QmitkMIDASBaseSegmentationFunctionality.h>
19 #include "ui_MITKSegmentationViewControls.h"
20 #include <berryIPreferences.h>
21 #include <berryIPreferencesService.h>
22 #include <berryIBerryPreferences.h>
23 
30 class MITKSegmentationView : public QmitkMIDASBaseSegmentationFunctionality
31 {
32  // this is needed for all Qt objects that should have a Qt meta-object
33  // (everything that derives from QObject and wants to have signal/slots)
34  Q_OBJECT
35 
36 public:
37 
40 
43 
45  virtual ~MITKSegmentationView();
46 
49  static const std::string VIEW_ID;
50 
52  virtual std::string GetViewID() const;
53 
54 protected slots:
55 
58 
59 protected:
60 
62  virtual void CreateQtPartControl(QWidget *parent);
63 
66  virtual void SetFocus();
67 
69  virtual void CreateConnections();
70 
72  virtual void RetrievePreferenceValues();
73 
78  virtual void EnableSegmentationWidgets(bool b);
79 
81  virtual bool IsNodeASegmentationImage(const mitk::DataNode::Pointer node);
82 
86  virtual bool CanStartSegmentationForBinaryNode(const mitk::DataNode::Pointer node);
87 
90  virtual QString GetPreferencesNodeName() { return "/uk.ac.ucl.cmic.mitksegmentation"; }
91 
92 private:
93 
95  Ui::MITKSegmentationViewControls *m_Controls;
96 
98  QGridLayout *m_Layout;
99 
101  QWidget *m_ContainerForControlsWidget;
102 
104  bool m_OutlineBinary;
105 
107  bool m_VolumeRendering;
108 };
109 
110 #endif // MITKSegmentationView_h
111 
virtual bool IsNodeASegmentationImage(const mitk::DataNode::Pointer node)
For MITK Editing, a Segmentation image should be binary and have a grey scale parent.
Definition: MITKSegmentationView.cxx:178
MITKSegmentationView()
Constructor.
Definition: MITKSegmentationView.cxx:41
virtual void EnableSegmentationWidgets(bool b)
Method to enable derived classes to turn all widgets off/on to signify when the view is considered en...
Definition: MITKSegmentationView.cxx:172
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
virtual std::string GetViewID() const
Returns the VIEW_ID = "uk.ac.ucl.cmic.mitksegmentation".
Definition: MITKSegmentationView.cxx:68
void OnCreateNewSegmentationButtonPressed()
Qt slot called when the user hits the button "New segmentation", which creates the new image...
Definition: MITKSegmentationView.cxx:200
virtual ~MITKSegmentationView()
Destructor.
Definition: MITKSegmentationView.cxx:63
virtual void CreateQtPartControl(QWidget *parent)
Called by framework, this method creates all the controls for this view.
Definition: MITKSegmentationView.cxx:79
virtual void RetrievePreferenceValues()
Retrieve's the pref values from preference service, and store locally.
Definition: MITKSegmentationView.cxx:252
A cut down version of the MITK Segmentation plugin.
Definition: MITKSegmentationView.h:30
static const std::string VIEW_ID
Each View for a plugin has its own globally unique ID, this one is "uk.ac.ucl.cmic.mitksegmentation" and the .cxx file and plugin.xml should match.
Definition: MITKSegmentationView.h:49
virtual bool CanStartSegmentationForBinaryNode(const mitk::DataNode::Pointer node)
We return true if the segmentation can be "re-started", i.e. you switch between binary images in the ...
Definition: MITKSegmentationView.cxx:195
virtual void SetFocus()
Called by framework, this method can set the focus on a specific widget, but we currently do nothing...
Definition: MITKSegmentationView.cxx:74
virtual void CreateConnections()
Creates the connections of widgets in this class to the slots in this class.
Definition: MITKSegmentationView.cxx:161
virtual QString GetPreferencesNodeName()
Returns the name of the preferences node to look up.
Definition: MITKSegmentationView.h:90
GLsizei const GLcharARB ** string
Definition: glew.h:5194