Medical Imaging Interaction Toolkit  2023.12.99-fc5b483f
Medical Imaging Interaction Toolkit
QmitkTotalSegmentatorToolGUI Class Reference

GUI for mitk::TotalSegmentatorTool. More...

#include <QmitkTotalSegmentatorToolGUI.h>

Inheritance diagram for QmitkTotalSegmentatorToolGUI:
Collaboration diagram for QmitkTotalSegmentatorToolGUI:

Public Member Functions

 mitkClassMacro (QmitkTotalSegmentatorToolGUI, QmitkMultiLabelSegWithPreviewToolGUIBase)
 
Pointer Clone () const
 
- Public Member Functions inherited from QmitkMultiLabelSegWithPreviewToolGUIBase
 mitkClassMacro (QmitkMultiLabelSegWithPreviewToolGUIBase, QmitkSegWithPreviewToolGUIBase)
 
- 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 OnPreviewBtnClicked ()
 Qt Slot. More...
 
void OnPythonPathChanged (const QString &)
 Qt Slot. More...
 
std::pair< QString, QString > OnSystemPythonChanged (const QString &)
 Qt Slot. More...
 
void OnInstallBtnClicked ()
 Qt Slot. More...
 
void OnOverrideChecked (int)
 Qt Slot. More...
 
void OnClearInstall ()
 Qt Slot. More...
 
- Protected Slots inherited from QmitkMultiLabelSegWithPreviewToolGUIBase
void OnLabelSelectionChanged (const QmitkSimpleLabelSetListWidget::LabelVectorType &selectedLabels)
 
void OnRadioTransferAllClicked (bool checked)
 
- Protected Slots inherited from QmitkSegWithPreviewToolGUIBase
void OnNewToolAssociated (mitk::Tool *)
 
void OnAcceptPreview ()
 

Protected Member Functions

 QmitkTotalSegmentatorToolGUI ()
 
 ~QmitkTotalSegmentatorToolGUI ()=default
 
void ConnectNewTool (mitk::SegWithPreviewTool *newTool) override
 
void InitializeUI (QBoxLayout *mainLayout) override
 
void EnableAll (bool)
 Enable (or Disable) GUI elements. More...
 
void AutoParsePythonPaths ()
 Searches and parses paths of python virtual enviroments from predefined lookout locations. More...
 
bool IsTotalSegmentatorInstalled (const QString &)
 Checks if TotalSegmentator command is valid in the selected python virtual environment. More...
 
void ShowErrorMessage (const std::string &, QMessageBox::Icon=QMessageBox::Critical)
 Creates a QMessage object and shows on screen. 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 SetGPUInfo ()
 Adds GPU information to the gpu combo box. In case, there aren't any GPUs avaialble, the combo box will be rendered editable. More...
 
unsigned int FetchSelectedGPUFromUI () const
 Returns GPU id of the selected GPU from the Combo box. More...
 
QString GetPythonPathFromUI (const QString &) const
 Get the virtual env path from UI combobox removing any extra special characters. More...
 
- Protected Member Functions inherited from QmitkMultiLabelSegWithPreviewToolGUIBase
 QmitkMultiLabelSegWithPreviewToolGUIBase ()
 
 ~QmitkMultiLabelSegWithPreviewToolGUIBase ()=default
 
void EnableWidgets (bool enabled) override
 
void SetLabelSetPreview (const mitk::LabelSetImage *preview)
 
void ActualizePreviewLabelVisibility ()
 
- Protected Member Functions inherited from QmitkSegWithPreviewToolGUIBase
 QmitkSegWithPreviewToolGUIBase (bool mode2D)
 
 ~QmitkSegWithPreviewToolGUIBase () override
 
virtual void DisconnectOldTool (mitk::SegWithPreviewTool *oldTool)
 
void BusyStateChanged (bool isBusy) override
 
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

QSettings m_Settings
 For storing values like Python path across sessions. More...
 
QString m_PythonPath
 
QmitkGPULoader m_GpuLoader
 
Ui_QmitkTotalSegmentatorToolGUIControls m_Controls
 
bool m_FirstPreviewComputation
 
bool m_IsInstalled
 
EnableConfirmSegBtnFunctionType m_SuperclassEnableConfirmSegBtnFnc
 
const std::string WARNING_TOTALSEG_NOT_FOUND
 
const QStringList VALID_TASKS
 
QmitkTotalSegmentatorToolInstaller m_Installer
 
- Protected Attributes inherited from QmitkSegWithPreviewToolGUIBase
EnableConfirmSegBtnFunctionType m_EnableConfirmSegBtnFnc
 
- Protected Attributes inherited from QmitkToolGUI
mitk::Tool::Pointer m_Tool
 

Additional Inherited Members

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

Detailed Description

GUI for mitk::TotalSegmentatorTool.

See also
mitk::

Definition at line 53 of file QmitkTotalSegmentatorToolGUI.h.

Constructor & Destructor Documentation

◆ QmitkTotalSegmentatorToolGUI()

QmitkTotalSegmentatorToolGUI::QmitkTotalSegmentatorToolGUI ( )
protected

◆ ~QmitkTotalSegmentatorToolGUI()

QmitkTotalSegmentatorToolGUI::~QmitkTotalSegmentatorToolGUI ( )
protecteddefault

Member Function Documentation

◆ AutoParsePythonPaths()

void QmitkTotalSegmentatorToolGUI::AutoParsePythonPaths ( )
protected

Searches and parses paths of python virtual enviroments from predefined lookout locations.

◆ Clone()

Pointer QmitkTotalSegmentatorToolGUI::Clone ( ) const

◆ ConnectNewTool()

void QmitkTotalSegmentatorToolGUI::ConnectNewTool ( mitk::SegWithPreviewTool newTool)
overrideprotectedvirtual

Reimplemented from QmitkSegWithPreviewToolGUIBase.

◆ EnableAll()

void QmitkTotalSegmentatorToolGUI::EnableAll ( bool  )
protected

Enable (or Disable) GUI elements.

◆ FetchSelectedGPUFromUI()

unsigned int QmitkTotalSegmentatorToolGUI::FetchSelectedGPUFromUI ( ) const
protected

Returns GPU id of the selected GPU from the Combo box.

Returns
unsigned int

◆ GetPythonPathFromUI()

QString QmitkTotalSegmentatorToolGUI::GetPythonPathFromUI ( const QString &  ) const
protected

Get the virtual env path from UI combobox removing any extra special characters.

Returns
QString

◆ InitializeUI()

void QmitkTotalSegmentatorToolGUI::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 QmitkMultiLabelSegWithPreviewToolGUIBase.

◆ IsTotalSegmentatorInstalled()

bool QmitkTotalSegmentatorToolGUI::IsTotalSegmentatorInstalled ( const QString &  )
protected

Checks if TotalSegmentator command is valid in the selected python virtual environment.

Returns
bool

◆ mitkClassMacro()

QmitkTotalSegmentatorToolGUI::mitkClassMacro ( QmitkTotalSegmentatorToolGUI  ,
QmitkMultiLabelSegWithPreviewToolGUIBase   
)

◆ New()

static Pointer QmitkTotalSegmentatorToolGUI::New ( )
static

◆ OnClearInstall

void QmitkTotalSegmentatorToolGUI::OnClearInstall ( )
protectedslot

Qt Slot.

◆ OnInstallBtnClicked

void QmitkTotalSegmentatorToolGUI::OnInstallBtnClicked ( )
protectedslot

Qt Slot.

◆ OnOverrideChecked

void QmitkTotalSegmentatorToolGUI::OnOverrideChecked ( int  )
protectedslot

Qt Slot.

◆ OnPreviewBtnClicked

void QmitkTotalSegmentatorToolGUI::OnPreviewBtnClicked ( )
protectedslot

Qt Slot.

◆ OnPythonPathChanged

void QmitkTotalSegmentatorToolGUI::OnPythonPathChanged ( const QString &  )
protectedslot

Qt Slot.

◆ OnSystemPythonChanged

std::pair<QString, QString> QmitkTotalSegmentatorToolGUI::OnSystemPythonChanged ( const QString &  )
protectedslot

Qt Slot.

◆ SetGPUInfo()

void QmitkTotalSegmentatorToolGUI::SetGPUInfo ( )
protected

Adds GPU information to the gpu combo box. In case, there aren't any GPUs avaialble, the combo box will be rendered editable.

◆ ShowErrorMessage()

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

Creates a QMessage object and shows on screen.

◆ WriteErrorMessage()

void QmitkTotalSegmentatorToolGUI::WriteErrorMessage ( const QString &  )
protected

Writes any message in red on the tool pane.

◆ WriteStatusMessage()

void QmitkTotalSegmentatorToolGUI::WriteStatusMessage ( const QString &  )
protected

Writes any message in white on the tool pane.

Member Data Documentation

◆ m_Controls

Ui_QmitkTotalSegmentatorToolGUIControls QmitkTotalSegmentatorToolGUI::m_Controls
protected

Definition at line 163 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_FirstPreviewComputation

bool QmitkTotalSegmentatorToolGUI::m_FirstPreviewComputation
protected

Definition at line 164 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_GpuLoader

QmitkGPULoader QmitkTotalSegmentatorToolGUI::m_GpuLoader
protected

Definition at line 162 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_Installer

QmitkTotalSegmentatorToolInstaller QmitkTotalSegmentatorToolGUI::m_Installer
protected

Definition at line 180 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_IsInstalled

bool QmitkTotalSegmentatorToolGUI::m_IsInstalled
protected

Definition at line 165 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_PythonPath

QString QmitkTotalSegmentatorToolGUI::m_PythonPath
protected

Definition at line 161 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_Settings

QSettings QmitkTotalSegmentatorToolGUI::m_Settings
protected

For storing values like Python path across sessions.

Definition at line 159 of file QmitkTotalSegmentatorToolGUI.h.

◆ m_SuperclassEnableConfirmSegBtnFnc

EnableConfirmSegBtnFunctionType QmitkTotalSegmentatorToolGUI::m_SuperclassEnableConfirmSegBtnFnc
protected

Definition at line 166 of file QmitkTotalSegmentatorToolGUI.h.

◆ VALID_TASKS

const QStringList QmitkTotalSegmentatorToolGUI::VALID_TASKS
protected

Definition at line 171 of file QmitkTotalSegmentatorToolGUI.h.

◆ WARNING_TOTALSEG_NOT_FOUND

const std::string QmitkTotalSegmentatorToolGUI::WARNING_TOTALSEG_NOT_FOUND
protected

Definition at line 168 of file QmitkTotalSegmentatorToolGUI.h.


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