Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkToolCommand.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkToolCommand_h
14 #define mitkToolCommand_h
15 
16 #include <itkCommand.h>
17 #include <mitkCommon.h>
19 
20 namespace mitk
21 {
31  class MITKSEGMENTATION_EXPORT ToolCommand : public itk::Command
32  {
33  public:
34  typedef ToolCommand Self;
35  typedef itk::Command Superclass;
37  itkFactorylessNewMacro(Self);
38  itkCloneMacro(Self);
39 
45  void Execute(itk::Object *caller, const itk::EventObject &event) override;
46 
52  void Execute(const itk::Object *object, const itk::EventObject &event) override;
53 
58  void AddStepsToDo(int steps);
59 
64  void SetProgress(int steps);
65 
71 
76  void SetStopProcessing(bool value);
77 
78  protected:
80 
81  private:
82  double m_ProgressValue;
83  bool m_StopProcessing;
84  };
85 
86 } // namespace mitk
87 
88 #endif
#define MITKSEGMENTATION_EXPORT
ITK command for tracking progress of segmentation tool operations.
itk::SmartPointer< Self > Pointer
void AddStepsToDo(int steps)
Adds new steps to the progress bar total.
void Execute(const itk::Object *object, const itk::EventObject &event) override
Const version of Execute (not implemented).
void Execute(itk::Object *caller, const itk::EventObject &event) override
Handles events from ITK filters (e.g. ProgressEvent, IterationEvent).
void SetProgress(int steps)
Sets the progress to the given number of completed steps.
double GetCurrentProgressValue()
Returns the current progress value.
void SetStopProcessing(bool value)
Sets the stop processing flag to abort the current operation.
itk::Command Superclass
Find image slices visible on a given plane.