Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ToolCommand Class Reference

ITK command for tracking progress of segmentation tool operations. More...

#include <mitkToolCommand.h>

Inheritance diagram for mitk::ToolCommand:
Collaboration diagram for mitk::ToolCommand:

Public Types

typedef ToolCommand Self
 
typedef itk::Command Superclass
 
typedef itk::SmartPointer< Self > Pointer
 

Public Member Functions

Pointer Clone () const
 
void Execute (itk::Object *caller, const itk::EventObject &event) override
 Handles events from ITK filters (e.g. ProgressEvent, IterationEvent). More...
 
void Execute (const itk::Object *object, const itk::EventObject &event) override
 Const version of Execute (not implemented). More...
 
void AddStepsToDo (int steps)
 Adds new steps to the progress bar total. More...
 
void SetProgress (int steps)
 Sets the progress to the given number of completed steps. More...
 
double GetCurrentProgressValue ()
 Returns the current progress value. More...
 
void SetStopProcessing (bool value)
 Sets the stop processing flag to abort the current operation. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ToolCommand ()
 

Detailed Description

ITK command for tracking progress of segmentation tool operations.

This command can be registered as an observer on ITK filters to receive ProgressEvent and IterationEvent notifications. It updates the MITK progress bar accordingly.

See also
SegWithPreviewTool, ProgressBar

Definition at line 31 of file mitkToolCommand.h.

Member Typedef Documentation

◆ Pointer

◆ Self

Definition at line 34 of file mitkToolCommand.h.

◆ Superclass

typedef itk::Command mitk::ToolCommand::Superclass

Definition at line 35 of file mitkToolCommand.h.

Constructor & Destructor Documentation

◆ ToolCommand()

mitk::ToolCommand::ToolCommand ( )
protected

Member Function Documentation

◆ AddStepsToDo()

void mitk::ToolCommand::AddStepsToDo ( int  steps)

Adds new steps to the progress bar total.

Parameters
[in]stepsNumber of steps to add.

◆ Clone()

Pointer mitk::ToolCommand::Clone ( ) const

◆ Execute() [1/2]

void mitk::ToolCommand::Execute ( const itk::Object *  object,
const itk::EventObject &  event 
)
override

Const version of Execute (not implemented).

Parameters
[in]objectThe ITK object that triggered the event.
[in]eventThe event object.

◆ Execute() [2/2]

void mitk::ToolCommand::Execute ( itk::Object *  caller,
const itk::EventObject &  event 
)
override

Handles events from ITK filters (e.g. ProgressEvent, IterationEvent).

Parameters
[in]callerThe ITK object that triggered the event.
[in]eventThe event object.

◆ GetCurrentProgressValue()

double mitk::ToolCommand::GetCurrentProgressValue ( )

Returns the current progress value.

Returns
Current progress as a double.

◆ New()

static Pointer mitk::ToolCommand::New ( )
static

◆ SetProgress()

void mitk::ToolCommand::SetProgress ( int  steps)

Sets the progress to the given number of completed steps.

Parameters
[in]stepsNumber of completed steps.

◆ SetStopProcessing()

void mitk::ToolCommand::SetStopProcessing ( bool  value)

Sets the stop processing flag to abort the current operation.

Parameters
[in]valueIf true, signals the operation to stop.

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