Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkToolManagerProvider.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 MITK_TOOLMANAGERPROVIDER_H
14 #define MITK_TOOLMANAGERPROVIDER_H
15 
17 
18 #include <mitkServiceInterface.h>
19 #include <usModuleContext.h>
20 
21 #include "mitkToolManager.h"
22 #include <itkObjectFactory.h>
23 #include <mitkCommon.h>
24 
25 namespace mitk
26 {
27  class SegmentationModuleActivator;
28 
40  class MITKSEGMENTATION_EXPORT ToolManagerProvider : public itk::LightObject
41  {
42  public:
44 
49  virtual mitk::ToolManager *GetToolManager();
50 
54  static mitk::ToolManagerProvider *GetInstance();
55 
56  // ONLY SegmentationModuleActivator is able to create instances of the service.
57  friend class mitk::SegmentationModuleActivator;
58 
59  protected:
60  itkFactorylessNewMacro(Self);
61  itkCloneMacro(Self);
62 
63  // hide everything
65  ~ToolManagerProvider() override;
67  ToolManagerProvider &operator=(const ToolManagerProvider &);
68 
69  mitk::ToolManager::Pointer m_ToolManager;
70  };
71 }
72 
73 MITK_DECLARE_SERVICE_INTERFACE(mitk::ToolManagerProvider, "org.mitk.services.ToolManagerProvider")
74 
75 #endif
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
mitk::ToolManager::Pointer m_ToolManager
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Micro Service Singleton to get an instance of mitk::ToolManager.
Manages and coordinates instances of mitk::Tool.