Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkSegmentationModuleActivator.cpp
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 #include <usGetModuleContext.h>
18 #include <usModule.h>
19 #include <usModuleActivator.h>
20 #include <usModuleContext.h>
21 
23 
24 namespace mitk
25 {
29  class SegmentationModuleActivator : public us::ModuleActivator
30  {
31  public:
32  void Load(us::ModuleContext *context) override
33  {
34  /*register ToolManager provider service*/
35  m_ToolManagerProvider = mitk::ToolManagerProvider::New();
36  context->RegisterService<mitk::ToolManagerProvider>(m_ToolManagerProvider);
37  }
38 
39  void Unload(us::ModuleContext *) override {}
40  private:
41  mitk::ToolManagerProvider::Pointer m_ToolManagerProvider;
42  };
43 }
44 
45 US_EXPORT_MODULE_ACTIVATOR(mitk::SegmentationModuleActivator)
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
virtual void Unload(ModuleContext *context)=0
static Pointer New()
Micro Service Singleton to get an instance of mitk::ToolManager.
virtual void Load(ModuleContext *context)=0
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)