Medical Imaging Interaction Toolkit  2016.11.0
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,
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 MITK_TOOLMANAGERPROVIDER_H
18 #define MITK_TOOLMANAGERPROVIDER_H
19 
21 
22 #include <mitkServiceInterface.h>
23 #include <usModuleContext.h>
24 
25 #include "mitkToolManager.h"
26 #include <itkObjectFactory.h>
27 #include <mitkCommon.h>
28 
29 namespace mitk
30 {
31  class SegmentationModuleActivator;
32 
44  class MITKSEGMENTATION_EXPORT ToolManagerProvider : public itk::LightObject
45  {
46  public:
48 
53  virtual mitk::ToolManager *GetToolManager();
54 
58  static mitk::ToolManagerProvider *GetInstance();
59 
60  // ONLY SegmentationModuleActivator is able to create instances of the service.
61  friend class mitk::SegmentationModuleActivator;
62 
63  protected:
64  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
65 
66  // hide everything
68  virtual ~ToolManagerProvider();
69  ToolManagerProvider(const ToolManagerProvider &);
70  ToolManagerProvider &operator=(const ToolManagerProvider &);
71 
72  mitk::ToolManager::Pointer m_ToolManager;
73  };
74 }
75 
76 MITK_DECLARE_SERVICE_INTERFACE(mitk::ToolManagerProvider, "org.mitk.services.ToolManagerProvider")
77 
78 #endif
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
Micro Service Singleton to get an instance of mitk::ToolManager.
MITK_DECLARE_SERVICE_INTERFACE(mitk::ISimulationService,"org.mitk.ISimulationService")
Manages and coordinates instances of mitk::Tool.