Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _mitkToolCommand_H
18 #define _mitkToolCommand_H
19 
20 #include "itkCommand.h"
21 #include "mitkCommon.h"
23 
24 namespace mitk
25 {
32  class MITKSEGMENTATION_EXPORT ToolCommand : public itk::Command
33  {
34  public:
35  typedef ToolCommand Self;
36  typedef itk::Command Superclass;
38  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
39 
44  void Execute(itk::Object *caller, const itk::EventObject &event) override;
45 
50  void Execute(const itk::Object *object, const itk::EventObject &event) override;
51 
56  void AddStepsToDo(int steps);
57 
62  void SetProgress(int steps);
63 
68  double GetCurrentProgressValue();
69 
74  void SetStopProcessing(bool value);
75 
76  protected:
77  ToolCommand();
78 
79  private:
80  double m_ProgressValue;
81  bool m_StopProcessing;
82  };
83 
84 } // namespace mitk
85 
86 #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