Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkMedSAMToolGUI Class Reference

GUI for mitk::MedSAMTool. More...

#include <QmitkMedSAMToolGUI.h>

Inheritance diagram for QmitkMedSAMToolGUI:
Collaboration diagram for QmitkMedSAMToolGUI:

Public Member Functions

 mitkClassMacro (QmitkMedSAMToolGUI, QmitkSegWithPreviewToolGUIBase)
 
Pointer Clone () const
 
void EnableAll (bool)
 Enable (or Disable) GUI elements. Currently, on the activate button is affected. More...
 
void WriteStatusMessage (const QString &)
 Writes any message in white on the tool pane. More...
 
void WriteErrorMessage (const QString &)
 Writes any message in red on the tool pane. More...
 
void ShowProgressBar (bool)
 Enable (or Disable) progressbar on GUI. More...
 
bool ActivateSAMDaemon ()
 Requests the tool class to spawn the SAM python daemon process. Waits until the daemon is started. More...
 
void OnPreferenceChangedEvent (const mitk::IPreferences::ChangeEvent &)
 Function to listen to preference emitters. More...
 
void ShowErrorMessage (const std::string &, QMessageBox::Icon=QMessageBox::Critical)
 Creates a QMessage object and shows on screen. More...
 
bool ValidatePrefences ()
 Checks if the preferences are correctly set by the user. More...
 
- Public Member Functions inherited from QmitkSegWithPreviewToolGUIBase
 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
 

Static Public Member Functions

static Pointer New ()
 

Protected Slots

void OnActivateBtnClicked ()
 Qt Slot. More...
 
void OnPreviewBtnClicked ()
 Qt Slot. More...
 
void OnResetPicksClicked ()
 Qt Slot. More...
 
- Protected Slots inherited from QmitkSegWithPreviewToolGUIBase
void OnNewToolAssociated (mitk::Tool *)
 
void OnAcceptPreview ()
 

Protected Member Functions

 QmitkMedSAMToolGUI ()
 
 ~QmitkMedSAMToolGUI ()
 
void InitializeUI (QBoxLayout *mainLayout) override
 
void StatusMessageListener (const std::string &)
 Function to listen to tool class status emitters. More...
 
- Protected Member Functions inherited from QmitkSegWithPreviewToolGUIBase
 QmitkSegWithPreviewToolGUIBase (bool mode2D)
 
 ~QmitkSegWithPreviewToolGUIBase () override
 
virtual void DisconnectOldTool (mitk::SegWithPreviewTool *oldTool)
 
virtual void ConnectNewTool (mitk::SegWithPreviewTool *newTool)
 
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
 

Additional Inherited Members

- Signals inherited from QmitkToolGUI
void NewToolAssociated (mitk::Tool *)
 
- Protected Types inherited from QmitkSegWithPreviewToolGUIBase
using EnableConfirmSegBtnFunctionType = std::function< bool(bool)>
 
- Protected Attributes inherited from QmitkSegWithPreviewToolGUIBase
EnableConfirmSegBtnFunctionType m_EnableConfirmSegBtnFnc
 
- Protected Attributes inherited from QmitkToolGUI
mitk::Tool::Pointer m_Tool
 

Detailed Description

GUI for mitk::MedSAMTool.

Definition at line 26 of file QmitkMedSAMToolGUI.h.

Constructor & Destructor Documentation

◆ QmitkMedSAMToolGUI()

QmitkMedSAMToolGUI::QmitkMedSAMToolGUI ( )
protected

◆ ~QmitkMedSAMToolGUI()

QmitkMedSAMToolGUI::~QmitkMedSAMToolGUI ( )
protected

Member Function Documentation

◆ ActivateSAMDaemon()

bool QmitkMedSAMToolGUI::ActivateSAMDaemon ( )

Requests the tool class to spawn the SAM python daemon process. Waits until the daemon is started.

Returns
bool

◆ Clone()

Pointer QmitkMedSAMToolGUI::Clone ( ) const

◆ EnableAll()

void QmitkMedSAMToolGUI::EnableAll ( bool  )

Enable (or Disable) GUI elements. Currently, on the activate button is affected.

◆ InitializeUI()

void QmitkMedSAMToolGUI::InitializeUI ( QBoxLayout *  mainLayout)
overrideprotectedvirtual

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 from QmitkSegWithPreviewToolGUIBase.

◆ mitkClassMacro()

QmitkMedSAMToolGUI::mitkClassMacro ( QmitkMedSAMToolGUI  ,
QmitkSegWithPreviewToolGUIBase   
)

◆ New()

static Pointer QmitkMedSAMToolGUI::New ( )
static

◆ OnActivateBtnClicked

void QmitkMedSAMToolGUI::OnActivateBtnClicked ( )
protectedslot

Qt Slot.

◆ OnPreferenceChangedEvent()

void QmitkMedSAMToolGUI::OnPreferenceChangedEvent ( const mitk::IPreferences::ChangeEvent )

Function to listen to preference emitters.

◆ OnPreviewBtnClicked

void QmitkMedSAMToolGUI::OnPreviewBtnClicked ( )
protectedslot

Qt Slot.

◆ OnResetPicksClicked

void QmitkMedSAMToolGUI::OnResetPicksClicked ( )
protectedslot

Qt Slot.

◆ ShowErrorMessage()

void QmitkMedSAMToolGUI::ShowErrorMessage ( const std::string &  ,
QMessageBox::Icon  = QMessageBox::Critical 
)

Creates a QMessage object and shows on screen.

◆ ShowProgressBar()

void QmitkMedSAMToolGUI::ShowProgressBar ( bool  )

Enable (or Disable) progressbar on GUI.

◆ StatusMessageListener()

void QmitkMedSAMToolGUI::StatusMessageListener ( const std::string &  )
protected

Function to listen to tool class status emitters.

◆ ValidatePrefences()

bool QmitkMedSAMToolGUI::ValidatePrefences ( )

Checks if the preferences are correctly set by the user.

Returns
bool

◆ WriteErrorMessage()

void QmitkMedSAMToolGUI::WriteErrorMessage ( const QString &  )

Writes any message in red on the tool pane.

◆ WriteStatusMessage()

void QmitkMedSAMToolGUI::WriteStatusMessage ( const QString &  )

Writes any message in white on the tool pane.


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