NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkMorphologicalSegmentorController.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 niftkMorphologicalSegmentorController_h
16 #define niftkMorphologicalSegmentorController_h
17 
18 #include <niftkMIDASGuiExports.h>
19 
21 
23 
24 
25 namespace niftk
26 {
27 
28 class MorphologicalSegmentorGUI;
29 
31 class NIFTKMIDASGUI_EXPORT MorphologicalSegmentorController : public BaseSegmentorController
32 {
33  Q_OBJECT
34 
35 public:
36 
39 
42  virtual void SetupGUI(QWidget* parent) override;
43 
46  void OnViewGetsClosed();
47 
49  virtual void OnNodeVisibilityChanged(const mitk::DataNode* node, const mitk::BaseRenderer* renderer) override;
50 
52  virtual void OnNodeRemoved(const mitk::DataNode* node) override;
53 
56  virtual void OnSegmentationEdited(int imageIndex);
57 
58 protected:
59 
61  virtual bool IsASegmentationImage(const mitk::DataNode::Pointer node) override;
62 
64  virtual bool IsAWorkingImage(const mitk::DataNode::Pointer node) override;
65 
67  virtual std::vector<mitk::DataNode*> GetWorkingDataFromSegmentationNode(const mitk::DataNode::Pointer node) override;
68 
70  virtual mitk::DataNode* GetSegmentationNodeFromWorkingData(const mitk::DataNode::Pointer node) override;
71 
73  virtual bool CanStartSegmentationForBinaryNode(const mitk::DataNode::Pointer node) override;
74 
76  virtual BaseGUI* CreateGUI(QWidget* parent) override;
77 
80  virtual void OnDataManagerSelectionChanged(const QList<mitk::DataNode::Pointer>& nodes) override;
81 
82 protected slots:
83 
85  virtual void OnNewSegmentationButtonClicked() override;
86 
88  void OnThresholdingValuesChanged(double lowerThreshold, double upperThreshold, int axialSliceNumber);
89 
91  void OnErosionsValuesChanged(double upperThreshold, int numberOfErosions);
92 
94  void OnDilationsValuesChanged(double lowerPercentage, double upperPercentage, int numberOfDilations);
95 
97  void OnRethresholdingValuesChanged(int boxSize);
98 
100  void OnTabChanged(int i);
101 
103  void OnOKButtonClicked();
104 
106  void OnRestartButtonClicked();
107 
109  void OnCancelButtonClicked();
110 
111 private:
112 
114  mitk::DataNode::Pointer CreateAxialCutOffPlaneNode(const mitk::Image* referenceImage);
115 
117  void SetSegmentationNodePropsFromReferenceImage();
118 
120  void SetControlsFromReferenceImage();
121 
123  void SetControlsFromSegmentationNodeProps();
124 
126  MorphologicalSegmentorGUI* m_MorphologicalSegmentorGUI;
127 
129  MorphologicalSegmentorPipelineManager::Pointer m_PipelineManager;
130 
132  int m_TabIndex;
133 
134 };
135 
136 }
137 
138 #endif
Implements a few Qt specific things that are of no interest to the MITK view class.
Definition: niftkMorphologicalSegmentorGUI.h:31
Definition: niftkMorphologicalSegmentorController.h:31
Public interface to QmitkBaseView.
Definition: niftkIBaseView.h:39
Base class for GUI controls on BlueBerry views.
Definition: niftkBaseGUI.h:29
Definition: niftkBaseSegmentorController.h:39
Definition: niftkExceptionObject.h:21