Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitknnUNetToolGUI Class Reference

#include <QmitknnUNetToolGUI.h>

Inheritance diagram for QmitknnUNetToolGUI:
Collaboration diagram for QmitknnUNetToolGUI:

Signals

void Operate (QString, QString, mitk::ProcessExecutor::Pointer, mitk::ProcessExecutor::ArgumentListType)
 signal for starting the segmentation which is caught by a worker thread. More...
 
- Signals inherited from QmitkToolGUI
void NewToolAssociated (mitk::Tool *)
 

Public Member Functions

 mitkClassMacro (QmitknnUNetToolGUI, 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 ()
 

Public Attributes

QCache< size_t, nnUNetCachem_Cache
 
std::unordered_map< std::string, mitk::ProcessExecutor::Pointerm_Processes
 The hash map stores all bifurcating processes' ID. More...
 

Protected Slots

void OnPreviewRequested ()
 Qt slot. More...
 
void OnDirectoryChanged (const QString &)
 Qt slot. More...
 
void OnModelChanged (const QString &)
 Qt slot. More...
 
void OnTaskChanged (const QString &)
 Qt slot. More...
 
void OnTrainerChanged (const QString &)
 Qt slot. More...
 
void OnCheckBoxChanged (int)
 Qt slot. More...
 
void SegmentationProcessFailed ()
 Qthread slot to capture failures from thread worker and shows error message. More...
 
void SegmentationResultHandler (mitk::nnUNetTool *, bool forceRender=false)
 Qthread to capture successful nnUNet segmentation. Further, renders the LabelSet image. More...
 
void OnModalitiesNumberChanged (int)
 Qt Slot. More...
 
void OnPythonPathChanged (const QString &)
 Qt Slot. More...
 
void OnRefreshPresssed ()
 Qt slot. More...
 
void OnClearCachePressed ()
 Qt slot. More...
 
void OnDownloadModel ()
 Qt slot. More...
 
void OnDownloadWorkerExit (bool, const QString)
 Qt slot. More...
 
void OnStopDownload ()
 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

 QmitknnUNetToolGUI ()
 
 ~QmitknnUNetToolGUI ()
 
void ConnectNewTool (mitk::SegWithPreviewTool *newTool) override
 
void InitializeUI (QBoxLayout *mainLayout) override
 
void EnableWidgets (bool enabled) override
 
- Protected Member Functions inherited from QmitkMultiLabelSegWithPreviewToolGUIBase
 QmitkMultiLabelSegWithPreviewToolGUIBase ()
 
 ~QmitkMultiLabelSegWithPreviewToolGUIBase ()=default
 
void SetLabelSetPreview (const mitk::LabelSetImage *preview)
 
void ActualizePreviewLabelVisibility ()
 
void DisplayTransferWidgets (bool enabled)
 To toggle visibility of "Transfer all labels" and "Transfer selected labels" radio buttons. More...
 
- 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
 

Additional Inherited Members

- 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

Definition at line 48 of file QmitknnUNetToolGUI.h.

Constructor & Destructor Documentation

◆ QmitknnUNetToolGUI()

QmitknnUNetToolGUI::QmitknnUNetToolGUI ( )
protected

◆ ~QmitknnUNetToolGUI()

QmitknnUNetToolGUI::~QmitknnUNetToolGUI ( )
protected

Member Function Documentation

◆ Clone()

Pointer QmitknnUNetToolGUI::Clone ( ) const

◆ ConnectNewTool()

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

Reimplemented from QmitkSegWithPreviewToolGUIBase.

◆ EnableWidgets()

void QmitknnUNetToolGUI::EnableWidgets ( bool  enabled)
overrideprotectedvirtual

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

◆ InitializeUI()

void QmitknnUNetToolGUI::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.

◆ mitkClassMacro()

QmitknnUNetToolGUI::mitkClassMacro ( QmitknnUNetToolGUI  ,
QmitkMultiLabelSegWithPreviewToolGUIBase   
)

◆ New()

static Pointer QmitknnUNetToolGUI::New ( )
static

◆ OnCheckBoxChanged

void QmitknnUNetToolGUI::OnCheckBoxChanged ( int  )
protectedslot

Qt slot.

◆ OnClearCachePressed

void QmitknnUNetToolGUI::OnClearCachePressed ( )
protectedslot

Qt slot.

◆ OnDirectoryChanged

void QmitknnUNetToolGUI::OnDirectoryChanged ( const QString &  )
protectedslot

Qt slot.

◆ OnDownloadModel

void QmitknnUNetToolGUI::OnDownloadModel ( )
protectedslot

Qt slot.

◆ OnDownloadWorkerExit

void QmitknnUNetToolGUI::OnDownloadWorkerExit ( bool  ,
const  QString 
)
protectedslot

Qt slot.

◆ OnModalitiesNumberChanged

void QmitknnUNetToolGUI::OnModalitiesNumberChanged ( int  )
protectedslot

Qt Slot.

◆ OnModelChanged

void QmitknnUNetToolGUI::OnModelChanged ( const QString &  )
protectedslot

Qt slot.

◆ OnPreviewRequested

void QmitknnUNetToolGUI::OnPreviewRequested ( )
protectedslot

Qt slot.

◆ OnPythonPathChanged

void QmitknnUNetToolGUI::OnPythonPathChanged ( const QString &  )
protectedslot

Qt Slot.

◆ OnRefreshPresssed

void QmitknnUNetToolGUI::OnRefreshPresssed ( )
protectedslot

Qt slot.

◆ OnStopDownload

void QmitknnUNetToolGUI::OnStopDownload ( )
protectedslot

Qt slot.

◆ OnTaskChanged

void QmitknnUNetToolGUI::OnTaskChanged ( const QString &  )
protectedslot

Qt slot.

◆ OnTrainerChanged

void QmitknnUNetToolGUI::OnTrainerChanged ( const QString &  )
protectedslot

Qt slot.

◆ Operate

void QmitknnUNetToolGUI::Operate ( QString  ,
QString  ,
mitk::ProcessExecutor::Pointer  ,
mitk::ProcessExecutor::ArgumentListType   
)
signal

signal for starting the segmentation which is caught by a worker thread.

◆ SegmentationProcessFailed

void QmitknnUNetToolGUI::SegmentationProcessFailed ( )
protectedslot

Qthread slot to capture failures from thread worker and shows error message.

◆ SegmentationResultHandler

void QmitknnUNetToolGUI::SegmentationResultHandler ( mitk::nnUNetTool ,
bool  forceRender = false 
)
protectedslot

Qthread to capture successful nnUNet segmentation. Further, renders the LabelSet image.

Member Data Documentation

◆ m_Cache

QCache<size_t, nnUNetCache> QmitknnUNetToolGUI::m_Cache

Definition at line 55 of file QmitknnUNetToolGUI.h.

◆ m_Processes

std::unordered_map<std::string, mitk::ProcessExecutor::Pointer> QmitknnUNetToolGUI::m_Processes

The hash map stores all bifurcating processes' ID.

Definition at line 63 of file QmitknnUNetToolGUI.h.


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