15 #ifndef niftkBaseSegmentorController_h
16 #define niftkBaseSegmentorController_h
18 #include <niftkMIDASGuiExports.h>
23 #include <mitkDataNode.h>
24 #include <mitkToolManager.h>
35 class BaseSegmentorGUI;
52 virtual void SetupGUI(QWidget* parent)
override;
55 mitk::ToolManager* GetToolManager()
const;
57 template <
class ToolType>
58 ToolType* GetToolByType();
62 virtual bool EventFilter(
const mitk::StateEvent* stateEvent)
const override;
66 virtual bool EventFilter(mitk::InteractionEvent*
event)
const override;
69 const QColor& GetDefaultSegmentationColour()
const;
72 void SetDefaultSegmentationColour(
const QColor& defaultSegmentationColour);
75 virtual void OnViewGetsActivated()
override;
80 virtual void OnActiveToolChanged();
85 std::vector<mitk::DataNode*> GetWorkingData();
89 mitk::Image* GetWorkingImage(
int index);
92 mitk::DataNode* GetReferenceNode();
96 mitk::Image* GetReferenceImage();
101 mitk::DataNode* FindReferenceNodeFromSegmentationNode(
const mitk::DataNode::Pointer segmentationNode);
104 void SetReferenceImageSelected();
107 virtual bool IsAReferenceImage(
const mitk::DataNode::Pointer node);
110 virtual bool IsASegmentationImage(
const mitk::DataNode::Pointer node);
113 virtual bool IsAWorkingImage(
const mitk::DataNode::Pointer node);
116 virtual std::vector<mitk::DataNode*> GetWorkingDataFromSegmentationNode(
const mitk::DataNode::Pointer node);
119 virtual mitk::DataNode* GetSegmentationNodeFromWorkingData(
const mitk::DataNode::Pointer node);
122 virtual bool CanStartSegmentationForBinaryNode(
const mitk::DataNode::Pointer node) = 0;
125 virtual void ApplyDisplayOptions(mitk::DataNode* node);
130 int GetReferenceImageSliceAxis();
139 int GetReferenceImageSliceIndex();
142 int GetReferenceImageSliceUpDirection();
148 virtual mitk::DataNode* CreateNewSegmentation();
154 bool HasInitialisedWorkingData();
158 virtual void OnDataManagerSelectionChanged(
const QList<mitk::DataNode::Pointer>& nodes);
163 virtual void OnNewSegmentationButtonClicked() = 0;
168 virtual void SetToolManagerSelection(
const mitk::DataNode* referenceData,
const std::vector<mitk::DataNode*>& workingDataNodes);
170 mitk::ToolManager::Pointer m_ToolManager;
175 QColor m_DefaultSegmentationColour;
181 bool m_CursorIsVisibleWhenToolsAreOff;
189 template <
class ToolType>
192 int toolId = m_ToolManager->GetToolIdByToolType<ToolType>();
193 return dynamic_cast<ToolType*
>(m_ToolManager->GetToolById(toolId));
ImageOrientation
Describes the different types of orientation, axial, sagittal, coronal, that can be achieved in the D...
Definition: niftkImageOrientation.h:26
Public interface to QmitkBaseView.
Definition: niftkIBaseView.h:39
Base view component for MIDAS Segmentation widgets.
Definition: niftkBaseSegmentorView.h:46
StateMachineEventFilter represents a condition that has to be fulfilled so that an event is processed...
Definition: niftkStateMachineEventFilter.h:41
Definition: niftkBaseController.h:43
Base class for GUI controls on MIDAS segmentor views.
Definition: niftkBaseSegmentorGUI.h:36
Definition: niftkBaseSegmentorController.h:39
GLuint index
Definition: glew.h:1798
Some utilities to help with MIDAS conventions on orientation.
cl_event event
Definition: glew.h:3231
Definition: niftkExceptionObject.h:21
ToolType * GetToolByType()
Definition: niftkBaseSegmentorController.h:190