Medical Imaging Interaction Toolkit  2018.4.99-c670e289
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 
65  double GetCurrentProgressValue();
66 
71  void SetStopProcessing(bool value);
72 
73  protected:
74  ToolCommand();
75 
76  private:
77  double m_ProgressValue;
78  bool m_StopProcessing;
79  };
80 
81 } // namespace mitk
82 
83 #endif // _mitkToolCommand_H
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
itk::Command Superclass
A command to get tool process feedback.
itk::SmartPointer< Self > Pointer