Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkSegWithPreviewToolGUIBase Class Reference

GUI base clase for tools derived from mitk::SegWithPreviewTool. More...

#include <QmitkSegWithPreviewToolGUIBase.h>

Inheritance diagram for QmitkSegWithPreviewToolGUIBase:
Collaboration diagram for QmitkSegWithPreviewToolGUIBase:

Public Member Functions

 mitkClassMacro (QmitkSegWithPreviewToolGUIBase, QmitkToolGUI)
 
Pointer Clone () const
 
virtual bool GetMode2D () const
 
- Public Member Functions inherited from QmitkToolGUI
 mitkClassMacroItkParent (QmitkToolGUI, itk::Object)
 
void SetTool (mitk::Tool *tool)
 
void Register () const override
 
void UnRegister () const ITK_NOEXCEPT ITK_OVERRIDE
 
void SetReferenceCount (int) override
 
 ~QmitkToolGUI () override
 

Protected Types

using EnableConfirmSegBtnFunctionType = std::function< bool(bool)>
 

Protected Slots

void OnNewToolAssociated (mitk::Tool *)
 
void OnAcceptPreview ()
 

Protected Member Functions

 QmitkSegWithPreviewToolGUIBase (bool mode2D)
 
 ~QmitkSegWithPreviewToolGUIBase () override
 
virtual void DisconnectOldTool (mitk::SegWithPreviewTool *oldTool)
 
virtual void ConnectNewTool (mitk::SegWithPreviewTool *newTool)
 
virtual void InitializeUI (QBoxLayout *mainLayout)
 
void BusyStateChanged (bool isBusy) override
 
virtual void EnableWidgets (bool enabled)
 
template<class TTool >
TTool * GetConnectedToolAs ()
 
void SetMergeStyle (mitk::MultiLabelSegmentation::MergeStyle mergeStyle)
 
void SetOverwriteStyle (mitk::MultiLabelSegmentation::OverwriteStyle overwriteStyle)
 
- Protected Member Functions inherited from QmitkToolGUI
 QmitkToolGUI ()=default
 

Protected Attributes

EnableConfirmSegBtnFunctionType m_EnableConfirmSegBtnFnc
 
- Protected Attributes inherited from QmitkToolGUI
mitk::Tool::Pointer m_Tool
 

Additional Inherited Members

- Signals inherited from QmitkToolGUI
void NewToolAssociated (mitk::Tool *)
 

Detailed Description

GUI base clase for tools derived from mitk::SegWithPreviewTool.

Definition at line 30 of file QmitkSegWithPreviewToolGUIBase.h.

Member Typedef Documentation

◆ EnableConfirmSegBtnFunctionType

using QmitkSegWithPreviewToolGUIBase::EnableConfirmSegBtnFunctionType = std::function<bool(bool)>
protected

Definition at line 63 of file QmitkSegWithPreviewToolGUIBase.h.

Constructor & Destructor Documentation

◆ QmitkSegWithPreviewToolGUIBase()

QmitkSegWithPreviewToolGUIBase::QmitkSegWithPreviewToolGUIBase ( bool  mode2D)
protected

◆ ~QmitkSegWithPreviewToolGUIBase()

QmitkSegWithPreviewToolGUIBase::~QmitkSegWithPreviewToolGUIBase ( )
overrideprotected

Member Function Documentation

◆ BusyStateChanged()

void QmitkSegWithPreviewToolGUIBase::BusyStateChanged ( bool  isBusy)
overrideprotectedvirtual

Reimplemented from QmitkToolGUI.

◆ Clone()

Pointer QmitkSegWithPreviewToolGUIBase::Clone ( ) const

◆ ConnectNewTool()

virtual void QmitkSegWithPreviewToolGUIBase::ConnectNewTool ( mitk::SegWithPreviewTool newTool)
protectedvirtual

◆ DisconnectOldTool()

virtual void QmitkSegWithPreviewToolGUIBase::DisconnectOldTool ( mitk::SegWithPreviewTool oldTool)
protectedvirtual

◆ EnableWidgets()

virtual void QmitkSegWithPreviewToolGUIBase::EnableWidgets ( bool  enabled)
protectedvirtual

This method is used to control/set the enabled state of the tool UI widgets. It is e.g. used if the busy state is changed (see BusyStateChanged). Override the default implementation, e.g. if a tool adds his own UI elements (normally by overriding InitializeUI()) and wants to control how the widgets are enabled/disabled.

Reimplemented in QmitknnUNetToolGUI, QmitkGrowCutToolGUI, QmitkOtsuTool3DGUI, QmitkMultiLabelSegWithPreviewToolGUIBase, QmitkMonaiLabelToolGUI, and QmitkPickingToolGUI.

◆ GetConnectedToolAs()

template<class TTool >
TTool* QmitkSegWithPreviewToolGUIBase::GetConnectedToolAs ( )
inlineprotected

Definition at line 74 of file QmitkSegWithPreviewToolGUIBase.h.

◆ GetMode2D()

virtual bool QmitkSegWithPreviewToolGUIBase::GetMode2D ( ) const
virtual

◆ InitializeUI()

virtual void QmitkSegWithPreviewToolGUIBase::InitializeUI ( QBoxLayout *  mainLayout)
protectedvirtual

This method is called by OnNewToolAssociated if the UI is initialized the first time to allow derived classes to introduce own UI code. Overwrite to change. The implementation should ensure that alle widgets needed for the tool UI are properly allocated. If one needs to eecute time (e.g. to connect events between the tool and the UI) each time the tool changes, override the functions ConnectNewTool() and DisconnectOldTool().

Reimplemented in QmitknnUNetToolGUI, QmitkTotalSegmentatorToolGUI, QmitkMedSAMToolGUI, QmitkSegmentAnythingToolGUI, QmitkOtsuTool3DGUI, QmitkGrowCutToolGUI, QmitkBinaryThresholdToolGUIBase, QmitkMultiLabelSegWithPreviewToolGUIBase, QmitkMonaiLabelToolGUI, and QmitkPickingToolGUI.

◆ mitkClassMacro()

QmitkSegWithPreviewToolGUIBase::mitkClassMacro ( QmitkSegWithPreviewToolGUIBase  ,
QmitkToolGUI   
)

◆ OnAcceptPreview

void QmitkSegWithPreviewToolGUIBase::OnAcceptPreview ( )
protectedslot

◆ OnNewToolAssociated

void QmitkSegWithPreviewToolGUIBase::OnNewToolAssociated ( mitk::Tool )
protectedslot

◆ SetMergeStyle()

void QmitkSegWithPreviewToolGUIBase::SetMergeStyle ( mitk::MultiLabelSegmentation::MergeStyle  mergeStyle)
protected

◆ SetOverwriteStyle()

void QmitkSegWithPreviewToolGUIBase::SetOverwriteStyle ( mitk::MultiLabelSegmentation::OverwriteStyle  overwriteStyle)
protected

Member Data Documentation

◆ m_EnableConfirmSegBtnFnc

EnableConfirmSegBtnFunctionType QmitkSegWithPreviewToolGUIBase::m_EnableConfirmSegBtnFnc
protected

Definition at line 64 of file QmitkSegWithPreviewToolGUIBase.h.


The documentation for this class was generated from the following file: