Medical Imaging Interaction Toolkit  2025.12.02
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 {
28  class MITKSEGMENTATION_EXPORT ToolCommand : public itk::Command
29  {
30  public:
31  typedef ToolCommand Self;
32  typedef itk::Command Superclass;
34  itkFactorylessNewMacro(Self);
35  itkCloneMacro(Self);
36 
41  void Execute(itk::Object *caller, const itk::EventObject &event) override;
42 
47  void Execute(const itk::Object *object, const itk::EventObject &event) override;
48 
53  void AddStepsToDo(int steps);
54 
59  void SetProgress(int steps);
60 
66 
71  void SetStopProcessing(bool value);
72 
73  protected:
75 
76  private:
77  double m_ProgressValue;
78  bool m_StopProcessing;
79  };
80 
81 } // namespace mitk
82 
83 #endif
#define MITKSEGMENTATION_EXPORT
A command to get tool process feedback.
itk::SmartPointer< Self > Pointer
void AddStepsToDo(int steps)
Add new steps to the progress bar.
void Execute(const itk::Object *object, const itk::EventObject &event) override
Not implemented...
void Execute(itk::Object *caller, const itk::EventObject &event) override
Reacts on events from ITK filters.
void SetProgress(int steps)
Sets the remaining progress to the progress bar when the optimization process is done.
double GetCurrentProgressValue()
Returns the current progress value.
void SetStopProcessing(bool value)
Sets the stop processing flag, which is used to call ...
itk::Command Superclass
Find image slices visible on a given plane.