Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkOtsuTool3DGUI Class Reference

GUI for mitk::OtsuTool3D providing controls for Otsu multi-threshold segmentation. More...

#include <QmitkOtsuTool3DGUI.h>

Inheritance diagram for QmitkOtsuTool3DGUI:
Collaboration diagram for QmitkOtsuTool3DGUI:

Public Member Functions

 mitkClassMacro (QmitkOtsuTool3DGUI, 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)
 Associates the given tool with this GUI, emitting NewToolAssociated. More...
 
void SetMultiLabelInspector (QmitkMultiLabelInspector *inspector)
 Provides the segmentation view's label inspector to this GUI. More...
 
QmitkMultiLabelInspector * GetMultiLabelInspector () const
 Returns the inspector associated with this GUI, or null if none. More...
 
void Register () const override
 Intentional no-op; prevents ITK reference counting from interfering with Qt ownership. More...
 
void UnRegister () const ITK_NOEXCEPT ITK_OVERRIDE
 Intentional no-op; prevents ITK reference counting from interfering with Qt ownership. More...
 
void SetReferenceCount (int) override
 Intentional no-op; prevents ITK reference counting from interfering with Qt ownership. More...
 
 ~QmitkToolGUI () override
 

Static Public Member Functions

static Pointer New ()
 

Protected Slots

void OnPreviewBtnClicked ()
 
void OnRegionSpinboxChanged (int)
 
- 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 ()
 
void OnPreviewOpacityChanged (int value)
 
void OnPreviewVisibilityToggled (bool checked)
 

Protected Member Functions

 QmitkOtsuTool3DGUI ()
 
 ~QmitkOtsuTool3DGUI ()
 
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::MultiLabelSegmentation *preview)
 
void ActualizePreviewLabelVisibility ()
 
void DisplayTransferWidgets (bool enabled)
 Toggles visibility of "Transfer all labels" and "Transfer selected labels" radio buttons. More...
 
- Protected Member Functions inherited from QmitkSegWithPreviewToolGUIBase
 QmitkSegWithPreviewToolGUIBase (bool mode2D, bool enableProcessingOfAllTimeSteps=true)
 
 ~QmitkSegWithPreviewToolGUIBase () override
 
virtual void DisconnectOldTool (mitk::SegWithPreviewTool *oldTool)
 
void BusyStateChanged (bool isBusy) override
 Called when the tool's busy state changes. Override to enable/disable UI elements. More...
 
template<class TTool >
TTool * GetConnectedToolAs ()
 
void SetMergeStyle (mitk::MultiLabelSegmentation::MergeStyle mergeStyle)
 
void SetOverwriteStyle (mitk::MultiLabelSegmentation::OverwriteStyle overwriteStyle)
 
QPushButton * GetConfirmSegmentationButton () const
 
QCheckBox * GetPreviewVisibilityCheckBox () const
 
QLabel * GetPreviewLabel () const
 
- Protected Member Functions inherited from QmitkToolGUI
 QmitkToolGUI ()=default
 

Protected Attributes

std::unique_ptr< Ui::QmitkOtsuToolWidgetControls > m_Controls
 
bool m_FirstPreviewComputation
 
EnableConfirmSegBtnFunctionType m_SuperclassEnableConfirmSegBtnFnc
 
- Protected Attributes inherited from QmitkSegWithPreviewToolGUIBase
EnableConfirmSegBtnFunctionType m_EnableConfirmSegBtnFnc
 
- Protected Attributes inherited from QmitkToolGUI
mitk::Tool::Pointer m_Tool
 
QmitkMultiLabelInspector * m_MultiLabelInspector
 

Additional Inherited Members

- Signals inherited from QmitkToolGUI
void NewToolAssociated (mitk::Tool *)
 Emitted when a new tool is associated with this GUI via SetTool(). More...
 
- Protected Types inherited from QmitkSegWithPreviewToolGUIBase
using EnableConfirmSegBtnFunctionType = std::function< bool(bool)>
 

Detailed Description

GUI for mitk::OtsuTool3D providing controls for Otsu multi-threshold segmentation.

Provides a spin box for the number of regions, a preview button, and advanced settings for adjusting the Otsu algorithm parameters.

See also
mitk::OtsuTool3D
QmitkMultiLabelSegWithPreviewToolGUIBase

Definition at line 35 of file QmitkOtsuTool3DGUI.h.

Constructor & Destructor Documentation

◆ QmitkOtsuTool3DGUI()

QmitkOtsuTool3DGUI::QmitkOtsuTool3DGUI ( )
protected

◆ ~QmitkOtsuTool3DGUI()

QmitkOtsuTool3DGUI::~QmitkOtsuTool3DGUI ( )
protected

Member Function Documentation

◆ Clone()

Pointer QmitkOtsuTool3DGUI::Clone ( ) const

◆ ConnectNewTool()

void QmitkOtsuTool3DGUI::ConnectNewTool ( mitk::SegWithPreviewTool *  newTool)
overrideprotectedvirtual

Reimplemented from QmitkSegWithPreviewToolGUIBase.

◆ EnableWidgets()

void QmitkOtsuTool3DGUI::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 QmitkOtsuTool3DGUI::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()

QmitkOtsuTool3DGUI::mitkClassMacro ( QmitkOtsuTool3DGUI  ,
QmitkMultiLabelSegWithPreviewToolGUIBase   
)

◆ New()

static Pointer QmitkOtsuTool3DGUI::New ( )
static

◆ OnPreviewBtnClicked

void QmitkOtsuTool3DGUI::OnPreviewBtnClicked ( )
protectedslot

◆ OnRegionSpinboxChanged

void QmitkOtsuTool3DGUI::OnRegionSpinboxChanged ( int  )
protectedslot

Member Data Documentation

◆ m_Controls

std::unique_ptr<Ui::QmitkOtsuToolWidgetControls> QmitkOtsuTool3DGUI::m_Controls
protected

Definition at line 63 of file QmitkOtsuTool3DGUI.h.

◆ m_FirstPreviewComputation

bool QmitkOtsuTool3DGUI::m_FirstPreviewComputation
protected

Definition at line 65 of file QmitkOtsuTool3DGUI.h.

◆ m_SuperclassEnableConfirmSegBtnFnc

EnableConfirmSegBtnFunctionType QmitkOtsuTool3DGUI::m_SuperclassEnableConfirmSegBtnFnc
protected

Definition at line 66 of file QmitkOtsuTool3DGUI.h.


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